/** * Registers a new rewrite endpoint for accessing the API * * @access public * @param array $rewrite_rules WordPress Rewrite Rules * */ public static function add_endpoint($rewrite_rules) { /* for API calls */ add_rewrite_endpoint('inbound-api', EP_ALL); /* for click event tracking */ self::$tracking_endpoint = apply_filters('inbound_event_endpoint', self::$tracking_endpoint); add_rewrite_endpoint('inbound', EP_ALL); }