$section, 'menu_text' => esc_html( blognetic_get_option('' . $section . '_menu_title','') ), ); } } return $enabled_section; } add_filter( 'iconic_blog_filter_sections', 'blognetic_get_sections', 99 ); /** * Get theme options */ if ( ! function_exists( 'blognetic_get_option' ) ) : /** * Get theme option * * @since 1.0.0 * * @param string $key Option key. * @return mixed Option value. */ function blognetic_get_option( $key ) { $default_options = blognetic_get_default_theme_options(); if ( empty( $key ) ) { return; } $theme_options = (array)get_theme_mod( 'theme_options' ); $theme_options = wp_parse_args( $theme_options, $default_options ); $value = null; if ( isset( $theme_options[ $key ] ) ) { $value = $theme_options[ $key ]; } return $value; } endif; if ( ! class_exists( 'WP_Customize_Control' ) ) { return null; } class Blognetic_Switch_Control extends WP_Customize_Control{ public $type = 'switch'; public $on_off_label = array(); public function __construct( $manager, $id, $args = array() ){ $this->on_off_label = $args['on_off_label']; parent::__construct( $manager, $id, $args ); } public function render_content(){ ?> label ); ?> description ){ ?> description ); ?> value() == 'true' ) ? 'switch-on' : ''; $on_off_label = $this->on_off_label; ?>