max_num_pages > 1) {
$big = 999999999; // need an unlikely integer
$items = paginate_links(array(
'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
'format' => '?paged=%#%',
'prev_next' => true,
'current' => max(1, get_query_var('paged')),
'total' => $wp_query->max_num_pages,
'type' => 'array',
'prev_text' => esc_html__('Prev.', 'smartwp'),
'next_text' => esc_html__('Next', 'smartwp')
));
$pagination = "
\n";
echo wp_kses_post($pagination);
}
return;
}
endif;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Prints HTML with meta information for the current post-date/time, author & others.
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if (!function_exists('smartwp_posted_on')) :
function smartwp_posted_on() { ?>
%2$s',
esc_url(get_author_posts_url(get_the_author_meta('ID'))),
esc_html(get_the_author())
) ?>
ID) ? rand() : $post->ID);
return '
';
}
add_filter('the_password_form', 'smartwp_post_password_form');
endif;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Breadcrumb
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if (!function_exists('smartwp_breadcrumbs')) :
function smartwp_breadcrumbs(){ ?>
/
cat_ID );
echo (''.esc_html($category[0]->cat_name).' '.' / ');
}
echo get_the_title(); ?>
parent;
$smartwp_term_taxonomy = $smartwp_term->taxonomy;
while ( $smartwp_term_parent_id ) {
$smartwp_current_term = get_term( $smartwp_term_parent_id, $smartwp_term_taxonomy );
$smartwp_taxonomy_links[] = '' . esc_html( $smartwp_current_term->name ) . ' ';
$smartwp_term_parent_id = $smartwp_current_term->parent;
}
if ( !empty( $smartwp_taxonomy_links ) ) echo implode( ' / ', array_reverse( $smartwp_taxonomy_links ) ) . ' / ';
echo esc_html( $smartwp_term->name );
} elseif (is_author()) {
global $wp_query;
$curauth = $wp_query->get_queried_object();
esc_html_e('Posts by: ', 'smartwp'); echo ' ',$curauth->nickname;
} elseif (is_page()) {
echo get_the_title();
} elseif (is_home()) {
esc_html_e('Blog', 'smartwp');
} elseif (class_exists('WooCommerce') and (is_shop())){
esc_html_e('Shop', 'smartwp');
} ?>
name);
endif;
if (is_tag()) :
$page_header_title = sprintf(esc_html__('Tag: %s', 'smartwp'), $smartwp_query->name);
endif;
if (is_author()) :
$page_header_title = sprintf(esc_html__('Posts of: %s', 'smartwp'), $smartwp_query->display_name);
endif;
if (is_page()) :
$page_header_title = $smartwp_query->post_title;
endif;
if (is_home() ) :
$page_header_title = smartwp_option('blog-title');
endif;
if (is_single()) :
$page_header_title = get_the_title();
endif;
$page_header_title = apply_filters('smartwp_page_header_section_title', $page_header_title, $page_header_title);
if (empty($page_header_title)) :
$page_header_title = get_bloginfo('name');
endif;
return $page_header_title;
}
endif;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Page header section background image
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if (!function_exists('smartwp_page_header_background')) :
function smartwp_page_header_background() {
$image_src='';
return $image_src;
}
endif;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Comment form
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if (!function_exists('smartwp_comment_form')) :
function smartwp_comment_form($args = array(), $post_id = NULL) {
if (NULL === $post_id) {
$post_id = get_the_ID();
} else {
$id = $post_id;
}
$commenter = wp_get_current_commenter();
$user = wp_get_current_user();
$user_identity = $user->exists() ? $user->display_name : '';
if (!isset($args[ 'format' ])) {
$args[ 'format' ] = current_theme_supports('html5', 'comment-form') ? 'html5' : 'xhtml';
}
$req = get_option('require_name_email');
$aria_req = ($req ? " aria-required='true'" : '');
$html5 = 'html5' === $args[ 'format' ];
$fields = array(
'author' => '
',
'email' => '
',
'url' => '
',
);
$required_text = sprintf(' ' . esc_html__('Required fields are marked %s', 'smartwp'), '* ');
$defaults = array(
'fields' => apply_filters('comment_form_default_fields', $fields),
'comment_field' => '
',
'must_log_in' => '
'
. sprintf( wp_kses( __( 'You must be
logged in to post a comment.', 'smartwp' ), array( 'a' => array( 'href' => array() ) ) ), wp_login_url( apply_filters( 'the_permalink', esc_url( get_permalink( $post_id ) ) ) ) ) . '
',
'logged_in_as' => '' . sprintf( wp_kses( __( 'Logged in as
%2$s .
Log out? ', 'smartwp' ), array( 'a' => array( 'href' => array() ) ) ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', esc_url( get_permalink( $post_id ) ) ) ) ) . '
',
'comment_notes_before' => '',
'id_form' => 'commentform',
'id_submit' => 'submit',
'title_reply' => esc_html__( 'Leave a Reply', 'smartwp' ),
'title_reply_to' => esc_html__( 'Leave a Reply to %s', 'smartwp' ),
'cancel_reply_link' => esc_html__( 'Cancel reply', 'smartwp' ),
'label_submit' => esc_html__( 'Submit Comment', 'smartwp' ),
'format' => 'xhtml',
);
$args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults));
if (comments_open($post_id)) {
?>
comment_type) {
// Display trackbacks differently than normal comments.
case 'pingback' :
case 'trackback' :
?>
id="comment-">
', ''); ?>
id="li-comment-">
';
return $form;
}
add_filter('get_search_form', 'smartwp_blog_search_form');
endif;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Remove Query Strings From Static Resources
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if( ! function_exists( 'smartwp_remove_query_strings_1' )){
function smartwp_remove_query_strings_1( $src ){
$parts = explode( '?ver', $src );
return $parts[0];
}
}
if( ! function_exists( 'smartwp_remove_query_strings_2' )){
function smartwp_remove_query_strings_2( $src ){
$parts = explode( '&ver', $src );
return $parts[0];
}
}