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' => '