Elementor form – checkboxes validation

For anyone interested, I was able to resolve it like so: function form_checkboxes_validation(){ ?> <script type=”text/javascript”> (function($){ $(“#send-request”).click(function(){ if(! $(‘input[name=”form_fields[suite][]”]’).is(‘:checked’)) { alert(“Please select at least one suite!”); return false; } }); })(jQuery); </script> <?php } add_action(‘wp_footer’, ‘form_checkboxes_validation’);

How to use isSavingNonPostEntityChanges in the same scope correctly?

This seems to be the no-shadow rule. The problem is that it doesn’t like that you have defined two variables with the same name: isSavingNonPostEntityChanges (see code comments below). const { isSaving, isSavingNonPostEntityChanges } = useSelect((select) => { // <– here const { isSavingPost, isSavingNonPostEntityChanges } = select(editorStore); // <– and here return { isSaving: … Read more

Can WP-CLI modify database connection details in existing wp-config file?

You can use wp config set to update any existing value in wp-config or to add a new value: wp config set DB_NAME some_db_name wp config set DB_USER some_db_username wp config set DB_PASSWORD you_secret_value_pass See https://developer.wordpress.org/cli/commands/config/set/ Keep in mind that values are case sensitive, so if you do wp config set db_name some-db, it will … Read more

Too few arguments at registering new templates in my plugin

This is the problem, or rather what is missing from it: add_filter( ‘theme_page_templates’, __NAMESPACE__ . ‘\register_plugin_templates’ ); Specifically, you never told it that your function can accept 3 parameters, so it assumed it only accepts 1 as that’s the absolute minimum needed for a filter to work. Then on top of that, none of your … Read more