%2$s', pen_class_animation( 'header_logo', false ), $logo ); } } return ''; } } if ( ! function_exists( 'pen_html_connect' ) ) { /** * Generates markup for the social network links. * * @param string $location The location of the social network links (for now it can be header or footer). * * @since Pen 1.0.0 * @return string */ function pen_html_connect( $location ) { ob_start( 'pen_compress_html' ); $rss_display = pen_option_get( 'rss_' . $location . '_display' ); $rss_url = pen_option_get( 'rss' ); if ( $rss_url && $rss_display ) { $rss_url = explode( '|', $rss_url ); foreach ( $rss_url as $rss_url ) { ?>
  • '; } return false; } } if ( ! function_exists( 'pen_html_search_box' ) ) { /** * Generates markup for the search box. * * @since Pen 1.0.0 * @return string */ function pen_html_search_box() { $search_display = get_post_meta( get_the_ID(), 'pen_content_search_display_override', true ); if ( ! $search_display || 'default' === $search_display ) { $search_display = pen_option_get( 'search_display' ); } if ( $search_display && 'no' !== $search_display ) { return trim( get_search_form( false ) ); } return false; } } if ( ! function_exists( 'pen_html_navigation_fallback' ) ) { /** * Fallback navigation menu. * * @since Pen 1.0.8 * @return void */ function pen_html_navigation_fallback() { if ( current_user_can( 'edit_theme_options' ) ) { ?> %2$s%3$s', pen_class_lists( 'category_display_override' ), __( 'Categories:', 'pen' ), $categories_list ); /* phpcs:ignore */ } } $posted_on = ''; $date_location = get_post_meta( $post_id, 'pen_' . $view . '_date_location_override', true ); if ( ! $date_location || 'default' === $date_location ) { $date_location = pen_option_get( $view . '_date_location' ); } if ( $location === $date_location || ( ! $date_location && 'header' === $location ) ) { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'DATE_W3C' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'DATE_W3C' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( /* Translators: %s: Post date. */ esc_html_x( 'Posted on %s', 'post date', 'pen' ), '' . $time_string . '' ); $posted_on = sprintf( '%2$s', pen_class_lists( 'date_display_override' ), $posted_on ); } $byline = ''; $author_location = get_post_meta( get_the_ID(), 'pen_' . $view . '_author_location_override', true ); if ( ! $author_location || 'default' === $author_location ) { $author_location = pen_option_get( $view . '_author_location' ); } if ( $location === $author_location || ( ! $author_location && 'header' === $location ) ) { $byline = sprintf( // Translators: %s: Post author's name. esc_html_x( 'by %s', 'post author', 'pen' ), '' . esc_html( get_the_author() ) . '' ); $byline = sprintf( ' %2$s', pen_class_lists( 'author_display_override' ), $byline ); } $output = trim( $posted_on . $byline . $categories_list ); $classes = trim( implode( ' ', array( 'entry-meta', is_singular() ? 'pen_animate_on_scroll pen_custom_animation_fadeIn' : '', ) ) ); if ( '' !== trim( $output ) ) { return '
    ' . $output . '
    '; } } } if ( ! function_exists( 'pen_html_author' ) ) { /** * Generates author profile. * * @param array $variables Profile parameteres. * * @since Pen 1.0.0 * @return void */ function pen_html_author( $variables = array() ) { $view = is_singular() ? 'content' : 'list'; $display = get_post_meta( get_the_ID(), 'pen_' . $view . '_profile_display_override', true ); if ( ! $display || 'default' === $display ) { $display = pen_option_get( $view . '_profile_display' ); } if ( ! $display ) { return; } $avatar = get_avatar( get_the_author_meta( 'email' ), '90' ); $user_url = get_the_author_meta( 'user_url' ); $add_link = ( $user_url && ( ! isset( $variables['add_url'] ) || $variables['add_url'] ) ) ? true : false; $classes = trim( implode( ' ', array( 'pen_author_profile', pen_class_animation( ( is_singular() ? 'content' : 'list' ) . '_author', false ), $avatar ? 'pen_has_avatar' : '', ) ) ); ?>

    ID ) ) ); $title = rawurlencode( $post->post_title ); $facebook_url = sprintf( 'https://www.facebook.com/sharer/sharer.php?u=%1$s', $url ); $twitter_url = sprintf( 'https://twitter.com/intent/tweet?text=%2$s&url=%1$s', $url, $title ); ?>

    $label ) { $value = get_post_meta( $post_id, $option, true ); if ( $value && 'default' !== $value ) { $edit_post_display = true; $overview_list[ $option ] = array( 'status' => ( 'no' === $value ) ? 'disabled' : 'enabled', 'label' => $label, 'value' => $value, 'help' => __( 'You can change this by editing this post.', 'pen' ), ); } } $options_content = pen_post_meta_options( 'content' ); foreach ( $options_content as $option => $label ) { $value = get_post_meta( $post_id, $option, true ); if ( $value && 'default' !== $value ) { $edit_post_display = true; $overview_content[ $option ] = array( 'status' => ( 'no' === $value ) ? 'disabled' : 'enabled', 'label' => $label, 'value' => $value, 'help' => __( 'You can change this by editing this post.', 'pen' ), ); } } $options_sidebars = pen_post_meta_options( 'sidebar' ); foreach ( $options_sidebars as $sidebar => $name ) { if ( ( is_home() || is_front_page() ) && is_singular() ) { if ( pen_option_get( str_replace( 'pen_', 'pen_front_', $sidebar ) ) ) { $customize_display = true; $overview_sidebars[ $sidebar ] = array( 'status' => 'disabled', 'label' => sprintf( /* Translators: %s: Sidebar name. */ esc_html__( '%s if on home:', 'pen' ), $name ), 'value' => __( 'Hidden', 'pen' ), 'help' => __( 'You can change this through Appearance → Customize → Front page → Sidebars.', 'pen' ), ); } } if ( get_post_meta( $post_id, $sidebar, true ) ) { $edit_post_display = true; $overview_sidebars[ $sidebar ] = array( 'status' => 'disabled', 'label' => sprintf( /* Translators: %s: Sidebar name. */ __( '%s:', 'pen' ), ucfirst( str_replace( array( 'pen_sidebar_', '_display', '_' ), array( '', '', ' ' ), $sidebar ) ) ), 'value' => __( 'Hidden', 'pen' ), 'help' => __( 'You can change this by editing this post.', 'pen' ), ); } } if ( empty( $overview_list ) && empty( $overview_content ) && empty( $overview_sidebars ) ) { ob_end_clean(); return; } ?>

    %s', 'pen' ), wp_kses_allowed_html( 'post' ) ), esc_html( $menu['name'] ) ); ?>

    'multipart', ) ); } else { wp_link_pages( array( 'before' => sprintf( '', 'next_or_number' => 'next', ) ); } $pagination = ob_get_clean(); if ( $pagination ) { printf( '
    %s
    ', $pagination /* phpcs:ignore */ ); } } }