Making WordPress.org


Ignore:
Timestamp:
11/18/2018 08:58:26 AM (6 years ago)
Author:
coffee2code
Message:

Breathe: Check if wporg_is_handbook() is available before using it in content-search.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/content-search.php

    r7859 r7870  
    33 * @package wporg-breathe
    44 */
     5
     6$is_handbook = function_exists( 'wporg_is_handbook' ) && wporg_is_handbook();
     7
    58?>
    69
     
    811    <header class="entry-header">
    912        <div class="entry-meta">
    10             <?php if ( ! is_page() && ! wporg_is_handbook() ) :
     13            <?php if ( ! is_page() && ! $is_handbook ) :
    1114                $author_posts_url = get_author_posts_url( get_the_author_meta( 'ID' ) );
    1215                    $posts_by_title   = sprintf(
     
    2023            <?php endif; ?>
    2124
    22             <?php if ( ! is_page() && ! wporg_is_handbook() ) : ?>
     25            <?php if ( ! is_page() && ! $is_handbook ) : ?>
    2326                <a href="<?php echo esc_url( $author_posts_url ); ?>" title="<?php echo esc_attr( $posts_by_title ); ?>" class="entry-author"><?php the_author(); ?></a>
    2427            <?php endif; ?>
    25             <?php if ( ! wporg_is_handbook() ) : ?>
     28            <?php if ( ! $is_handbook ) : ?>
    2629            <span class="entry-date">
    2730                <?php breathe_date_time_with_microformat(); ?>
Note: See TracChangeset for help on using the changeset viewer.