/** * Add actions and filters for the post type * * This method should be called after instantiation to automatically add the * required filters for the post type. */ public function register_filters() { parent::register_filters(); add_action('json_insert_post', array($this, 'add_protected_meta'), 10, 3); }
public function register_filters() { parent::register_filters(); add_filter('query_vars', array($this, 'query_vars_filter')); add_filter('json_prepare_post', array($this, 'json_api_prepare_post_filter'), 10, 3); }