', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'astha_pingback_header' ); /** * Pagination * * @package Astha * * @global type $wp_query * @return void */ function astha_post_pagination() { if( is_singular() ) return; global $wp_query; /* Stop execution if there's only 1 page */ if( $wp_query->max_num_pages <= 1 ) return; $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1; $max = intval( $wp_query->max_num_pages ); /* Add current page to the array */ if ( $paged >= 1 ) $links[] = $paged; /* Add the pages around the current page to the array */ if ( $paged >= 3 ) { $links[] = $paged - 1; $links[] = $paged - 2; } if ( ( $paged + 2 ) <= $max ) { $links[] = $paged + 2; $links[] = $paged + 1; } ?>
'; //
$name = esc_html__( 'Website', 'astha' ); $fields['url'] = '
'; return $fields; } } if( !function_exists( 'astha_comments_fields_placeholder' ) ){ /** * To change WordPress, Default Form field, you can use this. * I have made it for Developer, who want to change. * Currently I have changed by JavaScript * * @param type $fields * @return string */ function astha_comments_fields_placeholder( $fields ) { $name = esc_html__( 'Name', 'astha' ); $fields['author'] = ''; // * $name = esc_html__( 'Email', 'astha' ); $fields['email'] = '
'; //
$name = esc_html__( 'Website', 'astha' ); $fields['url'] = '
'; return $fields; } } //This Tas has done by JavaScript //add_filter( 'comment_form_default_fields', 'astha_comments_fields_placeholder' ); if( !function_exists( 'astha_placeholder_comment_form_field' ) ){ /** * For: Comment Form Placeholder Comment Field * To change WordPress, Default Form field, you can use this. * I have made it for Developer, who want to change. * Currently I have changed by JavaScript * * @param type $fields * @return string */ function astha_placeholder_comment_form_field( $fields ) { $replace_comment = __('Your Comment', 'astha'); $fields['comment_field'] = ''; return $fields; } } //This Tas has done by JavaScript //add_filter( 'comment_form_defaults', 'astha_placeholder_comment_form_field' ); //Test Perpose if( !function_exists( 'astha_customizer_paginate' ) ){ /** * Customize */ function astha_customizer_paginate( $dddd ){ return $dddd; } } //add_filter( 'navigation_markup_template', 'astha_customizer_paginate', 999 ); if( !function_exists( 'astha_social_share' ) ) { /** * Social share button will show in post or page * * @since 1.0.0.26 */ function astha_social_share() { $share_facebook_enabled = $share_twitter_enabled = $share_pinterest_enabled = $share_email_enabled = $share_whatsapp_enabled = $share_url_enabled = true; $share_title = esc_html( 'Share', 'astha' ); $share_title = apply_filters( 'astha_share_title', $share_title ); $share_title = wp_kses_post( $share_title ); $share_link_url = get_the_permalink(); $share_link_title = get_the_title(); $share_twitter_summary = $share_summary = get_the_excerpt(); $share_image_url = ''; $share_whatsapp_url = 'https://web.whatsapp.com/send?text=' . $share_link_title . ' - '. urlencode( $share_link_url ); $share_whatsapp_icon = ''; $share_email_icon = ''; $share_pinterest_icon = ''; $share_facebook_icon = ''; $share_twitter_icon = ''; ?>