'', 'random-default' => false, 'width' => '1124', 'height' => '291', 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '', 'header-text' => false, 'uploads' => true ); $carblog_bg_arguments = array( 'default-color' => '', 'default-image' => IMG_PATH.'default_bg.png', 'wp-head-callback' => 'carblog_custom_bg_initialize' ); function carblog_custom_bg_initialize() { $background = set_url_scheme( get_background_image() ); $color = get_theme_mod( 'background_color', get_theme_support( 'custom-background', 'default-color' ) ); if (!$background && !$color ) return; $style = $color ? "background-color: #$color;" : ''; if ($background) { $image = " background-image: url('$background');"; $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ); if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ))) $repeat = 'repeat'; $repeat = " background-repeat: $repeat;"; $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ); if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) ) $position = 'left'; $position = " background-position: top $position;"; $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ); if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) ) $attachment = 'scroll'; $attachment = " background-attachment: $attachment;"; $style .= $image . $repeat . $position . $attachment; } ?> 'This is the Main Menu') ); endif; } /**************************************************************** * LOAD STYLES AND JS SCRIPTS * ** You know that in order to load css and js to our theme the function we * should use is wp_enqueue_script and we determine where to load each * script.There 2 positions available: into the head or into the footer, * using the wp_head or wp_footer hook respectively. ** We load CSS first,then js and lastly we load respond.js which turns enables ** responsive bootstrap in IE 6-8 *****************************************************************/ add_action('wp_enqueue_scripts', 'carblog_load_css'); function carblog_load_css(){ wp_enqueue_style( 'bootstrap', CSS_PATH. 'bootstrap.min.css','','','all' ); wp_enqueue_style( 'bootstrap-theme', CSS_PATH. 'bootstrap-theme.min.css','','','all' ); wp_enqueue_style( 'slicknav',CSS_PATH.'slicknav.css','','','all'); wp_enqueue_style( 'foundation-icons', TEMP_PATH.'/foundation-icons/foundation-icons.css','','','all' ); wp_enqueue_style( 'style', STYLESHEET_URI,'','','all' ); } add_action('wp_enqueue_scripts', 'carblog_load_js'); function carblog_load_js(){ wp_enqueue_script('jquery'); wp_enqueue_script('bootstrap', JS_PATH.'bootstrap.min.js',array('jquery'),'',true); wp_enqueue_script('slicknav',JS_PATH.'jquery.slicknav.min.js',array('jquery'),'',true); wp_enqueue_script('theme_init',JS_PATH.'theme_init.js',array('jquery'),'',true); wp_localize_script('theme_init', 'init_vars', array( 'label' => __('Menu', 'carblog') )); if ( is_singular() && get_option( 'thread_comments' )) wp_enqueue_script( 'comment-reply' ); } add_action('wp_head', 'carblog_add_respond_js_for_ie'); function carblog_add_respond_js_for_ie() { echo ''; } /**************************************************************** * THEME SIDEBARS * ** We initialize and register of course carblog theme's sidebars. ** Use of widgets_init hook :) *****************************************************************/ add_action('widgets_init','carblog_create_sidebars'); function carblog_create_sidebars(){ register_sidebar(array( 'name' => __('Sidebar', 'carblog' ), 'id' => 'sidebar', 'description' => __('This is the main, widgetized sidebar.', 'carblog' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); } /**************************************************************** * THEME COMMENTS * ** Comments callback function from WordPress.org *****************************************************************/ function carblog_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">
comment_approved == '0' ) : ?>
%s says:' ), get_comment_author_link() ); ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>