. add_theme_support( 'automatic-feed-links' ); // This theme supports a variety of post formats. //add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status' ) ); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'primary', __( 'Primary Menu', 'BooWP' ) ); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 460, 9999 ); // Unlimited height, soft crop } add_action( 'after_setup_theme', 'BooWP_setup' ); require( get_template_directory() . '/inc/custom-header.php' ); // font function BooWP_get_font_url() { $font_url = ''; if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'BooWP' ) ) { $subsets = 'latin,latin-ext'; $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'BooWP' ); if ( 'cyrillic' == $subset ) $subsets .= ',cyrillic,cyrillic-ext'; elseif ( 'greek' == $subset ) $subsets .= ',greek,greek-ext'; elseif ( 'vietnamese' == $subset ) $subsets .= ',vietnamese'; $protocol = is_ssl() ? 'https' : 'http'; $query_args = array( 'family' => 'Open+Sans:400italic,700italic,400,700', 'subset' => $subsets, ); $font_url = add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ); } return $font_url; } function BooWP_mce_css( $mce_css ) { $font_url = BooWP_get_font_url(); if ( empty( $font_url ) ) return $mce_css; if ( ! empty( $mce_css ) ) $mce_css .= ','; $mce_css .= esc_url_raw( str_replace( ',', '%2C', $font_url ) ); return $mce_css; } add_filter( 'mce_css', 'BooWP_mce_css' ); // feed function BooWP_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; $title .= get_bloginfo( 'name' ); // 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 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'BooWP' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'BooWP_wp_title', 10, 2 ); // NAV MENU // bootstrap nav menu require( get_template_directory() . '/inc/wp_bootstrap_navwalker.php' ); register_nav_menus( array( 'primary' => __( 'Primary Menu', 'BooWP' ), 'top' => __( 'Top Menu', 'BooWP' ), 'bottom' => __( 'Bottom Menu', 'BooWP' ), ) ); ////////////////////////////////////////////////////////// function BooWP_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ) $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'BooWP_page_menu_args' ); ///////////////////////////////////////////////////////////////////////// // APPARANCE - WIDGET - Bilesenler require( get_template_directory() . '/inc/widgets.php' ); add_action( 'widgets_init', 'BooWP_widgets_init' ); //////////////////////////////////////////////////////////////////////// // NAV if ( ! function_exists( 'BooWP_content_nav' ) ) : /** * Displays navigation to next/previous pages when applicable. * * @since Twenty Twelve 1.0 */ function BooWP_content_nav( $html_id ) { global $wp_query; $html_id = esc_attr( $html_id ); if ( $wp_query->max_num_pages > 1 ) : ?>
comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %s', get_comment_author_link()) ?> ','') ?> comment_approved == '0') : ?>

    $depth, 'max_depth' => $args['max_depth']))) ?>
    ', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $author = sprintf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'BooWP' ), get_the_author() ) ), get_the_author() ); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. if ( $tag_list ) { $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'BooWP' ); } elseif ( $categories_list ) { $utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'BooWP' ); } else { $utility_text = __( 'This entry was posted on %3$s by %4$s.', 'BooWP' ); } printf( $utility_text, $categories_list, $tag_list, $date, $author ); } endif; ////////////////////////////////////////////////////////////////////// function BooWP_body_class( $classes ) { $background_color = get_background_color(); $background_image = get_background_image(); if ( empty( $background_image ) ) { if ( empty( $background_color ) ) $classes[] = 'custom-background-empty'; elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) ) $classes[] = 'custom-background-white'; } // Enable custom font class only if the font CSS is queued to load. if ( wp_style_is( 'BooWP-fonts', 'queue' ) ) $classes[] = 'custom-font-enabled'; if ( ! is_multi_author() ) $classes[] = 'single-author'; return $classes; } add_filter( 'body_class', 'BooWP_body_class' ); ///////////////////////////////////////////////////////////// function BooWP_content_width() { if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) { global $content_width; $content_width = 960; } } add_action( 'template_redirect', 'BooWP_content_width' ); ////////////////////////////////////////////////////////////// function BooWP_customize_register( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; } add_action( 'customize_register', 'BooWP_customize_register' ); function BooWP_customize_preview_js() { wp_enqueue_script( 'BooWP-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130301', true ); } add_action( 'customize_preview_init', 'BooWP_customize_preview_js' ); // style, jquery, bootstrap if( !is_admin()){ // Register Bootstrap style sheet. function register_theme_bootstrap() { wp_register_style( 'theme-bootstrap', get_template_directory_uri().( '/bootstrap/css/bootstrap.css' ) ); wp_enqueue_style( 'theme-bootstrap' ); } add_action( 'wp_enqueue_scripts', 'register_theme_bootstrap' ); // Register style sheet. function register_theme_styles() { wp_register_style( 'theme-styles', get_template_directory_uri().( '/style.css' ) ); wp_enqueue_style( 'theme-styles' ); } add_action( 'wp_enqueue_scripts', 'register_theme_styles' ); wp_deregister_script('jquery'); wp_register_script('jquery', (get_template_directory_uri()."/js/jquery.js"), true); wp_enqueue_script('jquery'); wp_deregister_script('bootstrap'); wp_register_script('bootstrap', (get_template_directory_uri()."/bootstrap/js/bootstrap.min.js"), false, '3.1.1'); wp_enqueue_script('bootstrap'); add_filter('widget_text', 'do_shortcode'); } else { require( get_template_directory() . '/install/tgm/install_plugins.php' ); }