PHP Class Timber\PostGetter

Show file Open project: jarednova/timber Class Usage Examples

Public Methods

Method Description
get_class_for_use_as_timber_post ( string | array $arg ) : string | boolean
get_post ( mixed $query = false, string | array $PostClass = '\Timber\Post' ) : array | boolean | null
get_post_class ( string $post_type, string | array $post_class = '\Timber\Post' ) : string
get_posts ( $query = false, $PostClass = '\Timber\Post', $return_collection = false )
is_post_class_or_class_map ( string | array $arg ) : boolean
loop_to_id ( ) : integer
query_post ( $query = false, $PostClass = '\Timber\Post' )
query_posts ( mixed $query = false, string | array $PostClass = '\Timber\Post' ) : PostCollection | QueryIterator
wp_query_has_posts ( ) : boolean

Method Details

get_class_for_use_as_timber_post() public static method

public static get_class_for_use_as_timber_post ( string | array $arg ) : string | boolean
$arg string | array
return string | boolean if a $type is found; false if not

get_post() public static method

public static get_post ( mixed $query = false, string | array $PostClass = '\Timber\Post' ) : array | boolean | null
$query mixed
$PostClass string | array
return array | boolean | null

get_post_class() public static method

public static get_post_class ( string $post_type, string | array $post_class = '\Timber\Post' ) : string
$post_type string
$post_class string | array
return string

get_posts() public static method

public static get_posts ( $query = false, $PostClass = '\Timber\Post', $return_collection = false )

is_post_class_or_class_map() public static method

public static is_post_class_or_class_map ( string | array $arg ) : boolean
$arg string | array
return boolean

loop_to_id() public static method

public static loop_to_id ( ) : integer
return integer the ID of the post in the loop

query_post() public static method

public static query_post ( $query = false, $PostClass = '\Timber\Post' )

query_posts() public static method

public static query_posts ( mixed $query = false, string | array $PostClass = '\Timber\Post' ) : PostCollection | QueryIterator
$query mixed
$PostClass string | array
return PostCollection | QueryIterator | QueryIterator

wp_query_has_posts() public static method

public static wp_query_has_posts ( ) : boolean
return boolean