Translations appear in the WP Customizer, but not on the website!
Translations appear in the WP Customizer, but not on the website!
Translations appear in the WP Customizer, but not on the website!
How do I update the wpColorPicker palette after initialization?
To force the site icon to be a specific attachment you can use the wp-admin/options.php page and search for the site_icon label then change the value of the field to the attachment ID you would like it to be. Of course this also can be done via SQL, with a query somewhat similar to: update … Read more
It’s not a necessary step but it is ideal. Adding the javascript is necessary to enable live-reloading within the Theme Customizer. What this does is, when you alter a control, albeit a textbox, colorwheel, image upload, whatever. After the adjustment is made, if you have enabled live-reload, then a moment later the preview will refresh … Read more
I think the customizer creates an xhr request for to load the site preview( see devtools under the network > xhr tab ). In my case I want to check if a certain variable isset via the $_GET[‘foo’] variable. My function must be called once and not twice otherwise it will override my previous state. … Read more
Also I modified two things One: $wp_customize->add_setting( // $id ‘header_background_color’, // $args array( ‘default’ => ”, ‘type’ => ‘theme_mod’, ‘capability’ => ‘edit_theme_options’, ‘sanitize_callback’ => ‘sanitize_hex_color’, ‘transport’ => ‘postMessage’ ) ); Two: $wp_customize->add_control( new WP_Customize_Color_Control( // $wp_customize object $wp_customize, // $id ‘header_background_color’, // $args array( ‘settings’ => ‘header_background_color’, ‘section’ => ‘sk_section_header’, ‘label’ => __( ‘Header Background … Read more
If I understand the question right, the easiest way to implement this now is to create a new control type that doesn’t actually render any input but rather just displays your desired text. Controls have to have an associated setting, so you can register a setting with a custom type of noop so that it … Read more
Since WordPress 4.5, there is a new warning regarding the use of remove_panel with core components (at the moment ‘nav_menus’ and ‘widgets’). The warning states: Removing WP_Customize_Manager::remove_panel manually will cause PHP warnings. Use the customize_loaded_components filter instead. Apparently it was added because of some php and javascript errors that seemed to be occurring in WordPress … Read more
So far the only solution I’ve been able to discover is to write individual customize_value_{$setting_id} filters for each and every setting I add. I hope someone knows of a better way.
If the customizer has been bootstrapped (that is, if the customize_register action has fired), then you can look at the control itself (assuming you flip your choices array, as I think your values should be the keys and vice-versa): $price = $wp_customize->get_setting( ‘price1’ )->value(); $control = $wp_customize->get_control( ‘price1’ ); $price_text = $control->choices[ $price ]; However, … Read more