PHP Class WPLib_Post_View_Base, wplib

The View Base Class for Posts.
Inheritance: extends WPLib_View_Base
Show file Open project: wplib/wplib

Public Properties

Property Type Description
$multipage { @type int $page @type int $numpages; @type bool $more; }

Public Methods

Method Description
__construct ( array | object | string $args ) WPLib_Post_View_Base constructor.
get_adjacent_post_link ( array $args = [] ) : mixed | null
get_author_hcard_html ( array $args = [] ) : string
get_category_list_links_html ( array $args = [] ) : boolean | string
get_comments_html ( array $args = [] ) : mixed | null
get_content_html ( array $args = [] ) : string
get_css_classes ( boolean | false $classes = false ) : array Return an array of CSS styles for this post
get_css_classes_attr ( boolean | false $classes = false ) : string Return a list of CSS styles named to output into an HTML element for this post as a single string "class" attribute value.
get_edit_link ( array $args = [] ) : string Return an edit link for this post.
get_excerpt_html ( ) : string
get_link ( string $link_text, array $args = [] ) : string Returns HTML for any value hyperlinked with the post's URL.
get_multipage_links_html ( array $args = [] ) : string
get_next_comments_link ( array $args = [] ) : string
get_next_post_link ( array $args = [] ) : mixed | null
get_number_of_comments_html ( ) : string
get_post_tag_list_links_html ( array $args = [] ) : boolean | string
get_previous_comments_link ( array $args = [] ) : string
get_previous_post_link ( array $args = [] ) : mixed | null
get_term_list_links_html ( array $args = [] ) : boolean | string
get_title_html ( array $args = [] ) : null | string
get_title_link ( array $args = [] ) : string Returns HTML for the title hyperlinked with the post's URL.
has_categories ( ) : boolean
has_post_tags ( ) : boolean
has_tags ( ) : boolean
post ( ) : WP_Post Provide easy access to the post object
the ( boolean $method_name, string $to_output )
the_category_list_links_html ( array $args = [] )
the_comment_form_html ( array $args = [] )
the_comment_list_html ( array $args = [] )
the_comments_html ( array $args = [] ) : mixed | null
the_content_html ( array $args = [] )
the_css_classes_attr ( boolean | false $classes = false ) Generate a "class" attribute value contained CSS styles named to output into an HTML element for this post.
the_edit_link ( array $args = [] ) Output an edit link for this post.
the_excerpt_html ( )
the_featured_image_html ( string $size = 'post-thumbnail', array $args = [] )
the_link ( string $link_text, array $args = [] ) Echo's HTML for any value hyperlinked with the post's URL.
the_multipage_links_html ( array $args = [] ) : string
the_next_comments_link ( array $args = [] ) : mixed | null
the_next_post_link ( array $args = [] ) : mixed | null
the_not ( boolean $method_name, string $to_output )
the_number_of_comments_html ( )
the_post_tag_list_links_html ( array $args = [] )
the_previous_comments_link ( array $args = [] ) : mixed | null
the_previous_post_link ( array $args = [] ) : mixed | null
the_thumbnail_html ( )
the_title_html ( array $args = [] ) : null | string
the_title_link ( array $args = [] ) Echos HTML for the title hyperlinked with the post's URL.

Private Methods

Method Description
_restore_multipage_globals ( array $globals )
_save_multipage_globals ( ) : array
_set_multipage_globals ( ) Set multipage global variables from $this->multipage
_set_multipage_property ( ) Set $this->multipage property from the multipage global variables

Method Details

__construct() public method

WPLib_Post_View_Base constructor.
public __construct ( array | object | string $args )
$args array | object | string

get_adjacent_post_link() public method

public get_adjacent_post_link ( array $args = [] ) : mixed | null
$args array
return mixed | null

get_author_hcard_html() public method

public get_author_hcard_html ( array $args = [] ) : string
$args array
return string

get_comments_html() public method

public get_comments_html ( array $args = [] ) : mixed | null
$args array
return mixed | null

get_content_html() public method

public get_content_html ( array $args = [] ) : string
$args array
return string

get_css_classes() public method

Return an array of CSS styles for this post
public get_css_classes ( boolean | false $classes = false ) : array
$classes boolean | false
return array

get_css_classes_attr() public method

Return a list of CSS styles named to output into an HTML element for this post as a single string "class" attribute value.
public get_css_classes_attr ( boolean | false $classes = false ) : string
$classes boolean | false
return string

get_excerpt_html() public method

public get_excerpt_html ( ) : string
return string

get_next_post_link() public method

public get_next_post_link ( array $args = [] ) : mixed | null
$args array
return mixed | null

get_number_of_comments_html() public method

get_post_tag_list_links_html() public method

public get_post_tag_list_links_html ( array $args = [] ) : boolean | string
$args array
return boolean | string

get_previous_post_link() public method

public get_previous_post_link ( array $args = [] ) : mixed | null
$args array
return mixed | null

get_title_html() public method

public get_title_html ( array $args = [] ) : null | string
$args array
return null | string

has_categories() public method

public has_categories ( ) : boolean
return boolean

has_post_tags() public method

public has_post_tags ( ) : boolean
return boolean

has_tags() public method

See also: Alias of $this->has_post_tags()
public has_tags ( ) : boolean
return boolean

post() public method

Provide easy access to the post object
public post ( ) : WP_Post
return WP_Post

the() public method

public the ( boolean $method_name, string $to_output )
$method_name boolean
$to_output string

the_comment_form_html() public method

public the_comment_form_html ( array $args = [] )
$args array

the_comment_list_html() public method

public the_comment_list_html ( array $args = [] )
$args array

the_comments_html() public method

public the_comments_html ( array $args = [] ) : mixed | null
$args array
return mixed | null

the_content_html() public method

public the_content_html ( array $args = [] )
$args array

the_css_classes_attr() public method

Generate a "class" attribute value contained CSS styles named to output into an HTML element for this post.
public the_css_classes_attr ( boolean | false $classes = false )
$classes boolean | false

the_excerpt_html() public method

public the_excerpt_html ( )

the_next_post_link() public method

public the_next_post_link ( array $args = [] ) : mixed | null
$args array
return mixed | null

the_not() public method

public the_not ( boolean $method_name, string $to_output )
$method_name boolean
$to_output string

the_number_of_comments_html() public method

the_post_tag_list_links_html() public method

public the_post_tag_list_links_html ( array $args = [] )
$args array

the_previous_post_link() public method

public the_previous_post_link ( array $args = [] ) : mixed | null
$args array
return mixed | null

the_thumbnail_html() public method

public the_thumbnail_html ( )

the_title_html() public method

public the_title_html ( array $args = [] ) : null | string
$args array
return null | string

Property Details

$multipage public property

{ @type int $page @type int $numpages; @type bool $more; }
public $multipage