PHP 클래스 Themosis\View\Loop

파일 보기 프로젝트 열기: themosis/framework

공개 메소드들

메소드 설명
author ( ) : string Get the author of the current post.
authorMeta ( string $field = '', integer $user_id ) : string Get author meta.
category ( integer $id ) : array Get the categories of the current post.
content ( string $more_text = null, boolean $strip_teaser = false ) : string Get the content of the current post.
date ( string $d = '', integer | WP_Post $post = null ) : string Get the date of the current post.
excerpt ( integer | WP_Post $post = null ) : string Get the excerpt of the current post.
id ( ) : integer Get the id of the current post.
link ( integer | WP_Post $post, boolean $leavename = false ) : string Get the permalink of the current post.
nextPage ( string $label = null, integer $max_page ) : string Return the next link html anchor tag for post entries.
paginate ( array $args = [] ) : string | array Return a pagination for any type of loops.
postClass ( string | array $class = '', integer | WP_Post $post_id = null ) : string Add the classes for a given post.
previousPage ( string $label = null ) : string | void Return the previous link html anchor tag for post entries.
tags ( integer $id ) : array Get the tags of the current post.
terms ( string $taxonomy, $post ) : array | false | WP_Error Get the terms (custom taxonomies) of the current post.
thumbnail ( $size = 'post-thumbnail', $attr = '', $post = null ) : string Get the post thumbnail of the current post.
thumbnailUrl ( string | array $size = null, boolean $icon = false ) : null | string Get thumbnail url of current post.
title ( integer | WP_post $post ) : string Get the title of the current post.

메소드 상세

author() 공개 메소드

Get the author of the current post.
public author ( ) : string
리턴 string The author of the current post.

authorMeta() 공개 메소드

Get author meta.
public authorMeta ( string $field = '', integer $user_id ) : string
$field string User field name.
$user_id integer The user ID.
리턴 string

category() 공개 메소드

Get the categories of the current post.
public category ( integer $id ) : array
$id integer The post ID.
리턴 array The categories of the current post.

content() 공개 메소드

Get the content of the current post.
public content ( string $more_text = null, boolean $strip_teaser = false ) : string
$more_text string Content to show when there is more text.
$strip_teaser boolean Strip teaser content before the more text.
리턴 string The content of the current post.

date() 공개 메소드

Get the date of the current post.
public date ( string $d = '', integer | WP_Post $post = null ) : string
$d string Date format.
$post integer | WP_Post The post ID or WP_Post object
리턴 string The date of the current post.

excerpt() 공개 메소드

Get the excerpt of the current post.
public excerpt ( integer | WP_Post $post = null ) : string
$post integer | WP_Post
리턴 string The excerpt of the current post.

id() 공개 메소드

Get the id of the current post.
public id ( ) : integer
리턴 integer The ID of the current post.

nextPage() 공개 메소드

Return the next link html anchor tag for post entries.
public nextPage ( string $label = null, integer $max_page ) : string
$label string Link content
$max_page integer Max pages in current query.
리턴 string

paginate() 공개 메소드

Return a pagination for any type of loops.
또한 보기: https://developer.wordpress.org/reference/functions/paginate_links/
public paginate ( array $args = [] ) : string | array
$args array
리턴 string | array

postClass() 공개 메소드

Add the classes for a given post.
저자: Guriev Eugen
public postClass ( string | array $class = '', integer | WP_Post $post_id = null ) : string
$class string | array One or more classes to add to the post class list.
$post_id integer | WP_Post The post ID or the post object.
리턴 string

previousPage() 공개 메소드

Return the previous link html anchor tag for post entries.
public previousPage ( string $label = null ) : string | void
$label string Link content
리턴 string | void

tags() 공개 메소드

Get the tags of the current post.
public tags ( integer $id ) : array
$id integer The post ID
리턴 array The tags of the current post.

terms() 공개 메소드

Get the terms (custom taxonomies) of the current post.
또한 보기: https://codex.wordpress.org/Function_Reference/get_the_terms
public terms ( string $taxonomy, $post ) : array | false | WP_Error
$taxonomy string The custom taxonomy slug.
리턴 array | false | WP_Error

thumbnail() 공개 메소드

Get the post thumbnail of the current post.
public thumbnail ( $size = 'post-thumbnail', $attr = '', $post = null ) : string
리턴 string The thumbnail of the current post.

thumbnailUrl() 공개 메소드

Get thumbnail url of current post.
public thumbnailUrl ( string | array $size = null, boolean $icon = false ) : null | string
$size string | array The size of the current post thumbnail.
$icon boolean
리턴 null | string

title() 공개 메소드

Get the title of the current post.
public title ( integer | WP_post $post ) : string
$post integer | WP_post The post ID or \WP_Post object
리턴 string The title of the current post.