' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Catch Box, provides the following Theme Options:', 'catchbox' ) . '

' . '
    ' . '
  1. ' . __( 'Color Scheme: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'catchbox' ) . '
  2. ' . '
  3. ' . __( 'Link Color: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'catchbox' ) . '
  4. ' . '
  5. ' . __( 'Default Layout: You can choose if you want your site’s default layout to have a sidebar on the left, the right, or not at all.', 'catchbox' ) . '
  6. ' . '
' . '

' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'catchbox' ) . '

'; $sidebar = '

' . __( 'For more information:', 'catchbox' ) . '

' . '

' . __( 'Documentation on Theme Options', 'catchbox' ) . '

' . '

' . __( 'Support Forums', 'catchbox' ) . '

'; $screen = get_current_screen(); if ( method_exists( $screen, 'add_help_tab' ) ) { // WordPress 3.3 $screen->add_help_tab( array( 'title' => __( 'Overview', 'catchbox' ), 'id' => 'theme-options-help', 'content' => $help, ) ); $screen->set_help_sidebar( $sidebar ); } } function catchbox_slider_options_help() { $help = '

' . __( 'Slider Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Catch Box, provides the following Theme Options:', 'catchbox' ) . '

' . '
    ' . '
  1. ' . __( 'Color Scheme: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'catchbox' ) . '
  2. ' . '
  3. ' . __( 'Link Color: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'catchbox' ) . '
  4. ' . '
  5. ' . __( 'Default Layout: You can choose if you want your site’s default layout to have a sidebar on the left, the right, or not at all.', 'catchbox' ) . '
  6. ' . '
' . '

' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'catchbox' ) . '

'; $screen = get_current_screen(); if ( method_exists( $screen, 'add_help_tab' ) ) { // WordPress 3.3 $screen->add_help_tab( array( 'title' => __( 'Overview', 'catchbox' ), 'id' => 'slider-options-help', 'content' => $help, ) ); } } /** * Renders the favicon url setting field. * * @since Catch Box 1.6 */ function catchbox_settings_field_favicon() { $options = catchbox_get_theme_options(); ?> 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', 'disable_header_search' => '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' ); ?>

Note: Enter the url for correponding social networking website', 'catchbox' ); ?>

'; } set_transient( 'catchbox_favicon', $catchbox_favicon, 86940 ); } echo $catchbox_favicon ; } //Load Favicon in Header Section add_action('wp_head', 'catchbox_favicon'); //Load Favicon in Admin Section add_action( 'admin_head', 'catchbox_favicon' ); /** * Enqueue the styles for the current color scheme. * * @since Catch Box 1.0 */ function catchbox_enqueue_color_scheme() { $options = catchbox_get_theme_options(); $color_scheme = $options['color_scheme']; if ( 'dark' == $color_scheme ) wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); elseif ( 'blue' == $color_scheme ) wp_enqueue_style( 'blue', get_template_directory_uri() . '/colors/blue.css', array(), null ); do_action( 'catchbox_enqueue_color_scheme', $color_scheme ); } add_action( 'wp_enqueue_scripts', 'catchbox_enqueue_color_scheme' ); /** * Hooks the css to head section * * @since Catch Box 1.0 */ function catchbox_inline_css() { $options = catchbox_get_theme_options(); if ( !empty( $options['custom_css'] ) ) { echo '' . "\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 ($options['google_verification']) { echo '' . "\n"; } //bing if ($options['bing_verification']) { echo '' . "\n"; } //yahoo if ($options['yahoo_verification']) { echo '' . "\n"; } //site stats, analytics code if ($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; ?> '; $catchbox_socialprofile = '
'; set_transient( 'catchbox_socialprofile', $catchbox_socialprofile, 604800 ); } echo $catchbox_socialprofile; } // catchbox_socialprofile add_action('catchbox_startgenerator_open', 'catchbox_socialprofile'); /** * Redirect WordPress Feeds To FeedBurner */ function catchbox_rss_redirect() { $options = catchbox_get_theme_options(); if ( !empty( $options['feed_url'] ) ) { $url = 'Location: '.$options['feed_url']; if ( is_feed() && !preg_match('/feedburner|feedvalidator/i', $_SERVER['HTTP_USER_AGENT'])) { header($url); header('HTTP/1.1 302 Temporary Redirect'); } } } add_action('template_redirect', 'catchbox_rss_redirect'); /* Clearing Theme Option Cache * @uses delete_transient */ function catchbox_themeoption_invalidate_caches() { delete_transient( 'catchbox_favicon' ); //Favicon delete_transient( 'catchbox_sliders' ); // Featured Slider delete_transient( 'catchbox_socialprofile' ); //Social Profile } /* Clearing Theme Option Cache * @uses delete_transient and action publish_post */ function catchbox_posts_invalidate_caches() { delete_transient( 'catchbox_sliders' ); // Featured Slider } add_action( 'publish_post', 'catchbox_posts_invalidate_caches' ); // publish posts runs whenever posts are published or published posts are edited