Class Simmer_Recipe
The single recipe object.
Methods summary
public
|
|
public
array
|
#
get_items( string $type = '' )
Get the items that belong to the recipe.
Get the items that belong to the recipe.
Parameters
- $type
Optional. The type of items to get. If blank, all items
will be returned. Default: all items.
Returns
array $items The attached items.
Since
1.3.0
|
public
array
|
#
get_ingredients( array $args = array() )
Get the ingredients.
Parameters
- $args
{
Optional. An array of arguments.
Returns
array $ingredients An array of the recipe's ingredients. An empty array is returned when there
are no ingredients for the recipe.
Since
1.3.0
Type
bool $exclude_headings Whether returned ingredients should exclude headings. Default 'false'.
string $orderby What to order the ingredients by. Default 'order' for their set order.
Accepts 'order', 'amount', 'unit', or 'random'. Requires $exclude_headings
be set to 'true'.
}
|
public
array
|
#
get_instructions( array $args = array() )
Get the instructions.
Parameters
- $args
{
Optional. An array of arguments.
Returns
array $instructions An array of the recipe's instructions. An empty array is returned when there
are no instructions for the recipe.
Since
1.3.0
Type
bool $exclude_headings Whether returned instructions should exclude headings. Default 'false'.
}
|
public
string|boolean
|
#
get_prep_time( string $format = 'human' )
Get the prep time.
Parameters
- $format
Optional. The duration format to return. Specify 'machine'
for microdata-friendly format. Default: 'human'.
Returns
string|boolean $prep_time The formatted prep time or false on failure.
Since
1.3.0
|
public
string|boolean
|
#
get_cook_time( string $format = 'human' )
Get the cook time.
Parameters
- $format
Optional. The duration format to return. Specify 'machine'
for microdata-friendly format. Default: 'human'.
Returns
string|boolean $cook_time The formatted cook time or false on failure.
Since
1.3.0
|
public
string|boolean
|
#
get_total_time( string $format = 'human' )
Get the total time.
Parameters
- $format
Optional. The duration format to return. Specify 'machine'
for microdata-friendly format. Default: 'human'.
Returns
string|boolean $total_time The formatted total time or false on failure.
Since
1.3.0
|
Properties summary
public
integer
|
$id
The recipe ID.
Since
1.3.0
|
|
public
object
|
$post
The standard WordPress post object.
The standard WordPress post object.
Since
1.3.0
|
|