/**
 * Check if the block has content
 *
 * @param string $name
 * @param array $args Optional. Additional arguments, see get_the_block for more information
 */
function has_block($name)
{
    if (0 < strlen(get_the_block($name))) {
        return true;
    }
    return false;
}
Ejemplo n.º 2
0
/**
 * Check if the block has content
 *
 * @param string $name
 * @param array $args Optional. Additional arguments, see get_the_block for more information
 */
function has_block($name, $args = array())
{
    if (0 < strlen(get_the_block($name, $args))) {
        return true;
    }
    return false;
}
Ejemplo n.º 3
0
        }
        ?>
                <?php 
        $mis = get_the_block('Mission');
        if ($mis) {
            ?>
                    <div class="partnerlabel">Mission</div>
                    <div class="partnerblock"><?php 
            echo $mis;
            ?>
</div>
                <?php 
        }
        ?>
                <?php 
        $act = get_the_block('Activities');
        if ($act) {
            ?>
                    <div class="partnerlabel">Activities</div>
                    <div class="partnerblock"><?php 
            echo $act;
            ?>
</div>
                <?php 
        }
        ?>
                <?php 
        the_content(__('Read the rest of this post &raquo;', 'emerald_stretch'));
        ?>
            </div>