array( 'value' => 'light', 'label' => __( 'Light', 'catchbox' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/light.png', 'default_link_color' => '#1b8be0', ), 'dark' => array( 'value' => 'dark', 'label' => __( 'Dark', 'catchbox' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png', 'default_link_color' => '#e4741f', ), 'blue' => array( 'value' => 'blue', 'label' => __( 'Blue', 'catchbox' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/blue.png', 'default_link_color' => '#326693', ), ); return apply_filters( 'catchbox_color_schemes', $color_scheme_options ); } /** * Returns an array of layout options registered for Catch Box. * * @since Catch Box 1.0 */ function catchbox_layouts() { $layout_options = array( 'content-sidebar' => array( 'value' => 'content-sidebar', 'label' => __( 'Content on left', 'catchbox' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content-sidebar.png', ), 'sidebar-content' => array( 'value' => 'sidebar-content', 'label' => __( 'Content on right', 'catchbox' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png', ), 'content-onecolumn' => array( 'value' => 'content-onecolumn', 'label' => __( 'One-column, no sidebar', 'catchbox' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content.png', ), ); return apply_filters( 'catchbox_layouts', $layout_options ); } /** * Returns an array of content layout options registered for Catch Box. * * @since Catch Box 1.0 */ function catchbox_content_layout() { $content_options = array( 'excerpt' => array( 'value' => 'excerpt', 'label' => __( 'Show excerpt', 'catchbox' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/excerpt.png', ), 'full-content' => array( 'value' => 'full-content', 'label' => __( 'Show full content', 'catchbox' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/full-content.png', ) ); return apply_filters( 'catchbox_content_layouts', $content_options ); } /** * Returns the default options for Catch Box. * * @since Catch Box 1.0 */ function catchbox_get_default_theme_options() { $default_theme_options = array( 'excerpt_length' => 40, 'color_scheme' => 'light', 'link_color' => catchbox_get_default_link_color( 'light' ), 'theme_layout' => 'content-sidebar', 'content_layout' => 'excerpt', 'site_title_above' => '0', 'disable_header_search' => '0', 'enable_menus' => '0' ); if ( is_rtl() ) $default_theme_options['theme_layout'] = 'sidebar-content'; return apply_filters( 'catchbox_default_theme_options', $default_theme_options ); } /** * Returns the default link color for Catch Box, based on color scheme. * * @since Catch Box 1.0 * * @param $string $color_scheme Color scheme. Defaults to the active color scheme. * @return $string Color. */ function catchbox_get_default_link_color( $color_scheme = null ) { if ( null === $color_scheme ) { $options = catchbox_get_theme_options(); $color_scheme = $options['color_scheme']; } $color_schemes = catchbox_color_schemes(); if ( ! isset( $color_schemes[ $color_scheme ] ) ) return false; return $color_schemes[ $color_scheme ]['default_link_color']; } /** * Returns the options array for Catch Box. * * @since Catch Box 1.0 */ function catchbox_get_theme_options() { return get_option( 'catchbox_theme_options', catchbox_get_default_theme_options() ); } /** * Renders the Color Scheme setting field. * * @since Catch Box 1.0 */ function catchbox_settings_field_color_scheme() { $options = catchbox_get_theme_options(); foreach ( catchbox_color_schemes() as $scheme ) { ?>

' . catchbox_get_default_link_color( $options['color_scheme'] ) . '' ); ?> /> /> />

4); ?>

/>

Note: Here you add in Post IDs which displays on Homepage Featured Slider.', 'catchbox' ); ?>

' . "\n"; echo '' . "\n"; } } add_action('wp_head', 'catchbox_inline_css'); /** * Site Verification codes are hooked to wp_head if any value exists */ function catchbox_verification() { $options = get_option('catchbox_options_webmaster'); //google if (!empty( $options[ 'google_verification' ] ) ) { echo '' . "\n"; } //bing if (!empty( $options[ 'bing_verification' ] ) ) { echo '' . "\n"; } //yahoo if (!empty( $options[ 'yahoo_verification' ] ) ) { echo '' . "\n"; } //site stats, analytics code if (!empty( $options[ 'tracker_header' ] ) ) { echo $options['tracker_header']; } } add_action('wp_head', 'catchbox_verification'); /** * Analytic, site stat code hooked in footer * @uses wp_footer */ function catchbox_site_stats() { $options = get_option('catchbox_options_webmaster'); if ($options['tracker_footer']) { echo $options['tracker_footer']; } } add_action('wp_footer', 'catchbox_site_stats'); /** * Add a style block to the theme for the current link color. * * This function is attached to the wp_head action hook. * * @since Catch Box 1.0 */ function catchbox_print_link_color_style() { $options = catchbox_get_theme_options(); $link_color = $options['link_color']; $default_options = catchbox_get_default_theme_options(); // Don't do anything if the current link color is the default. if ( $default_options['link_color'] == $link_color ) return; ?>