コード例 #1
0
ファイル: Permalink.php プロジェクト: expresser/posttype
 public function permalink()
 {
     $permalink = get_permalink($this->ID);
     if (Filter::isUrl($permalink)) {
         return $this->permalink = $permalink;
     }
 }
コード例 #2
0
ファイル: Archive.php プロジェクト: expresser/posttype
 public static function getArchiveUrl()
 {
     $url = get_post_type_archive_link((new static())->post_type);
     if (Filter::isUrl($url)) {
         return $url;
     }
 }
コード例 #3
0
ファイル: Attachment.php プロジェクト: expresser/posttype
 public function url()
 {
     $url = wp_get_attachment_url($this->ID);
     if (Filter::isUrl($url)) {
         return $this->url = $url;
     }
 }