Ejemplo n.º 1
0
    ?>
"><?php 
    echo esc_html($total_time);
    ?>
				</li>

			<?php 
}
?>

		</ul><!-- .simmer-recipe-timing -->

		<ul class="simmer-recipe-extras">

			<?php 
if ($servings = simmer_get_the_servings()) {
    ?>

				<li>
					<strong><?php 
    _e('Serves', 'simmer');
    ?>
:</strong>
					<span itemprop="recipeYield"><?php 
    echo esc_html($servings);
    ?>
</span>
				</li>

			<?php 
}
Ejemplo n.º 2
0
/**
 * Print the current recipe's servings.
 *
 * @since 1.0.0
 * @see simmer_get_the_servings()
 *
 * @param string $before Optional. To print before the servings string.
 * @param string $after  Optional. To print after the servings string.
 * @return void
 */
function simmer_the_servings($before = '', $after = '')
{
    $servings = simmer_get_the_servings();
    $servings_label = simmer_get_the_servings_label();
    if ($servings || $servings_label) {
        echo $before;
    }
    if ($servings) {
        echo esc_html($servings);
    }
    if ($servings_label) {
        echo esc_html($servings_label);
    }
    if ($servings || $servings_label) {
        echo $after;
    }
}