max_num_pages < 2 ) { return; } ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?>
%link
', ''.__( 'Previous post', 'maskitto-light' ), '' ); next_post_link( '', __( 'Next post', 'maskitto-light' ).'', '' ); ?>
%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' ), '' . esc_html( get_the_author() ) . '' ); echo '' . $posted_on . ' ' . $byline . ''; } 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( '' . __( 'Tagged %1$s', 'maskitto-light' ) . '', $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 ); ?>
0 ) : ?>
$id, 'post_type' => 'page' ) ); while($posts->have_posts()): $posts->the_post(); $title = get_the_title(); $content = get_the_content(); $content = do_shortcode( apply_filters( 'the_content', $content ) ); endwhile; wp_reset_postdata(); if( $id > 0 ) : $style1 = (string) NULL; $style2 = (string) NULL; $style3 = (string) NULL; $subtitle = esc_attr( get_post_meta( $id, 'wpcf-subtitle', true )); $titlebar = esc_attr( get_post_meta( $id, 'wpcf-title-layout', true )); $title_color = esc_attr( get_post_meta( $id, 'wpcf-title-color', true )); $background_color = esc_attr( get_post_meta( $id, 'wpcf-background-color', true )); $background_image = esc_url( get_post_meta( $id, 'wpcf-background-image', true )); $padding = esc_attr( get_post_meta( $id, 'wpcf-page-padding', true )); $readmore = esc_attr( get_post_meta( $id, 'wpcf-read-more', true )); $button_name = esc_attr( get_post_meta( $id, 'wpcf-button-name', true )); $button_url = esc_url( get_post_meta( $id, 'wpcf-button-url', true )); if( !$button_url ) $button_url = '#'; $button_icon = esc_attr( get_post_meta( $id, 'wpcf-button-icon', true )); $button_type = esc_attr( get_post_meta( $id, 'wpcf-button-tone', true )); $googlemaps_image = esc_url( get_post_meta( $id, 'wpcf-google-maps-image', true )); $googlemaps_url = esc_url( get_post_meta( $id, 'wpcf-google-maps-url', true )); $googlemaps_height = esc_attr( get_post_meta( $id, 'wpcf-google-maps-height', true )); //$sociallinks = esc_attr( get_post_meta( $id, 'wpcf-social-links', true )); $page_template = esc_attr( get_post_meta( $id, '_wp_page_template', true ) ); $parallax = esc_attr( get_post_meta( get_the_ID(), 'wpcf-background-image-parallax', true )); if( $padding == 'small' ) { $style1.= "padding: 35px 0;"; } else if( $padding == 'large' ) { $style1.= "padding: 150px 0;"; } if( $background_color ) { $style1.= "background-color: $background_color;"; } if( $background_image ) { $style1.= "background-image: url($background_image);"; } if( $title_color ) { $style2.= "color: $title_color;"; } if( $googlemaps_height == 'extrasmall' ) { $style3.= "height: 200px;"; } else if( $googlemaps_height == 'small' ) { $style3.= "height: 325px;"; } else if( $googlemaps_height == 'large' ) { $style3.= "height: 550px;"; } else if( $googlemaps_height == 'extralarge' ) { $style3.= "height: 750px;"; } else { $style3.= "height: 450px;"; } /* Check content for widgets */ $widgets_count = 0; $matches = ''; if( isset($content) && $content ) : preg_match('/div class="page-section"/s', $content, $matches); endif; if( count($matches) > 0 ) { $style1.= "padding-bottom: 0px!important;"; $widgets_count = count( $matches ); } ?>

/', get_post_field( 'post_content', $id ) ) ) { ?>
publish ) && $count_portfolio->publish > 0) : $post_type = 'portfolio-item'; else : $post_type = 'portfolio'; endif; $loop_array = array( 'post_type' => $post_type, 'posts_per_page' => $limit, ); $loop_array20 = array(); if( isset( $widget_group ) && $widget_group != '' ) : $loop_array2 = array( array( 'taxonomy' => 'porfolio-group', 'field' => 'slug', 'terms' => $widget_group, ), ); $loop_array20 = array_merge( $loop_array20, $loop_array2 ); endif; if( isset( $category ) && $category != '' ) : $loop_array2 = array( array( 'taxonomy' => 'category', 'field' => 'slug', 'terms' => $category, ), ); $loop_array20 = array_merge( $loop_array20, $loop_array2 ); endif; if( ( isset( $widget_group ) && $widget_group != '' ) || ( isset( $category ) && $category != '' ) ) : $loop_array3 = array( 'tax_query' => array( $loop_array20 ), ); $loop_array = array_merge( $loop_array, $loop_array3 ); endif; $loop = new WP_Query( $loop_array ); while ( $loop->have_posts() ) : $loop->the_post(); $style1 = (string) NULL; $image = esc_url( get_post_meta( get_the_ID(), 'wpcf-background-image', true )); $caption = esc_attr( get_post_meta( get_the_ID(), 'wpcf-caption', true )); $url = esc_url( get_post_meta( get_the_ID(), 'wpcf-url', true )); if( $image ) : $style1.= "background-image: url($image);"; endif; if( $url ) : $image = $url; endif; ?>
style="display: none;">
name ) : ?> name; endforeach; ?>
term_relationships AS r ON r.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN $wpdb->posts AS p ON p.ID = r.object_id "; //Restrict by post type and Group by term_id for COUNTing. $post_type = implode( ',', $args['post_type'] ); $pieces['where'] .= $wpdb->prepare( " AND p.post_type IN(%s) GROUP BY t.term_id", $post_type ); remove_filter( current_filter(), __FUNCTION__ ); return $pieces; }, 10, 3 ); }*/ return get_terms($taxonomies, $args); } endif;