Ejemplo n.º 1
0
 /**
  * Main Cpmrp Instance
  *
  * @since 0.1
  * @return CPMRP_Admin_Pageload - Main instance
  */
 public static function instance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 2
0
 /**
  * API request output
  *
  * @since 1.2
  */
 function output($server)
 {
     global $wp_json_posts, $wp_json_pages, $wp_json_media, $wp_json_taxonomies;
     CPM_Router::api_content();
     // Projects.
     $wp_json_posts = new CPM_JSON_Projects($server);
     add_filter('json_endpoints', array($wp_json_posts, 'register_routes'), 0);
     add_filter('json_prepare_taxonomy', array($wp_json_posts, 'add_post_type_data'), 10, 3);
     //Task lists
     $wp_json_posts = new CPM_JSON_Lists($server);
     add_filter('json_endpoints', array($wp_json_posts, 'register_routes'), 0);
     add_filter('json_prepare_taxonomy', array($wp_json_posts, 'add_post_type_data'), 10, 3);
     //Task
     $wp_json_posts = new CPM_JSON_Tasks($server);
     add_filter('json_endpoints', array($wp_json_posts, 'register_routes'), 0);
     add_filter('json_prepare_taxonomy', array($wp_json_posts, 'add_post_type_data'), 10, 3);
     //Message
     $wp_json_posts = new CPM_JSON_Messages($server);
     add_filter('json_endpoints', array($wp_json_posts, 'register_routes'), 0);
     add_filter('json_prepare_taxonomy', array($wp_json_posts, 'add_post_type_data'), 10, 3);
     //Milestone
     $wp_json_posts = new CPM_JSON_Milestones($server);
     add_filter('json_endpoints', array($wp_json_posts, 'register_routes'), 0);
     add_filter('json_prepare_taxonomy', array($wp_json_posts, 'add_post_type_data'), 10, 3);
     //Comments
     $wp_json_posts = new CPM_JSON_Comments($server);
     add_filter('json_endpoints', array($wp_json_posts, 'register_routes'), 0);
     add_filter('json_prepare_taxonomy', array($wp_json_posts, 'add_post_type_data'), 10, 3);
 }
Ejemplo n.º 3
0
 /**
  * Shows the add-ons page on admin
  *
  * @return void
  */
 function admin_page_addons()
 {
     $this->router->admin_page_addons();
 }