'; } } add_action( 'wp_head', 'blogeasy_pingback_header' ); /** * Breadcrumb Trail Customization */ function blogeasy_breadcrumb_trail() { $breadcrumb_defaults = array( 'browse_tag' => 'h6', 'show_browse' => false, 'labels' => array( 'home' => '' ), ); if ( function_exists( 'breadcrumb_trail' ) ) : breadcrumb_trail( $breadcrumb_defaults ); endif; } /** * Add classes to navigation buttons */ add_filter( 'next_posts_link_attributes', 'blogeasy_posts_link_attributes' ); add_filter( 'previous_posts_link_attributes', 'blogeasy_posts_link_attributes' ); add_filter( 'next_comments_link_attributes', 'blogeasy_comments_link_attributes' ); add_filter( 'previous_comments_link_attributes', 'blogeasy_comments_link_attributes' ); function blogeasy_posts_link_attributes() { return 'class="btn btn-outline-primary mb-4"'; } function blogeasy_comments_link_attributes() { return 'class="btn btn-outline-primary mb-4"'; } /** * Greet new users & guide them to help page */ function blogeasy_admin_notice(){ if ( is_admin() ) { blogeasy_greet_user(); } } $intro_notice_dismissed = get_option( 'blogeasy-intro-dismissed' ); if( empty( $intro_notice_dismissed ) ) { add_action('admin_notices', 'blogeasy_admin_notice'); } function blogeasy_greet_user() { $help_url = esc_url( admin_url( 'themes.php?page=blogeasy-theme-help' ) ); echo '
'; echo wp_kses_post( __( '

Welcome! Thank you for choosing BlogEasy. You can always reach out to us on the support forum if you need any help. Please do take a look at the pro version of the theme. We are offering some special discounts for limited time on the pro version. If you liked our work, please support us by providing us a review with 5 star ratings.', 'blogeasy' ) ); echo "

"; esc_html_e( 'Support Forum', 'blogeasy' ); echo ""; esc_html_e( 'Check BlogEasy Pro', 'blogeasy' ); echo ""; esc_html_e( 'Rate us 5 stars', 'blogeasy' ); echo ""; esc_html_e( 'Don\'t display this again!', 'blogeasy' ); echo '

'; } // Enqueue dismiss script function blogeasy_admin_scripts() { wp_enqueue_script( 'blogeasy-admin', get_template_directory_uri() . '/assets/js/blogeasy-admin.js' ); } $intro_notice_dismissed = get_option( 'blogeasy-intro-dismissed' ); if( empty( $intro_notice_dismissed ) ) { add_action( 'admin_enqueue_scripts' , 'blogeasy_admin_scripts' ); } // Update option if notice dismissed add_action( 'wp_ajax_blogeasy-intro-dismissed', 'blogeasy_dismiss_intro_notice' ); function blogeasy_dismiss_intro_notice() { update_option( 'blogeasy-intro-dismissed', 1 ); }