The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
687 views

Remove 'rel' attributes from the_category() output

I am trying to get the categories associated with a post in it's meta section by using the following code: <div>FILED AS: <span class="gf-post-meta-result"><?php the_category(' ...
0
votes
1answer
818 views

Validating a new user registration field

What I'm trying to do: Add new user meta fields that can be updated when the user edits their profile Validate them correctly when the form is submitted What I've done: I have successfully added ...
0
votes
1answer
1k views

Remember form field values with page navigation

I have a form on a page template that controls which posts show up on the page and how those posts are ordered. You can see what I mean here: http://www.theseattlevine.com/the-vine The questions I ...
3
votes
3answers
699 views

How to Debug the 'save_post' Action?

Is it possible to validate PHP code? I have a Custom Post Type (Film) with Custom Meta Boxes. Everything is working fine, I can add new Films and details to the Custom Meta Boxes. My problem is ...
4
votes
4answers
952 views

Replacing the Wordpress password validation

I have a custom application with thousands of users who already have a password stored. I would like to set up a self hosted wordpress site to accompany that application and to use the usernames and ...
1
vote
0answers
91 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
233 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 ...
1
vote
2answers
1k views

Check if username exist with AJAX

I've created a custom registration form for a WordPress MultiSite installation. It allows registrations of new blogs and users. I want to check with ajax if a given username is available. This is what ...
0
votes
1answer
56 views

Post Format Link Validation Error

For link post formats to appear in my archive.php I'm using the following code: <a href="<?php echo wp_trim_words( get_the_content(), 100 ); ?>"> <?php the_content(); ?> </a> ...
0
votes
1answer
32 views

How to do more than one verify_nonce in one function?

I use a function to inset post at front_end. There are 3 different types of actions may trigger this function. So, in this function, should I write 3 verify_nonce?
1
vote
1answer
103 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
0answers
45 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
1answer
468 views

Front end post form validation

I have a front end post from that works fine except for the validation that I need done before it's processed. Ultimately I'd like to be able to do this with ajax because I have to do some things like ...
1
vote
3answers
962 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 ...
0
votes
2answers
714 views

Verify Submitted Form Values and Show Warning Messages with Setting API

I'm making a plugin administration page with the settings API. I'd like to know a way to display a warning message when the user submits an invalid value. For example, with the below code, if the ...
1
vote
0answers
389 views

Validating buddypress custom profile fields [closed]

I'm using buddypress and I offer users the chance to add links to their social networks (facebook/twitter) by entering the url's into custom profile fields. My issue is that people can;t follow ...
1
vote
1answer
30 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 ...
1
vote
2answers
1k views

<?php echo $title ?> vs <?php echo esc_html( $title ); ?> Wordpress Security

Reading this great article Data Validation and Sanitization in Wordpress I've noticed that in my blog, in header.php, I used <?php echo $title ?> in a pair of codes. According to the above ...
1
vote
2answers
1k views

Validate an option array

We use the default WordPress register_setting() function to validate theme options. This call, for example: register_setting( 'options-group', 'option1', 'intval' ); Will validate whether or not ...
0
votes
0answers
228 views

Stop saving process when metabox is invalid [duplicate]

Possible Duplicate: Prevent post from being published if custom fields not filled Check before publishing, if already exist post with current custom field value I am trying to add some ...
1
vote
3answers
799 views

Alternative to esc_textarea

I need an alternative function to use with textareas in meta boxes instead of esc_textarea. The problem is that when I use this function with textarea's it removes line breaks and paragraphs. Is ...
2
votes
1answer
108 views

Persist fields with Setting API

In my admin panel, if I use a sanitizing callback register_setting() and the field does not pass through my custom validation, I've been preventing the database from updating by using return FALSE; ...
1
vote
2answers
343 views

Validate data on attachment_fields_to_save

I'm very glad that there is such a dedicated website for WP. My problem is data validation upon saving attachment fields. I have added many custom fields to attachment/media library dialog, most of ...
2
votes
2answers
420 views

Prevent empty Post Title on form submit via front end post (wp_insert_post_)

I am creating a post from the front end using (shortened for brevity); if (empty($_POST['my_title'])){ echo 'error: please insert a title'; } else { $title = $_POST['my_title']; } ...
1
vote
1answer
367 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
101 views

protect user submitted posts

I have a website that I am working on. I created an html form and put in some code that will take the form data and create a new wordpress post. It will post the information to a specific category. ...
0
votes
1answer
369 views

