コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 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);
 }