예제 #1
0
파일: site.php 프로젝트: nb/wp-cli
 /**
  * Get site url
  *
  * ## OPTIONS
  *
  * <id>...
  * : One or more IDs of sites to get the URL.
  *
  * ## EXAMPLES
  *
  *     wp site url 123
  */
 public function url($args)
 {
     if (!is_multisite()) {
         WP_CLI::error('This is not a multisite install.');
     }
     parent::_url($args, 'get_site_url');
 }
예제 #2
0
 /**
  * Get comment url
  *
  * ## OPTIONS
  *
  * <id>...
  * : One or more IDs of comments to get the URL.
  *
  * ## EXAMPLES
  *
  *     $ wp comment url 123
  *     http://example.com/about/page-with-comments/#comment-123
  */
 public function url($args)
 {
     parent::_url($args, 'get_comment_link');
 }
예제 #3
0
파일: post.php 프로젝트: ptahdunbar/wp-cli
 /**
  * Get post url
  *
  * ## OPTIONS
  *
  * <id>...
  * : One or more IDs of posts get the URL.
  *
  * ## EXAMPLES
  *
  *     wp post url 123
  *
  *     wp post url 123 324
  */
 public function url($args)
 {
     parent::_url($args, 'get_permalink');
 }