max_num_pages < 2 ) { return; } ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?>
%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( _x( 'Posted on %s', 'post date', 'maskitto-light' ), '' . $time_string . '' ); $byline = sprintf( _x( 'by %s', 'post author', 'maskitto-light' ), '' ); echo '' . $posted_on . ''; } endif; if ( ! function_exists( 'maskitto_light_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function maskitto_light_entry_footer() { // Hide category and tag text for pages. if ( 'post' == get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'maskitto-light' ) ); if ( $categories_list && maskitto_categorized_blog() ) { printf( '' . __( 'Posted in %1$s', 'maskitto-light' ) . '', $categories_list ); } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'maskitto-light' ) ); if ( $tags_list ) { printf( '', $tags_list ); } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( __( 'Leave a comment', 'maskitto-light' ), __( '1 Comment', 'maskitto-light' ), __( '% Comments', 'maskitto-light' ) ); echo ''; } edit_post_link( __( 'Edit', 'maskitto-light' ), '', '' ); } endif; /** * Returns true if a blog has more than 1 category. * * @return bool */ function maskitto_light_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'maskitto_categories' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'fields' => 'ids', 'hide_empty' => 1, // We only need to know if there is more than one category. 'number' => 2, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'maskitto_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so maskitto_categorized_blog should return true. return true; } else { // This blog has only 1 category so maskitto_categorized_blog should return false. return false; } } /** * Initialize admin edit button */ if ( ! function_exists( 'maskitto_light_admin_edit' ) ) : function maskitto_light_admin_edit( $blog_id ) { if ( current_user_can('edit_post', $blog_id) ) { ?> > > > > > > > > > > > > > > ' . $tags . ')[^<]*?(?:>[\s\S]*?<\/(?P=tag)>|\s*\/>)#', $content, $matches ) ) { foreach ( $matches[0] as $match ) { return $match; } } } if ( ! function_exists( 'maskitto_light_get_media' ) ) : function maskitto_light_get_media( $id ) { $media = ''; $content = do_shortcode( apply_filters( 'the_content', get_the_content( $id ) ) ); $embeds = maskitto_light_get_media_embedded_in_content_first( $content ); return $embeds; } endif; if ( ! function_exists( 'maskitto_light_paginate_links' ) ) : function maskitto_light_paginate_links() { if( get_option('permalink_structure') ) : $format = '?paged=%#%'; else : $format = 'page/%#%/'; endif; $big = 999999999; if( $format =='?paged=%#%' ) : $base = str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ); else : $base = @add_query_arg('paged','%#%'); endif; $args = array( 'base' => $base, 'format' => $format, ); // Disabled, because of other pagination if( 1 != 1 ) { $pagenate2 = wp_link_pages( $args ); } return paginate_links( $args ); } endif; /* Check for widgets */ if ( ! function_exists( 'maskitto_light_get_widgets' ) ) : function maskitto_light_get_widgets( $content ) { $content = do_shortcode( apply_filters( 'the_content', $content ) ); preg_match('/div class="page-section"/s', $content, $i); $widgets_count = count( $i ); ?>