PHP Class Lumberjack\PostTypes\Post

Inheritance: extends TimberPos\TimberPost
Datei anzeigen Open project: Rareloop/lumberjack Class Usage Examples

Protected Properties

Property Type Description
$postType

Public Methods

Method Description
all ( integer $perPage ) : array Get all posts of this type
postType ( )
posts ( array $args = null ) : array Raw query function that uses the arguments provided to make a call to Timber::get_posts and casts the returning data in instances of ourself.
query ( array $args = null ) : array Convenience function that takes a standard set of WP_Query arguments but mixes it with arguments that mean we're selecting the right post type

Method Details

all() public static method

Get all posts of this type
public static all ( integer $perPage ) : array
$perPage integer The number of items to return (defaults to all)
return array Array of Post objects

postType() public static method

public static postType ( )

posts() public static method

Raw query function that uses the arguments provided to make a call to Timber::get_posts and casts the returning data in instances of ourself.
public static posts ( array $args = null ) : array
$args array standard WP_Query array
return array An array of Post objects

query() public static method

Convenience function that takes a standard set of WP_Query arguments but mixes it with arguments that mean we're selecting the right post type
public static query ( array $args = null ) : array
$args array standard WP_Query array
return array An array of Post objects

Property Details

$postType protected_oe static_oe property

protected static $postType