Form validation on user profile edit

I have added a custom field to user profiles in bbPress however I am unsure how to do form validation other than javascript. I would like to do some PHP validation however the few things I have tried ...
0
votes
1answer
268 views

Settings API - getting hidden input / submit button's name

I'm generating this form using Settings API: <form action="options.php" method="post"> <?php settings_fields('XX_theme_settings'); do_settings_sections('my_settings'); ?> ...
0
votes
1answer
556 views

Settings API validation callback

I finally managed to create working validation callback for Settings API with big help of Chip Bennet, there's only one glitch that I'm not sure how to fix. Here's the foreach loop from my validation ...
1
vote
2answers
1k views

Get the user type of an author

I'm working on a site and I need to get the type of user the author is so I can mark it. The idea is that if an Admin level user post something it has a [ADMIN] tag or something next to their name. I ...
0
votes
1answer
189 views

W3C validation errors (trailing slashes)

My site is throwing up a few errors typically due to trailing slashes being added. eg. wordpress is adding in: <meta name='robots' content='noindex,nofollow' /> my doctype is: ...
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 ...
0
votes
1answer
65 views

Where this validating message come from?

I wrote a simple form, including text field, textarea, select and some validating by WP_error. When I try to submit the form without filling text field or textarea, I got a popup tip pointing the ...
0
votes
3answers
108 views

How does WP decide how to evaluate database integrity

I've upgraded a handful of WPMU sites from 2.9 to WP3. I've never had problems with that process .. until today, when all of a sudden, one install tells me that the DB is missing some tables. The ...
0
votes
1answer
940 views

How to make custom comment fields required and message field not required

I have a comment form that has name, email, brief, detailed and rating fields. The name, email, brief and rating need to be required, but the latter two are custom fields and I can only make them ...
0
votes
1answer
211 views

WP calendar summary attribute validation error

When the calendar widget is activated in the sidebar, it generates the following validation error (W3C markup validation): The summary attribute is obsolete. Consider describing the structure of ...
2
votes
5answers
1k views

WordPress & W3C CSS Validation

I've played around with WordPress here and there for a few years and am wondering about problems with CSS validation with WordPress themes. This may seems like a stupid question, but: Is there a ...
0
votes
3answers
1k views

Can a shortcode included in post content add styles to the <head>?

I have a shortcode that iterates through a list of custom post types and, as part of displaying them, creates a block. In HTML5, it is illegal to have a style block outside the header (maybe in other ...
1
vote
1answer
636 views

Data sanitization for user registration and user login

What kinds of data sanitization I have to do if I make a front end login and registration system for wordpress users? For login function wp_signon() should I escape the data for possible sql ...
2
votes
2answers
2k views

How can I make post fields required in Wordpress?

I am setting up a Wordpress site as a CMS and trying to figure out a way to make certain post fields "required" before an author can publish a post. In particular, I want authors to be required to ...
1
vote
1answer
119 views

Data validation

I find Data Validation page on Codex a bit confusing. It highlights what all functions do but not how one differs from another and which one should be the right choice in a particular use case. Like ...
1
vote
1answer
182 views

New custom theme option (text input) giving index error

I am using the theme-options.php file from ThemeShaper: http://themeshaper.com/2010/06/03/sample-theme-options/ I can succesfully add new dropdown options, however when I add a new text input I ...
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
1answer
585 views

How can i add validation to this login form with out it redirecting to the wp-login.php page

Im using the code as posted on the website below, to create a hard coded login form. http://www.wprecipes.com/add-a-login-form-on-your-wordpress-theme What would be the best way of incorperating some ...
1
vote
1answer
982 views

Creating custom AJAX requests

My question pertains to where I should create an ajax function that I'd like to call from my page view. I am using a jQuery validator on a custom form that should check the inputted zipcode against ...
2
votes
3answers
422 views

wordpress widget textbox in the sidebar

I have a normal textbox widget that I am using in certain sidebars. The text widget generates a div within a ul. Is there anyway to make the widget generate another ul li instead? ...
2
votes
1answer
989 views

Server side validation for Contact Form 7 [closed]

I'm trying to use contact form 7 on my site. The only server side validation that it seems to do is check if required fields have been entered. Isn't there a danger if someone sends several MB of ...
1
vote
2answers
4k views

wordpress site validation errors

when I made my wordpress site validate I got some strange errors like Error Line 6, Column 52: Bad value profile for attribute rel on element link: Keyword profile is not registered. Error Line 12, ...