', 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__( 'Email', 'astha' ); $fields['email'] = '

'; //

$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 = ''; ?>

', '' ); endif; else : the_title( '

', '

' ); endif; ?>
' . wp_kses( /* translators: 1: link to WP admin new post page. */ __( 'Ready to publish your first post? Get started here.', 'astha' ), array( 'a' => array( 'href' => array(), ), ) ) . '

', esc_url( admin_url( 'post-new.php' ) ) ); elseif ( is_search() ) : ?>

__( 'Facebook', 'astha' ), 'fab fa-twitter' => __( 'Twitter', 'astha' ), 'fab fa-linkedin-in' => __( 'LinkedIn', 'astha' ), 'fab fa-instagram' => __( 'Instagram', 'astha' ), 'fab fa-youtube-square' => __( 'Youtube', 'astha' ), 'fab fa-vimeo' => __( 'Vimeo', 'astha' ), 'fab fa-pinterest' => __( 'Pinterest', 'astha' ), 'fab fa-reddit' => __( 'Reddit', 'astha' ), 'fab fa-whatsapp' => __( 'WhatsApp', 'astha' ), 'fab fa-facebook-messenger' => __( 'Facebook Messenger', 'astha' ), //'fab fa-adobe' => __( 'Adobe', 'astha' ), 'fab fa-amazon' => __( 'Amazon', 'astha' ), 'fab fa-angellist' => __( 'AngelList', 'astha' ), 'fab fa-behance' => __( 'Behance', 'astha' ), 'fab fa-blogger-b' => __( 'Blogger', 'astha' ), 'fab fa-delicious' => __( 'Delicious', 'astha' ), 'fab fa-digg' => __( 'Digg', 'astha' ), 'fab fa-github' => __( 'Github', 'astha' ), 'fab fa-jsfiddle' => __( 'JSFiddle', 'astha' ), 'fab fa-patreon' => __( 'Patreon', 'astha' ), 'fab fa-slack' => __( 'Slack', 'astha' ), 'fab fa-snapchat' => __( 'Snapchat', 'astha' ), 'fab fa-telegram' => __( 'Telegram', 'astha' ), 'fab fa-tumblr' => __( 'Tumblr', 'astha' ), 'fab fa-vine' => __( 'Vine', 'astha' ), ); } } add_filter( 'astha_social_network_arr', 'astha_social_networks' );