' . __( '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' ) . '
' . '' . __( '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' ) . '
' . '' . __( '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 ) { ?>