0
votes
1answer
80 views

Verify Nonce returns false - Request Nonce returns correct value

I'm trying to verify that the nonce I created exists but for some reason it keeps returning false, why is this happening? Creating my nonce: <?php ...
0
votes
0answers
134 views

Woocommerce shipping plugin: create checkout error based on validation

I'm writing a shipping plugin for Wordpress and I need the ability to display an error to the user and disable the checkout process based on the results of custom validation. I've been using the ...
0
votes
1answer
93 views

How to validate inputs with filter in register_setting callback

I now have this function that works well : function wpPartValidate_settings( $input ) { if ( check_admin_referer( 'wpPart_nonce_field', 'wpPart_nonce_verify_adm' ) ) { // Create our array for ...
1
vote
3answers
960 views

How to properly validate data from $_GET or $_REQUEST using WordPress functions?

I am working on a plugin that requires on-the-fly manipulation of content output. This is solely dependent on the current $_GET variable or $_REQUEST variable. Depending on what the variable is set ...
14
votes
2answers
497 views

In Which Contexts are Plugins Responsible for Data Validation/Sanitization?

I want to make sure all of the data in my plugins/themes is handled securely before entering the database and before being output to the browser. My problem is that there are situations where the API ...
4
votes
2answers
3k views

How to validate custom fields in custom post type?

I wrote a plugin that creates a custom post type with custom fields. To prevent users from entering incorrect information, how can I validate the data? I assumed that the save_post hook function ...
1
vote
1answer
366 views

How do i validate data entered in a meta box so that only floats can be entered in a field?

We have a custom post type in our plugin and now i must provide the user a meta box where he enters latitude and longitude. I want them to be floats, i have no problems in doing the validation client ...
1
vote
1answer
819 views

Multiple options pages validation for a plugin

I am writing a plugin and I decided to have multiple pages for different options of the plugin (for clarity's sake). Doing a single option was a piece of cake, but I'm encountering difficulties when ...
6
votes
3answers
1k views

How should one implement add_settings_error on custom menu pages?

The Professional WordPress Plugin Development book explains in detail how to properly use the Settings API, and it also demonstrates how to add Menus and Submenus, but unfortunately it doesn't provide ...
1
vote
3answers
626 views

stray <p> elements

I coded a wordpress shortcode for columns that basically inserts html via a shortcode. Problem is that wpautop adds stray p elements that renders the code invalid. To test put this into your ...