'#f7f7f7' )); //enable theme to use its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); // Add RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); /*Create a nicely formatted and more specific title element text for output * in head of document, based on current view.*/ function blocade_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) { return $title; } // Add the site name. $title .= get_bloginfo( 'name', 'display' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { $title = "$title $sep $site_description"; } // Add a page number if necessary. if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { $title = "$title $sep " . sprintf( __( 'Page %s', 'blocade' ), max( $paged, $page ) ); } return $title; } add_filter( 'wp_title', 'blocade_wp_title', 10, 2 ); //register menu and only one menu is used,in the header. function register_blocade_menu() { register_nav_menus( array( 'primary-menu' => __('Primary Menu','blocade') )); } add_action('init','register_blocade_menu'); //displays post title in post templates. function blocade_title() { if ( is_single() ) : the_title( '

', '

' ); else : the_title( '

', '

' ); endif; } //register widgets and this theme use only on widget.Main sidebar. function register_blocade_widegts() { register_sidebar(array( 'name' => __('Main Sidebar','blocade'), 'id' => 'blocade-sidebar', 'description' => __('Display widgets in home page main sidebar','blocade'), 'before_widget' => '
', 'after_widget' => "
", 'before_title' => '

', 'after_title' => "

" )); } add_action('widgets_init','register_blocade_widegts'); //displays comment counts and post sharing option in post templates. function blocade_entry_footer() { ?>
0', ' 1', ' %'); ?>
max_num_pages > 1) { ?> %4$s%8$s','blocade'), esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'blocade' ), get_the_author() ) ), get_the_author(), get_the_tag_list('Tags : ',',' ,'') ); } //fallback for comments list. function blocade_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • id="li-comment-">
    %s','blocade'), get_comment_author_link()) ?>
    $depth, 'max_depth' => $args['max_depth']))) ?>
    comment_approved == '0') : ?>
    '; $content .= ''; $content .= ''; echo $content; } add_action('show_user_profile','blocade_user_social'); add_action('edit_user_profile','blocade_user_social'); // add text field in wordpress edit my profile page to enter social links. function blocade_user_social($user) { ?>