'#34495e')); add_theme_support('custom-header', array('width' => '200px', 'height' => '200px')); add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) ); add_theme_support( 'automatic-feed-links' ); function my_theme_setup(){ load_theme_textdomain( 'Blackcolors', get_template_directory() . '/languages' ); } add_action('after_setup_theme', 'my_theme_setup'); add_action('customize_register', 'themedemo_customize'); function themedemo_customize($wp_customize) { $wp_customize->add_setting( 'bc_barra_color', array( 'default' => '#2c3e50', 'sanitize_callback' => 'esc_html', ) ); $wp_customize->add_setting( 'bc_texto_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'esc_html', ) ); $wp_customize->add_setting( 'bc_links_color', array( 'default' => '#e67e22', 'sanitize_callback' => 'esc_html', ) ); $wp_customize->add_setting( 'bc_links_hover', array( 'default' => '#f1c40f', 'sanitize_callback' => 'esc_html', ) ); $wp_customize->add_setting( 'bc_galeria_color', array( 'default' => '#34495e', 'sanitize_callback' => 'esc_html', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bc_texto_color', array( 'label' => __('Text Color', 'Blackcolors'), 'section' => 'colors', 'settings' => 'bc_texto_color', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bc_barra_color', array( 'label' => __('Fixed Bar Background Color', 'Blackcolors'), 'section' => 'colors', 'settings' => 'bc_barra_color', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bc_links_color', array( 'label' => __('Links Color', 'Blackcolors'), 'section' => 'colors', 'settings' => 'bc_links_color', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bc_links_hover', array( 'label' => __('Links color when mouse is hover', 'Blackcolors'), 'section' => 'colors', 'settings' => 'bc_links_hover', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bc_galeria_color', array( 'label' => __('Gallery Background Color', 'Blackcolors'), 'section' => 'colors', 'settings' => 'bc_galeria_color', ) ) ); } if ( !isset( $content_width ) ){ $content_width = 600; } /*----- Write post or page title in posts and pages, and the blog title in home -----*/ add_filter( 'wp_title', 'baw_hack_wp_title_for_home' ); function baw_hack_wp_title_for_home( $title ) { if( empty( $title ) && ( is_home() || is_front_page() ) ) { return get_bloginfo( 'name' ); } return $title; } show_admin_bar( true ); /*----- Creates a header-menu -----*/ function register_my_menu() { register_nav_menu('primary', 'Header Menu'); } add_action( 'init', 'register_my_menu' ); /*----- Creates one Widget Area called Main Sidebar -----*/ function regyster_my_sidebar_lateral() { register_sidebar( array( 'name' => 'Main Sidebar', 'Blackcolors', 'id' => 'sidebar-1', 'description' => __('Widgets in this area will be shown on all posts and pages.', 'Blackcolors'), 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'regyster_my_sidebar_lateral' ); /*----- Creates three Widgets Areas called Footer %d -----*/ function regyster_my_sidebar_footer(){ register_sidebars(3, array('name'=>'Footer %d', 'before_title' => '

', 'after_title' => '

',)); } add_action( 'widgets_init', 'regyster_my_sidebar_footer' ); /*----- Creates Various Custom Admin Menus -----*/ add_action('admin_menu', 'blackcolors_box_menu'); function blackcolors_box_menu() { add_theme_page( 'BC Boxes', 'BC Boxes', 'edit_theme_options', 'customize-blackcolors', 'my_plugin_boxes' ); wp_enqueue_style( 'estilo', get_template_directory_uri().'/css/estilo.css'); wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/fonts/font-awesome/css/font-awesome.min.css' ); } add_action('admin_menu', 'blackcolors_social_menu'); function blackcolors_social_menu() { add_theme_page( 'BC Social', 'BC Social', 'edit_theme_options', 'customize-bc-social', 'my_plugin_social' ); wp_enqueue_style( 'estilo', get_template_directory_uri().'/css/estilo.css'); } add_action('admin_menu', 'blackcolors_fonts_menu'); function blackcolors_fonts_menu() { add_theme_page( 'BC Fonts', 'BC Fonts', 'edit_theme_options', 'customize-bc-fonts', 'my_plugin_fonts' ); } function my_plugin_boxes(){ if ( !current_user_can( 'manage_options' ) ) { wp_die( 'You do not have sufficient permissions to access this page.' ); }else{ if(isset($_POST['customurl'])){ for($i = 1; $i <= 5; $i++){ if(($url = $_POST["url$i"])){ update_option("userurl$i", $url); } if(($text = $_POST["text$i"])){ update_option("usertext$i", $text); } echo __('Updated ', 'Blackcolors') . " $text - $url
"; }; echo __('Do not forget to refresh your site in your web browser to see the changes', 'Blackcolors'); }else{ $url = array(); $text = array(); for($i = 1; $i <= 5; $i++){ $url[$i] = get_option("userurl$i"); $text[$i] = get_option("usertext$i"); } echo '
'; echo '

' . __('Customize BlackColors', 'Blackcolors') . '

'; echo '

' . __('You can modify here the URL Address of every colorbox in the top-right bar', 'Blackcolors') . '

'; echo "

" . __('Go PRO if you also want to change the icons and colof of the Theme:', 'Blackcolors') . " Blackcolors PRO

"; echo "
"; for($i = 1; $i <= 5; $i++){ echo "
"; echo "

" . __('Box', 'Blackcolors') . " $i

"; echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; } echo "
"; } } } function my_plugin_social(){ echo "

" . __('Go PRO to add social icons to the Theme:', 'Blackcolors') . " Blackcolors PRO

"; } function my_plugin_fonts(){ echo "

" . __('Go PRO to change the fonts of the Theme:', 'Blackcolors') . " Blackcolors PRO

"; } function my_estilos(){ $colortexto = get_theme_mod( 'bc_texto_color', '#ffffff'); $colorlinks = get_theme_mod( 'bc_links_color', '#e67e22' ); $colorhover = get_theme_mod( 'bc_links_hover', '#f1c40f' ); echo ""; } ?>