コード例 #1
0
ファイル: class-bbp-json-forums.php プロジェクト: ntwb/BB-API
 /**
  * Register the page-related routes
  *
  * @param array $routes Existing routes
  * @return array Modified routes
  */
 public function register_routes($routes)
 {
     $routes = parent::register_routes($routes);
     // Add topic's replies route
     $routes[$this->base . '/(?P<id>\\d+)/topics'] = array(array(array($this, 'get_posts_by_parent'), WP_JSON_Server::READABLE));
     return $routes;
 }
コード例 #2
0
 public function register_routes($routes)
 {
     $routes = parent::register_routes($routes);
     // $routes = parent::register_revision_routes( $routes );
     // $routes = parent::register_comment_routes( $routes );
     // Add more custom routes here
     return $routes;
 }
コード例 #3
0
 /**
  * Register the page-related routes
  *
  * @param array $routes Existing routes
  * @return array Modified routes
  */
 public function register_routes($routes)
 {
     $routes = parent::register_routes($routes);
     $routes = parent::register_revision_routes($routes);
     $routes = parent::register_comment_routes($routes);
     // Add post-by-path routes
     $routes[$this->route] = array('get_post_by_path' => array(array($this, 'get_post_by_path'), WP_JSON_Server::READABLE), "edit_post_by_path" => array(array($this, 'edit_post_by_path'), WP_JSON_Server::EDITABLE | WP_JSON_Server::ACCEPT_JSON), "delete_post_by_path" => array(array($this, 'delete_post_by_path'), WP_JSON_Server::DELETABLE));
     return $routes;
 }
コード例 #4
0
 public function register_routes($routes)
 {
     print "hi i'm here" . $base;
     exit;
     $routes = parent::register_routes($routes);
     // $routes = parent::register_revision_routes( $routes );
     // $routes = parent::register_comment_routes( $routes );
     // Add more custom routes here
     return $routes;
 }
コード例 #5
0
ファイル: nd-tsli.php プロジェクト: ak-dev/wp-plugins
 public function register_routes($routes)
 {
     $routes = parent::register_routes($routes);
     $routes = parent::register_revision_routes($routes);
     return $routes;
 }
コード例 #6
0
 public function register_routes($routes)
 {
     $routes = parent::register_routes($routes);
     $routes['/plots'] = array(array(array($this, 'create_plot'), WP_JSON_Server::CREATABLE | WP_JSON_Server::ACCEPT_JSON));
     return $routes;
 }