Skip to main content
added 35 characters in body
Source Link
Adam
  • 16.5k
  • 1
  • 44
  • 62
<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; wp_reset_postdata(); // reset $post global ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

Sandwich template with bit of Twig, eaten on MeadowMeadow will look something like:

{% if ( current_user_can( 'eat_sandwich' ) ) %}

    {% include 'header-sandwich.twig' %}

    {% loop fillings %}

        {% include 'filling-' ~ get_filling_type() ~ '.twig' ignore missing %}

    {% endloop %}

    {% include 'footer-sandwich.twig' %}

{% endif %}
<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; wp_reset_postdata(); // reset $post global ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

Sandwich template with bit of Twig, eaten on Meadow will look something like:

{% if ( current_user_can( 'eat_sandwich' ) ) %}

    {% include 'header-sandwich.twig' %}

    {% loop fillings %}

        {% include 'filling-' ~ get_filling_type() ~ '.twig' ignore missing %}

    {% endloop %}

    {% include 'footer-sandwich.twig' %}

{% endif %}
<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; wp_reset_postdata(); // reset $post global ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

Sandwich template with bit of Twig, eaten on Meadow will look something like:

{% if ( current_user_can( 'eat_sandwich' ) ) %}

    {% include 'header-sandwich.twig' %}

    {% loop fillings %}

        {% include 'filling-' ~ get_filling_type() ~ '.twig' ignore missing %}

    {% endloop %}

    {% include 'footer-sandwich.twig' %}

{% endif %}
added 43 characters in body
Source Link
Rarst
  • 99.9k
  • 10
  • 161
  • 298
<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; wp_reset_postdata(); // reset $post global ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

Sandwich template with bit of Twig, eaten on Meadow will look something like:

{% if ( current_user_can( 'eat_sandwich' ) ) %}

    {% include 'header-sandwich.twig' %}

    {% loop fillings %}

        {% include 'filling-' ~ get_filling_type() ~ '.twig' ignore missing %}

    {% endloop %}

    {% include 'footer-sandwich.twig' %}

{% endif %}
<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

Sandwich template with bit of Twig, eaten on Meadow will look something like:

{% if ( current_user_can( 'eat_sandwich' ) ) %}

    {% include 'header-sandwich.twig' %}

    {% loop fillings %}

        {% include 'filling-' ~ get_filling_type() ~ '.twig' ignore missing %}

    {% endloop %}

    {% include 'footer-sandwich.twig' %}

{% endif %}
<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; wp_reset_postdata(); // reset $post global ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

Sandwich template with bit of Twig, eaten on Meadow will look something like:

{% if ( current_user_can( 'eat_sandwich' ) ) %}

    {% include 'header-sandwich.twig' %}

    {% loop fillings %}

        {% include 'filling-' ~ get_filling_type() ~ '.twig' ignore missing %}

    {% endloop %}

    {% include 'footer-sandwich.twig' %}

{% endif %}
added 399 characters in body
Source Link
Rarst
  • 99.9k
  • 10
  • 161
  • 298
<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

Sandwich template with bit of Twig, eaten on Meadow will look something like:

{% if ( current_user_can( 'eat_sandwich' ) ) %}

    {% include 'header-sandwich.twig' %}

    {% loop fillings %}

        {% include 'filling-' ~ get_filling_type() ~ '.twig' ignore missing %}

    {% endloop %}

    {% include 'footer-sandwich.twig' %}

{% endif %}
<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

<!-- file shouldn't be named wp-lunch.php as it's not part of WP core -->

<?php if ( current_user_can( 'eat_sandwich' ) ): // more specific verb makes more sense to me ?>

    <?php get_header( 'sandwich' ); // native function accepts type argument ?>

    <?php while ( have_fillings() ): the_filling(); // maybe native API, but feels acceptable wrapper for semantics ?>

        <?php get_template_part( 'filling', get_filling_type() ); // native API, what would be `thick_layer` base? ?>

    <?php endwhile; ?>

    <?php get_footer( 'sandwich' ); // native function accepts type argument ?>

<?php endif; ?>

Spacing adjusted for coding style, etc.

Sandwich template with bit of Twig, eaten on Meadow will look something like:

{% if ( current_user_can( 'eat_sandwich' ) ) %}

    {% include 'header-sandwich.twig' %}

    {% loop fillings %}

        {% include 'filling-' ~ get_filling_type() ~ '.twig' ignore missing %}

    {% endloop %}

    {% include 'footer-sandwich.twig' %}

{% endif %}
added 2 characters in body
Source Link
Rarst
  • 99.9k
  • 10
  • 161
  • 298
Loading
Source Link
Rarst
  • 99.9k
  • 10
  • 161
  • 298
Loading