コード例 #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
ファイル: comment.php プロジェクト: voldemortensen/wp-cli
 /**
  * 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');
 }