PUM_Analytics::register_endpoints()
Registers the analytics endpoints
Description Description
Source Source
File: classes/Analytics.php
public static function register_endpoints() { register_rest_route( self::get_analytics_namespace(), self::get_analytics_route(), apply_filters( 'pum_analytics_rest_route_args', array( 'methods' => 'GET', 'callback' => array( __CLASS__, 'analytics_endpoint' ), 'permission_callback' => '__return_true', 'args' => array( 'event' => array( 'required' => true, 'description' => __( 'Event Type', 'popup-maker' ), 'type' => 'string', ), 'pid' => array( 'required' => true, 'description' => __( 'Popup ID', 'popup-maker' ), 'type' => 'integer', 'validation_callback' => array( __CLASS__, 'endpoint_absint' ), 'sanitize_callback' => 'absint', ), ), ) ) ); }
Expand full source code Collapse full source code View on Trac