How to validate inputs with filter in register_setting callback

First of all I would recommend you to rename your function to wpPartSanitize_settings, because this function doesn’t validate anything. As it doesn’t validate anything, then you aren’t able to “inform” administrator that one input is invalid. Nevertheless, to create your hook for wpPartValidate_settings filter, just do it like this: add_filter( ‘wpPartValidate_settings’, ‘wpse8170_sanitize_settings’, 10, 2 ); … Read more

WordPressUser Submission Form

When you get those “headers already sent” messages, it is usually one of several things: You are echoing something when you shouldn’t be, which is any time before get_header on the front end. I can’t remember exactly where the window is on the backend. You are doing something that is triggering a warning or notice … Read more

contact form in template with jquery,validate and ajax

WordPress is running Jquery in noconflict mode. (WordPress Codex Reference) or read this brief article I posted some time ago. View it here. You need to replace: $(document).ready(function(){ With this: jQuery(document).ready(function($){ So all together, try this: jQuery(document).ready(function($){ $(“#contact_form”).validate({ rules: { name: “required”, email: { required: true, email: true }, message: “required” }, messages: { name: … Read more

Remove comments validation (remove filter?)

If you take a look in source the condition for this message is get_option(‘require_name_email’). You can control it in Settings > Discussion > Comment author must fill out name and e-mail. The programmatic way could be add_filter( ‘pre_option_require_name_email’, ‘__return_null’ );

Disable woocommerce PLACE ORDER button if user selected products that are not available for international delivery

Since I do not have a great answer for you after checking logic above (seems okay).. something else I noticed. add_action(‘woocommerce_update_order_review’ … Are you using the most recent update? I see no reference here docs.woothemes.com/wc-apidocs/hook-docs.html or on github depo for that do_action. Here is the current layout for hooks/filters on form-checkout.php.. Are you sure you … Read more