__( 'Primary Sidebar', 'beautiful' ), 'id' => 'sidebar-1', 'description' => __( 'sidebar', 'beautiful' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); // four sidebars for footer register_sidebar( array( 'name' => __( 'First footer sidebar', 'beautiful' ), 'id' => 'sidebar-2', 'description' => __( 'First footer sidebar', 'beautiful' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Second footer sidebar', 'beautiful' ), 'id' => 'sidebar-3', 'description' => __( 'Second footer sidebar', 'beautiful' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Third footer sidebar', 'beautiful' ), 'id' => 'sidebar-4', 'description' => __( 'Third footer sidebar', 'beautiful' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Forth footer sidebar', 'beautiful' ), 'id' => 'sidebar-5', 'description' => __( 'Forth footer sidebar', 'beautiful' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'beautiful_register_sidebar' ); if( ! function_exists( 'beautiful_setup' ) ) : function beautiful_setup() { /* * Make beautiful for translation. * * Translations can be added to the /languages/ directory. * */ load_theme_textdomain( 'beautiful', get_template_directory() . '/languages' ); // This theme styles the visual editor to resemble the theme style. add_editor_style( array( 'css/editor-style.css' ) ); // Add RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); // theme suport for for serach from add_theme_support( 'html5', array( 'search-form' ) ); // Enable support for Post Thumbnails, and declare one sizes. add_theme_support( 'post-thumbnails' ); add_image_size('beautiful-box', 480, 480, true); // hide admin bar add_filter('show_admin_bar', '__return_false'); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery', ) ); // This theme allows users to set a custom background. $custom_background_args = array( 'default-color' => 'FFFFFF', 'default-image' => '%1$s/images/bg2.png', ); add_theme_support( 'custom-background', $custom_background_args ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); } endif; // beautiful_setup add_action( 'after_setup_theme', 'beautiful_setup' ); if ( ! isset( $content_width ) ) { $content_width = 880; } function beautiful_scripts() { // Add font-awesome font, used in the main stylesheet. wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array() ); // Add bootstrap, used in the main stylesheet. wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array() ); // Load our main stylesheet. wp_enqueue_style( 'beautiful-style', get_stylesheet_uri()); wp_enqueue_style( 'beautiful-animation', get_template_directory_uri() . '/css/animate.css'); // load comment reply script if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } // load bootstrap js wp_enqueue_script( 'bootstrap-script', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) ); // multi level menu wp_enqueue_script( 'bootstrap-multi-level', get_template_directory_uri() . '/js/bootstrap-multi-level-menu.js', array( 'jquery' ) ); // load fittext js, for font size at front page wp_enqueue_script( 'beautiful-fittext', get_template_directory_uri() . '/js/jquery.fittext.js'); // load our custom js if( !is_rtl() ) wp_enqueue_script( 'beautiful-script', get_template_directory_uri() . '/js/functions.js', array( 'beautiful-fittext', 'bootstrap-script' ) ); else wp_enqueue_script( 'beautiful-script', get_template_directory_uri() . '/js/functions-rtl.js', array( 'beautiful-fittext', 'bootstrap-script' ) ); } add_action( 'wp_enqueue_scripts', 'beautiful_scripts' ); // replace default comment forms with bootstrap forms // -------------------------------------------------------------------------------- // add_filter( 'comment_form_default_fields', 'bootstrap3_comment_form_fields' ); function bootstrap3_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_defaults', 'bootstrap3_comment_form' ); function bootstrap3_comment_form( $args ) { $args['comment_field'] = '
'; return $args; } // replace default title with our custom title // -------------------------------------------------------------------------------- // add_filter( 'wp_title', 'beautiful_filter_wp_title' ); /** * page title * @param text $title title to show * @return text based on page you are diplay title */ function beautiful_filter_wp_title( $title ) { global $page, $paged; if ( is_feed() ) return $title; $site_description = get_bloginfo( 'description' ); $filtered_title = $title . get_bloginfo( 'name' ); $filtered_title .= ( ! empty( $site_description ) && ( is_home() || is_front_page() ) ) ? ' | ' . $site_description: ''; $filtered_title .= ( 2 <= $paged || 2 <= $page ) ? ' | ' . sprintf( __( 'Page %s', "beautiful" ), max( $paged, $page ) ) : ''; return $filtered_title; }// function beautiful_filter_wp_title /** * post navigation * @return blog navigation */ function beautiful_blog_navigation() { $get_next_posts_link = get_next_posts_link(); $get_previous_posts_link = get_previous_posts_link(); if( !empty( $get_next_posts_link ) || !empty( $get_previous_posts_link ) ) : if( !is_rtl() ) : ?>
' . __("previous posts", "beautiful") . ''); ?>
' . __("next posts", "beautiful") . ' '); ?>
' . __("previous posts", "beautiful") . ' '); ?>
' . __("next posts", "beautiful") . ''); ?>
'; break; case 'chat': echo ''; break; case 'gallery': echo ''; break; case 'link': echo ''; break; case 'image': echo ''; break; case 'quote': echo ''; break; case 'status': echo ''; break; case 'video': echo ''; break; case 'audio': echo ''; break; default: if(is_sticky()) echo ''; elseif(post_password_required()) echo ''; else echo ''; }// switch ($post_format) }// function watermark() /** * template for showing blog posts at front page * it based on havig thumbnail or not * * @return blogPost */ function beautiful_blog_post() { $thumb_id = get_post_thumbnail_id( ); $thumb_url_array = wp_get_attachment_image_src( $thumb_id, 'beautiful-box' ); if( ( '' != get_the_post_thumbnail() ) && ( $thumb_url_array[1] == $thumb_url_array[2] ) && ( $thumb_url_array[1] == 480 )) : ?>
>

> default-bg

> default-bg

%link'); ?>
'); ?>
'); ?>
%link'); ?>