Duplicate attribute class causing site validation error
Simple fix: <div <?php post_class(“clearfix”); ?>> See post_class() for more details
Simple fix: <div <?php post_class(“clearfix”); ?>> See post_class() for more details
It appears you are using an HTML 5 theme. The W3C doesn’t validate all HTML output even though it might be “valid code”. The errors you’ve sent are generated by WordPress and most can be removed fairly easy by de-registering the WordPress Hooks which are causing them. The hooks are used to achieve things like … Read more
You need to pass the action to check your nonce against, wp_verify_nonce has two parameters. if($_POST && wp_verify_nonce($_REQUEST[‘test_slider_options_nonce’],’test_slider_action’)) echo “TEST”;
The best way to do form validation is with a combination of JavaScript and PHP. The reason why you want to perform JavaScript validation is to give the users a chance to correct their errors without submitting the form. Plus, it will stop any casual mistakes. You will also want to ensure validation on the … Read more
Disclaimer: I can’t give you a real explanation why this happens. I investigated this issue multiple times and (like you) didn’t even get a consistent error behavior. Anyway: Every sort of RESTful remote request using a remote API is painful and error prone – it simply highly depends what the counter part gives you… not. … Read more
Multiple register settings, with same option name – issue
I share your frustration. Not because I believe they are wrong (per se), but because late escaping makes for a really awful developer experience and hard to read code. There is currently a shared agreement among most professional-level WordPress developers that late escaping is the gold standard for output security: 10up on Late Escaping WordPress … Read more
Remove type attribute from script added by wp_localize_script
Apologies for the delay – what I did was basically created a .js file and places it within my theme folder – for example themes/nameoftheme/custom/checkcode.js Then using jquery – I created my code – here’s a snippet: jQuery(‘#in-category-6’).click(function(){ jQuery(‘#metabox_one’).toggle(this.checked); jQuery(‘#metabox_two’).hide(); jQuery(‘#metabox_three’).hide(); jQuery(‘#in-category-3’).attr(‘checked’, this.checked); jQuery(‘#in-category-1’).attr(‘checked’, false); jQuery(‘#in-category-4’).attr(‘checked’, false); jQuery(‘#in-category-5’).attr(‘checked’, false); jQuery(‘#in-category-7’).attr(‘checked’, false); jQuery(‘#in-category-8’).attr(‘checked’, false); jQuery(‘#in-category-9’).attr(‘checked’, false) … Read more
It doesn’t take much to tamper data when you use HTML forms; you don’t even need a plug-in to do that. That’s inherent in all HTML forms. If you’re that worried about people tampering with your data, yes, you’ll need to rewrite the plug-in code to use session variables or a digital signature.