You’re right. There’s currently no default value for the customizeAction
param.
You can add your own default value for all controls with something like this in PHP:
add_action( 'customize_controls_enqueue_scripts', function() {
wp_add_inline_script(
'customize-controls',
sprintf(
'wp.customize.Section.prototype.defaults.customizeAction = %s;',
wp_json_encode( __( 'Customizing', 'default' ) )
)
);
} );
This isn’t in core yet because the default value is actually variable based on whether there is a panel
defined. This is something we should figure out and improve in core. See #42635.
Related Posts:
- Is it Possible to Extend WP Customize JS Methods?
- Customizer JS API: Defining control settings
- Customizer JS API: Adding Setting Dynamically Not Working
- Customizer JS API: Adding a “dropdown-pages” control
- WordPress customizer get control
- Get a default value of the Customizer setting using wp.customize API (JS)
- Customizer JS API: Defining active_callback for a section
- Show sections based on a control in WordPress Customizer using JS API
- How do I add a class to Customizer preview based on class of Customizer control? (Customizer Javascript API)
- Youtube api – stop video
- TypeError: res.status is not a function
- WP Rest API – How to get featured image
- Customizer JS API
- wp.customize.bind ready event not fired
- Show only images and videos in a wp.media window
- WordPress Rest API
- Is it possible to enqueue the Youtube API script or does it have to be inline?
- Detecting WordPress Customizer Panel
- WP Customizer set a value via javascript (to create presets)
- wp_customize_support_script – do I need it?
- Customizer – instantiating settings and controls via javascript
- Headless WordPress: How to authenticate front end requests?
- Customizer: When to use customize_preview_init VS customize_controls_enqueue_scripts
- Is there a client side API for handling transients or options?
- How to overwrite JS variable with wp_localize _script?
- Theme Customiser not live previewing changes on pseudo elements
- Hide/show customizer controls based on other settings in Customizer
- the Customizer – proper way to instantiate an image upload control via javascript
- Preserve Javascript Through Customizer Preview Navigation
- How to check if customize previewer is refreshing?
- JavaScript in WordPress Customizer
- Accessing customizer values in javascript
- Running JS after theme customizer finished initialization
- customize_preview_init: listening for any changes from Customizer preview area
- How to disable inline css styles generated by Gutenberg editor?
- How to conditionally show/hide controls & sections in WordPress customizer?
- Multiple Conditional Controllers
- Using webpack to add customizer live preview functionality – wp.customize is not a function
- Adding and removing hidden buttons from WordPress Customizer Tinymce widget editor using javascript API
- How to add customizer control via javascript ( wp.customizer.control.add )
- Load page in customizer preview on panel click?
- I am trying to add current logged in user to my zoho chat
- This page can’t load Google Maps correctly [closed]
- Adding Code into Theme Customizer Header
- Custom JS text area in customizer is being formatted wrong in document
- customize-controls.js – extend api.previewer
- how to use nimble-API and Display data?
- create timestamp links to jump to specific times on rumble videos
- Multiple jQuery inputs or binds in Customizer Control Javascripts
- WordPress Guternberg Content For React Native
- I would like to retrive JSON value and display it in wordpress page or widget
- LayersWP Customizer White Blank Screen
- Create new product with woocommerce REST API with javascript (clientside)?
- Receive “menu-toogle” event from section menu in customizer
- Anyway to disable the auto excerpt creation?
- How to get all place details from a Place Details Request using Google Places API Web Service?
- How do I check whether a checkbox is checked in jQuery?
- SyntaxError: Unexpected token o in JSON at position 1
- Heroku: “No default language could be detected for this app” error thrown for node app
- Loop inside React JSX
- Setting a backgroundImage With React Inline Styles
- Filter array to have unique values
- Format JavaScript date as yyyy-mm-dd
- Programmatically change the src of an img tag
- Unable to preventDefault inside passive event listener
- JavaScript variable assignments from tuples
- How do I check if string contains substring?
- What does “export default” do in JSX?
- Cannot find module ‘internal/fs’ after upgrading to node 7
- How can I select an element by name with jQuery?
- TypeError: ‘undefined’ is not an object
- Uncaught TypeError: Cannot read property ‘appendChild’ of null
- javascript setTimeout() not working
- Retrieve the position (X,Y) of an HTML element
- command not found: jest
- How to access Session variables and set them in javascript?
- Google Maps JS API v3 – Simple Multiple Marker Example
- socket.io – ReferenceError: io is not defined
- What is the difference D3 datum vs. data?
- How to check if a number is between two values?
- Error: Couldn’t find preset “es2015” relative to directory “/Users/username”
- Using Angular 2 without TypeScript Transpiler
- How to intercept already localized scripts
- Javascript Helpers
- Rest API invalid nonce with Backbone Client
- Gutenberg block “This block appears to have been modified externally” on save
- window.send_to_editor throws unterminated string literal error when adding image with multi line description
- Gutenberg get core data – search
- How to use Readmore.js? [closed]
- Return ‘X-WP-Total’ from headers in response
- Javascript asset not enqueuing with the rest
- Taxonomy Template displaying different color post tag js
- Why doesn’t my JS script load?
- Javascript Injection on my WordPress Site
- WordPress Gutenberg Ajax request
- Including js script at end of header
- Trigger a function during onload
- Page structure using The Customizer Api
- Google AdSense Ad not showing up in WordPress Blog [closed]
- Why is this script not working?