'333333', 'border' => '444444', 'text' => '111111', 'link' => '00adef', 'url' => '00adef', ); break; case 'black-green': $themecolors = array( 'bg' => '333333', 'border' => '444444', 'text' => '111111', 'link' => '3b96df', 'url' => '3b96df', ); break; case 'black-red': $themecolors = array( 'bg' => '333333', 'border' => '444444', 'text' => '111111', 'link' => 'ff3333', 'url' => 'ff3333', ); break; case 'sea-blue': $themecolors = array( 'bg' => 'bbd5db', 'border' => 'f0fef5', 'text' => '111111', 'link' => '8b9898', 'url' => '8b9898', ); break; case 'white-rose': $themecolors = array( 'bg' => 'ffffff', 'border' => 'ff0000', 'text' => '111111', 'link' => 'ff3333', 'url' => 'ff3333', ); break; default: $themecolors = array( 'bg' => '7dbaea', 'border' => 'd8eaf9;', 'text' => '111111', 'link' => '3c96df', 'url' => '3c96df', ); break; } } /** * Tell WordPress to run selecta_setup() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'selecta_setup' ); if ( ! function_exists( 'wp_body_open' ) ) : /** * Fire the wp_body_open action. * * Included for backward compatibility with WordPress versions prior to 5.2. */ function wp_body_open() { do_action( 'wp_body_open' ); } endif; function selecta_setup() { // This theme has an options page that lets users pick layout, color scheme, featured post title text and configure a twitter icon //require_once( dirname( __FILE__ ) . '/inc/theme-options.php' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); /** * Let WordPress manage the document title. */ add_theme_support( 'title-tag' ); // This theme supports post formats. add_theme_support( 'post-formats', array( 'aside', 'audio', 'image', 'quote', 'gallery', 'video', 'chat' ) ); // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'selecta', get_template_directory() . '/languages' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'selecta' ), ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background' ); // This theme allows users to upload a custom header. add_theme_support( 'custom-header', apply_filters( 'selecta_custom_header_args', array( 'default-image' => '', 'default-text-color' => '', 'header-text' => false, 'width' => 940, 'height' => 150, 'wp-head-callback' => '', 'admin-head-callback' => 'selecta_admin_header_style', ) ) ); // This theme uses post thumbnails. add_theme_support( 'post-thumbnails' ); add_image_size( 'normal', 190, 110, true ); // normal thumbnail size // Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. function selecta_page_menu_args($args) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'selecta_page_menu_args' ); add_theme_support( 'print-style' ); } // Load up the theme options require( dirname( __FILE__ ) . '/inc/theme-options.php' ); // Get selecta options function selecta_get_options() { $defaults = array( 'color_scheme' => 'blue', 'theme_slider' => 'no', 'theme_latest_posts' => 'no' ); $options = get_option( 'selecta_theme_options', $defaults ); return $options; } // Register our color schemes and add them to the style queue function selecta_color_registrar() { $options = selecta_get_options(); $color_scheme = $options['color_scheme']; if ( ! empty( $color_scheme ) && $color_scheme != 'blue' ) { wp_register_style( $color_scheme, get_template_directory_uri() . '/colors/' . $color_scheme . '.css', array( 'selecta' ), null ); wp_enqueue_style( $color_scheme ); } } add_action( 'wp_enqueue_scripts', 'selecta_color_registrar' ); // Load scripts. function selecta_scripts() { wp_enqueue_style( 'selecta', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); if ( is_front_page() ) { wp_enqueue_script( 'functions-js', get_template_directory_uri().'/js/functions.js', array( 'jquery'), '20110829' ); } } add_action( 'wp_enqueue_scripts', 'selecta_scripts' ); /** * Audio helper script. * * If an audio shortcode exists we will enqueue javascript * that replaces all non-supported audio player instances * with text links. * * @uses shortcode_exists(); */ function selecta_audio_script() { if ( shortcode_exists( 'audio' ) ) return; if ( ! is_singular() || has_post_format( 'audio' ) ) wp_enqueue_script( 'selecta-audio', get_template_directory_uri() . '/js/audio.js', array(), '20130521' ); } add_action( 'wp_enqueue_scripts', 'selecta_audio_script' ); /** * Styles the header image displayed on the Appearance > Header admin panel. */ function selecta_admin_header_style() { ?> __( 'Default Sidebar', 'selecta' ), 'id' => 'sidebar-1', 'description' => __( 'The primary widget area.', 'selecta' ), 'before_widget' => '
%2$s', esc_url( $url ), esc_html( get_the_title( $audio->ID ) ) ) ); ?>