It depends what “update” means.
If you want just to hide or show the control, (like how WordPress sidebar area is appearing and disappearing when the sidebar is present or not) then you can use the active_callback
parameter of the customize_control like this.
Edit: Also, active_callback
works on sections and panels too.
If you want the change the control’s HTML structure, or text or anything else, then it requires advanced javascript knowledge, because you need to trigger javascript events from the previewer and catch them on the panel.
This example comment should be enough for this case.
Related Posts:
- New WP_Customize API – how does it work under the hood?
- Disable Visible Edit Shortcuts in the Customizer
- How to Add Customizer Setting in Child Theme
- customize_register with Multiple controls/settings – how to get values?
- Manipulating post meta in the customizer
- Widgets not working in Customizr but working in Appearance
- In the new Theme Customizer API, how to send a value from the front back to the admin panel?
- get_theme_mod(); returns nothing
- How to get input_attrs in the sanitize function?
- How to change in customizer the “site identity” tab required capabilities
- Customizer image control default value showing in customizer but not on frontend
- Customizer: How do you add HTML to control labels?
- Add new Control to Customizer to modify Headings (h1, h2, h3…) Color
- How to extend nav-menu-item-control data in Appearance > Customize?
- What will happen to the additional CSS when the theme is updated?
- Convert an theme options page to use in customize.php also?
- Add more then one site logo – custom-logo theme support
- Hide devices selection from customizer?
- Fatal error in wp-admin/customize.php after fresh install due to null $wp_customize
- Enabling Additional CSS / custom-css
- Can not sanitize select control in customize api
- Bind JS event to WordPress control customizer
- For a specific theme, how do I build a list of all the possible theme modification names?
- Save & Publish disabled for two dimensional array Customizer
- Allow guests to use WP Customizer but disable save button
- How do I remove a customiser option from a parent theme in a child theme?
- How to add css option to Header Image customizer?
- Trigger Customizer Publish (save) Action
- How to edit alternate inactive themes in “Appearance -> Customise” screen?
- Is it necessary to prefix theme_mod, section id and panel id in the customizer?
- Hide Customizer’s Widget Choices From The List
- theme customizer – can a single option pass multiple values?
- How to remove Customizer’s Section and move Control straight to Panel using Child Theme
- Remove Customizer Control Choices (Type: Radio Array) using Child Themes
- Dynamic Control in customiser
- Is it possible to rename a customizer control heading?
- Is it possible to add custom badges to product attributes conditionally, based on custom field?
- Will WordPress updates remove Gutenberg Additional Classes?
- Easily add custom HTML outside the main container?
- Customizer options limited to specific user roles?
- Can’t Customize WordPress Page
- WordPress Customizer: Check for value of CSS selector and replace it
- In wordpress customizer api adding div wrap to control
- Apply `the_content’ filter to theme customisation live preview
- retrieve theme custom settings
- Multiple Customizers
- Which IDE best for WordPress Development? [closed]
- Do i need to use PHP in customizer api?
- Where did I put this one line of css?
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- When adding a custom REST endpoint, where do you put the endpoint function, and where do you put the function registration call?
- Capability to edit own posts and not others
- How to handle security on a wordpress site? [closed]
- Which freelance sites are recommended to find WordPress developers/programmers, etc
- Paginate Author’s Post List on Custom Author Page (ANOTHER THEORY)
- title, content, feature images
- How can I make site-wide content editable, for example footer content
- Custom Facebook share button with custom title,url,image in wordpress
- Sort posts by multiple meta key values
- Create custom dashboard for Multisite admins
- Integrate wordpress into index page
- Highlight comments of all the site authors
- Can I add/replace the WordPress image in the Dashboard
- Add content in between of foreach
- How to insert a writing panel between the title and the page content?
- Show custom message/info for authors in add/edit post page
- How to transfer one domain to another domain without losing theme options (customizer)?
- Create a page that dynamically loads data
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- How can I apply custom sanitization to new usernames?
- Usage of custom post types in a custom admin menu
- How to set up conditionals in page templates?
- How do I change my permalink structure to a custom structure on an established blog?
- I found this code to be very useful, how can I change it to a text that display “Product versions and period of last update” rather than a button?
- Select input in metabox not updated
- display text generated via custom get query string
- Bootstrap slider not working
- How could I change contact details in the footer?
- Editing a website made with wordpress
- How do I make elements in mobile only reverse order?
- Cannot replace header & footer using “the_content”
- Custom Route Returns 301/Passing Variable from Input
- Menu selection for header
- How to display custom admin pointers (tips/notifications) in Dashboard until dismissed?
- Custom password set/reset link in same URL format as default does’t work
- Two color in one Heading
- Creating custom setting in add media popup
- Still desperate about multiple TinyMCEs in widgets – is there any good solution to this yet?
- WordPress Customizer Help with FontAwesome Icon
- Integrate non-wordpress site into a wordpress site
- Taxonomy template by post type
- Pass the post ID
- If I want social media icons that link to my site’s corresponding accounts, is that better to do with a plugin, or manually?
- Create advanced portal website with sections – taxonomy usage?
- Will too many overridden css rules lead to performance issues
- Changes to code not displaying
- Permalink Listing WordPress
- Has the table name in SQL for WordPress changed from WP_posts to WPCS_post?
- Multi color post title by using custom javascript inside the gutenberg editor?