ID; /* Check that the user hasn't already clicked to ignore the message */ if( !get_user_meta( $user_id, 'business_press_ignore_notice' ) ) { echo '

'; printf( __( 'Thank you for activating Business Press theme. Let start form Online Documentation | Visit Demo | Hide This Notice', 'business-press' ), 'http://rinkuyadav.com/category/business-press-free/', 'http://business-press.rinkuyadav.com/', '?business_press_notics_ignore=0' ); echo "

"; } } } add_action( 'admin_notices', 'business_press_admin_notice' ); // if link of ignore notice clicked, store user meta if( !function_exists( 'business_press_handle_notic' ) ) { function business_press_handle_notic() { global $current_user; $user_id = $current_user->ID; if( isset( $_GET['business_press_notics_ignore']) && '0' == $_GET['business_press_notics_ignore'] ) { add_user_meta( $user_id, 'business_press_ignore_notice', 'true', true ); } } } add_action( 'admin_init', 'business_press_handle_notic' ); if( !function_exists( 'business_press_delete_user_meta_ignore_notice' ) ) { function business_press_delete_user_meta_ignore_notice() { global $current_user; $user_id = $current_user->ID; if( get_user_meta( $user_id, 'business_press_ignore_notice' ) ) { delete_user_meta( $user_id, 'business_press_ignore_notice' ); } } } add_action('switch_theme', 'business_press_delete_user_meta_ignore_notice'); /* Display a notice that can be dismissed END */ //custom excerpt length if( !function_exists( 'business_press_custom_excerpt_length' ) ) { function business_press_custom_excerpt_length( $length ) { return absint( get_theme_mod( 'business_press_excerpt_length', '57' ) ); } } add_filter( 'excerpt_length', 'business_press_custom_excerpt_length', 999 ); //custom excerpt last ...... replace if( !function_exists( 'business_press_excerpt_more' ) ) { function business_press_excerpt_more( $more ) { global $post; return ' ' . __( 'Read more', 'business-press' ) . '…'; } } add_filter( 'excerpt_more', 'business_press_excerpt_more', 1001 ); //add filter to next link if( !function_exists( 'business_press_next_post_attr' ) ) { function business_press_next_post_attr() { return 'rel="prev"'; } } add_filter( 'next_posts_link_attributes', 'business_press_next_post_attr' ); //add filter to prev link if( !function_exists( 'business_press_prev_post_attr' ) ) { function business_press_prev_post_attr() { return 'rel="next"'; } } add_filter( 'previous_posts_link_attributes', 'business_press_prev_post_attr' ); //add class="table table-bordered" to default calendar if( !function_exists( 'business_press_calendar_modify' ) ) { function business_press_calendar_modify( $html ) { return str_replace( 'id="wp-calendar"', 'id="wp-calendar" class="table table-bordered"', $html ); } } add_filter( 'get_calendar', 'business_press_calendar_modify' ); if( !function_exists( 'business_press_comment_form_fields' ) ) { function business_press_comment_form_fields( $fields ) { $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); $html5 = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0; $fields = array( 'author' => '
' . ' ' . '
', 'email' => '
' . '
', 'url' => '
' . '
' ); return $fields; } } add_filter( 'comment_form_default_fields', 'business_press_comment_form_fields' ); if( !function_exists( 'business_press_comment_form' ) ) { function business_press_comment_form( $args ) { $args['comment_field'] = '
'; $args['class_submit'] = 'bpressbtn'; // since WP 4.1 return $args; } } add_filter( 'comment_form_defaults', 'business_press_comment_form' ); /* * Add SEO Press Options menu * @ add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function ); */ if( !function_exists ( 'business_press_theme_options_page' ) ) { function business_press_theme_options_page() { add_theme_page( __( 'Business Press Options', 'business-press') , __( 'Business Press Options', 'business-press') , 'edit_theme_options', 'customize.php?autofocus[panel]=business_press_options', '' ); } } add_action( 'admin_menu', 'business_press_theme_options_page' ); /* * Add Custom Shortcut Links to WordPress Toolbar */ if( !function_exists( 'business_press_toolbar_link' ) ) { function business_press_toolbar_link( $wp_admin_bar ) { // Don't display menu in admin bar if the current user isn't an administrator if( !is_admin() ) { return; } // Add main link $args = array( 'id' => 'business_press_toolbar_link_main', 'title' => 'Business Press Options', 'href' => get_dashboard_url() . 'customize.php?autofocus[panel]=business_press_options', ); $wp_admin_bar->add_node( $args ); } } add_action( 'admin_bar_menu', 'business_press_toolbar_link', 999 ); function business_press_the_head_callbk() { ?>