芝麻web文件管理V1.00
编辑当前文件:/home/seolotod/www/wp-content/themes/brunn/framework/lib/qodef.customizer.php
add_panel( 'brunn_performance', array( 'priority' => 250, 'title' => esc_html__( 'Brunn Performance', 'brunn' ) ) ); $wp_customize->add_section( 'brunn_performance_icon_packs_section', array( 'panel' => 'brunn_performance', 'priority' => 10, 'title' => esc_html__( 'Icon Packs', 'brunn' ), 'description' => esc_html__( 'Here you can select specific features to disable. Note that disabling certain features and functionalities which you will not be needing or which you are otherwise not utilizing in any way can have a positive effect to the overall performance of your site.', 'brunn' ) ) ); foreach ( glob( SELECT_FRAMEWORK_ICONS_ROOT_DIR . '/*', GLOB_ONLYDIR ) as $item ) { $wp_customize->add_setting( 'brunn_performance_disable_icon_pack_' . $this->get_item_class( $item ), array( 'default' => false, 'type' => 'option', 'sanitize_callback' => array( $this, 'sanitize_checkbox' ) ) ); $wp_customize->add_control( 'brunn_performance_disable_icon_pack_' . $this->get_item_class( $item ), array( 'section' => 'brunn_performance_icon_packs_section', 'settings' => 'brunn_performance_disable_icon_pack_' . $this->get_item_class( $item ), 'type' => 'checkbox', 'label' => $this->get_item_name( $item ), ) ); } if ( brunn_select_core_plugin_installed() ) { $wp_customize->add_section( 'brunn_performance_cpt_section', array( 'panel' => 'brunn_performance', 'priority' => 20, 'title' => esc_html__( 'Custom Post Types', 'brunn' ), 'description' => esc_html__( 'Here you can select specific features to disable. Note that disabling certain features and functionalities which you will not be needing or which you are otherwise not utilizing in any way can have a positive effect to the overall performance of your site.', 'brunn' ) ) ); foreach ( glob( BRUNN_CORE_CPT_PATH . '/*', GLOB_ONLYDIR ) as $item ) { $wp_customize->add_setting( 'brunn_performance_disable_cpt_' . $this->get_item_class( $item ), array( 'default' => false, 'type' => 'option', 'sanitize_callback' => array( $this, 'sanitize_checkbox' ) ) ); $wp_customize->add_control( 'brunn_performance_disable_cpt_' . $this->get_item_class( $item ), array( 'section' => 'brunn_performance_cpt_section', 'settings' => 'brunn_performance_disable_cpt_' . $this->get_item_class( $item ), 'type' => 'checkbox', 'label' => $this->get_item_name( $item ), ) ); } $wp_customize->add_section( 'brunn_performance_shortcodes_section', array( 'panel' => 'brunn_performance', 'priority' => 30, 'title' => esc_html__( 'Shortcodes', 'brunn' ), 'description' => esc_html__( 'Here you can select specific features to disable. Note that disabling certain features and functionalities which you will not be needing or which you are otherwise not utilizing in any way can have a positive effect to the overall performance of your site.', 'brunn' ) ) ); $shortcodes = array(); foreach ( glob( SELECT_FRAMEWORK_MODULES_ROOT_DIR . '/blog/shortcodes/*', GLOB_ONLYDIR ) as $item ) { $shortcodes[ $this->get_item_class( $item ) ] = $this->get_item_name( $item ); } if ( brunn_select_is_woocommerce_installed() ) { foreach ( glob( SELECT_FRAMEWORK_MODULES_ROOT_DIR . '/woocommerce/shortcodes/*', GLOB_ONLYDIR ) as $item ) { $shortcodes[ $this->get_item_class( $item ) ] = $this->get_item_name( $item ); } } foreach ( glob( BRUNN_CORE_SHORTCODES_PATH . '/*', GLOB_ONLYDIR ) as $item ) { $shortcodes[ $this->get_item_class( $item ) ] = $this->get_item_name( $item ); } if ( ! empty( $shortcodes ) ) { ksort( $shortcodes ); foreach ( $shortcodes as $key => $value ) { $wp_customize->add_setting( 'brunn_performance_disable_shortcode_' . $key, array( 'default' => false, 'type' => 'option', 'sanitize_callback' => array( $this, 'sanitize_checkbox' ) ) ); $wp_customize->add_control( 'brunn_performance_disable_cpt_' . $key, array( 'section' => 'brunn_performance_shortcodes_section', 'settings' => 'brunn_performance_disable_shortcode_' . $key, 'type' => 'checkbox', 'label' => $value, ) ); } } } } } new BrunnSelectClassCustomizer();