Get a default customizeAction text for a section using Customizer JS API

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 … Read more

How to make async query in wordpress?

Is any way to make asynchronius query to wordpress, where i can use wordpress functions? Yes, but it’s: super fragile and easy to break a big security problem I strongly advise against it, and would consider the fix needed to make it work irresponsible to share. Instead, save yourself a world of pain and use … Read more

Trying to deque some .js from source

Try using wp_enqueue_scripts with the handle like this example in your functions.php file : add_action( ‘wp_enqueue_scripts’, ‘remove_scripts’, 100 ); function remove_scripts() { wp_dequeue_script( ‘original-handle’ ); wp_deregister_script( ‘original-handle ); } However, this will only work if they have been loaded correctly in using wp_enqueue_scripts. Looks like they have been hard coded in a file which isn’t … Read more

How do I add a class to Customizer preview based on class of Customizer control? (Customizer Javascript API)

Consider again how you want the control to work. If you hide the control, how would you unhide it? It sounds like you want a checkbox, to indicate whether the section is displayed or hidden. In your PHP on the ‘customize_register’ action, you define the holder of the indicator. They’ve named this a setting, with … Read more

I would like to retrive JSON value and display it in wordpress page or widget

I found some articles on net on how to proceed, tried this code: $url=”https://api.crex24.com/CryptoExchangeService/BotPublic/ReturnTicker?request=[NamePairs=BTC_BZK,BTC_DOGE]“; // path to your JSON file $data = file_get_contents($url); // put the contents of the file into a variable $characters = json_decode($data); // decode the JSON feed echo $characters[0]->PairName; foreach ($characters as $character) { echo $character->PairName . ‘‘; }