Few updates broke my CUSTOMIZER edits
-
Hello,
Frontend of my webpage is allright. But our client has backend access so he can edit his page and we’ve bouilt some editing possibilities into Theme -> Customize. In child theme I’ve got this chunk of code which worked:
function my_customizer_edits ( $wp_customize ) { /* ABOUT US SECTION */ $wp_customize->add_section( 'my_custom_about', array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('O nás', 'mytheme'), 'description' => __('You can type your text here', 'mytheme'), 'panel' => 'tc-content-panel', ) ); $wp_customize->add_setting( 'my_custom_about_us', array( 'default' => 'Default text' ) ); $wp_customize->add_control( new Text_Editor_Custom_Control( $wp_customize, 'my_custom_about_us', array( 'label' => 'About', 'section' => 'my_custom_about', 'settings' => 'my_custom_about_us' ) ) ); /* REMOVE STUFF */ $wp_customize->remove_panel( 'widgets' ); $wp_customize->remove_panel( 'nav_menus' ); $wp_customize->remove_panel( 'tc-footer-panel' ); $wp_customize->remove_panel( 'tc-advanced-panel'); $wp_customize->remove_panel( 'tc-sidebars-panel'); $wp_customize->remove_panel( 'tc-global-panel'); $wp_customize->remove_panel( 'tc-header-panel'); $wp_customize->remove_section('frontpage_sec'); $wp_customize->remove_section('post_layout_sec'); $wp_customize->remove_section('post_lists_sec'); $wp_customize->remove_section('single_posts_sec'); $wp_customize->remove_section('breadcrumb_sec'); $wp_customize->remove_section('post_metas_sec'); $wp_customize->remove_section('galleries_sec'); $wp_customize->remove_section('paragraphs_sec'); $wp_customize->remove_section('comments_sec'); $wp_customize->remove_section('post_navigation_sec'); } add_action( 'customize_register', 'my_customizer_edits ', 1000 );
I’m sure it has worked in 3.4.22 version of your theme. Now I checked (currently running 3.4.23) and it doesnt work and my client is unable to edit his page. When he goes to Theme -> Customize there are for a few seconds about ten items in left menu but when page fully loads, then there is only “Menu, Widgets, CSS” options.
What could’ve gone wrong?Thank you
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Few updates broke my CUSTOMIZER edits’ is closed to new replies.