Tagged Questions
0
votes
1answer
50 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
368 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 ...
12
votes
2answers
334 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 ...
3
votes
2answers
781 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
253 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
587 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 ...
4
votes
3answers
838 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
483 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 ...