The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
28 views

How to retain the values from dropdown category lists after wrong form submission?

I can't figure out the the code for - How to retain the values from dropdown category lists after wrong form submission? Any suggesstions, thanx in advance. <select class="selectpicker btn-block" ...
0
votes
2answers
60 views

Filter and validate user role in registration

I want to show a select box for user roles in the registration form. I am using this model: /* ROLES IN LIST REGISTRATION */ // 1. Add a new form element... add_action( 'register_form', '...
2
votes
1answer
171 views

Inconsistent server code response using HTTP API

I'm using Wordpress http api to get a server response code from youtube api so I check the validity of a video. I do this in a function from my functions.php which processes my post form where I ...
1
vote
1answer
79 views

Unable to sanitize in customizer and escape in theme without removing ability for user to use “< br >” to insert a line break

I have been unable to figure out how I can properly sanitize (in the customizer) and escape (in the theme, while allowing the user to use "<" and ">" to insert a '< br >' and add a line break ...
1
vote
1answer
96 views

Data Validation: Always escape late / escape HTML Code

I uploaded a Theme at THE marketplace and got soft rejected because I should "always escape late" I am not sure how to solve this other than I did. I have multiple if statements where HTML is saved ...
1
vote
1answer
33 views

correct tags for validating input types

I have following types of theme options inputs, which I need to validate. $numbers = "#1234"; $email = "abc@example.com"; $simeple_text = "How's going?"; $code = "<script type='text/javascript'>...
0
votes
1answer
66 views

Gravity Forms validate arrival and departure

I am working recently with GF and encounter the first problem: I have two datepicker; one is "arrival" and one is "departure". Now - of course - the "departure" can't be before "arrival". I've found ...
0
votes
1answer
46 views

Show the submitted values in the form when validation fails

Currently I do: $options = get_option( 'jons-plugin-options' ); echo "<input id='jons-plugin-options[field-two]' name='jons-plugin-options[field-two]' size='4' type='text' value='" . $...
0
votes
1answer
83 views

Proper Way to Sanitize Meta Input

I have a meta field which gets displaed in the admin panel look like: $field = get_post_meta($postid, 'field_name', true); ?> <input type="text" name="field_name" value="<?php echo (!empty($...
0
votes
1answer
102 views

Remove comments validation (remove filter?)

How i can remove wordpress comments content validation, I do not want to or examined the earlier there was no such comments. I see for: http://codex.wordpress.org/Function_Reference/...
0
votes
1answer
130 views

Can we validate user email changes?

I am having difficulty understanding why user security and validation is so vague in WP (4.0).. Surely email verification should come as default? Anyway I have been trying to find a solution to user ...
0
votes
1answer
74 views

Which hook should I use for this scenario regarding the registration process and account/profile update?

I would like to run a PHP script "ONLY" when a user successfully fills out the WordPress Registration form and submits it as well as when a user updates their profile. Here's what I have so far, ...
0
votes
1answer
77 views

Settings api sanatize callback not being triggered

I'm creating a custom settings page for a custom theme however the callbacks for sanatizing the data in the fields are not being called (I put in xdebug breakpoints in them to check). /** *-----------...
0
votes
1answer
95 views

How to prevent options.php deleting valid existing data from the database

I am setting up a plugin and have used the setting API for the first time to create a form in settings. The data for the plugin is initially created by default when the plugin is activated and stored ...
3
votes
0answers
162 views

Check for and enforce unique value in user-entered custom meta field in WP Admin

I am trying to figure out how, on a new or edit post screen, to allow the user to enter a custom meta item, BUT force it to be unique. Ideally the process would work like so: Contributor logs into ...
1
vote
0answers
53 views

What data validation we must use in different contexts?

Recently, my theme got rejected on Themeforest and one of the rejection issue is: Data Validation issues have been found in your theme. All dynamic data must be correctly escaped for the context ...
1
vote
0answers
53 views

Multiple register settings, with same option name - issue

I already posted this question in wordpress support forums here but I didn't get any help and nor could I find a solution yet. As the title says, I am calling register_settings functions multiple ...
1
vote
0answers
82 views

Resetting admin post form on JS validation fail

I've got a custom plugin with a metabox and dynamic form (the user can ask for more elements of the form), with jQuery Validation plugin working great. The problem is when the validation comes back ...
1
vote
0answers
423 views

Add ALT attribute to Pin It Button image to pass HTML5 validation

I am using the Pinterest "Pin It" Button plugin so I can add to my posts/images. However, part of the Pin In button uses this code: <img border="0" class="pib-count-img" src="//assets.pinterest....
1
vote
0answers
136 views

Only allow site url in text field using wp_kses/wp_filter_nohtml_kses?

I'm working on validation for a theme options page. Is there a built in way to add an argument to wp_kses/wp_filter_nohtml_kses that will allow a specific link to be entered(wrapped in a tags) but ...
1
vote
0answers
382 views

Validating a cloned/repeatable input (jQuery)

I'm trying to create a repeatable field an upload image input with image preview for my Theme Options page and I have the following: function theme_options_validate( $_POST ){ if (isset($_POST['...
1
vote
0answers
54 views

Showing errors from processing function on form

I use a function from my functions.php to process a front end post form. I store the errors in the variable $output but need a way to show it on the post form after submit. How can I do that?
0
votes
0answers
9 views

How to display comments “Duplicate comment detected” error message in same page

I developing a site. In a comments page, all the validation errors messages are shown in new page instead of same page. So I used jQuery validation plug-in for empty fields, and it is working ...
0
votes
0answers
15 views

Validate post checking if child term is assigned

For this particular case, all posts had to be a child term assigned to be published. I'm trying to hook on the "save_post" action, check the terms, return an error message if no child term is ...
0
votes
0answers
8 views

How to retain image path of “choose file” after wrong form submission?

How to retain the image path of "choose file" after wrong form submission? thanx in advance. I have following code in the input form <input id="image" type="file" name="coupon_image" /> And ...
0
votes
0answers
42 views

Server side validation on AJAX form submit from front-end

My current server side validation is not working with AJAX submit. // Tracking error messages function write_here_errors(){ static $wp_error; // Will hold global variable safely return isset($...
0
votes
0answers
16 views

How to format the various types of custom fields?

So i am ready to throw in my custom post type a bunch of custom fields. All these fields need specific handling for their input and validation. Exmaples: Numeric fields E-mails WYSIWYG editor ...
0
votes
0answers
200 views

Validating Custom User Profile Fields on Admin Profile Page

I have a number of custom fields (using Advanced Custom Fields) on the User Profile pages in the Admin Area. They work fine in most respects. They are displayed and the user can select and store data ...
0
votes
0answers
50 views

Custom registration validation plugin function conflict with register_post

I have a simple question, The wordpress docs say, "Please note that this hook (register_post) should never be used for custom validation. Any custom validation rules should be performed using the ...
0
votes
0answers
74 views

Why is my script's regex having its backslash removed?

One of my company's child themes requires customization. I am customizing using jQuery and have noticed in my function's regex (function lives in the "scripts" section of "Pages"--->My Page) that ...
0
votes
0answers
104 views

Displaying errors on the front end from my plugin

I am creating a plugin that has a frontend form, which in turn has some validation.. Errors if validation fails and success if it passes. I have tried everything and can't get messages to appear on ...
0
votes
0answers
27 views

Validation Always Tells There Is an Open DIV

The Validator will just not accept my website and is always telling me, there are two errors: 1. an open DIV ("inhalt") 2. an article left ... and I just can not find the errors in the index.php. ...
0
votes
0answers
345 views

Remove WordPress default registration client side validation?

Is there a way to remove/disable WordPress default registration client side validation? I dislike the pop alert and would like to add my own client side validation visual to users. Please assist me ...
0
votes
0answers
170 views

Ampersands do not display

I've got a WooCommerce install, running on the latest WordPress version. I'm using the discover theme by antthemes.com. There are four boxes at the bottom of the homepage which allows you to change ...
0
votes
0answers
747 views

register_setting - validation callback weirdness

I'm working on a plugin and having some issues validating input on its settings page. I'll try to explain as briefly as possible what I'm doing in the plugin file: if (is_admin()) { add_action('...
0
votes
0answers
22 views

What data sanitzation function should be used to store entire source code of webpage?

What is the best data santization function to use when the entire source code of a webpage (head, body elements, etc) are going to be stored in a post meta field? In other words, which function will ...