The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
4k views

How do I edit wp_head and/or functions.php to remove rss-feed which isnt used and dont validate?

When using w3.org's validation tool Unicorn I get the following error/warning: URI: http://energyshop.se/hem/feed/ This feed does not validate. After looking into my source its there crystal clear ...
0
votes
1answer
296 views

Wordpress live, custom text box validation, how to?

I am teaching British Sign Language on my website, on the alphabet section I have an image of 'signs' that spell out a word. Below I would like a text box that requires the user to input the correct ...
1
vote
2answers
485 views

How to use a newly registered setting with a checkbox and the default value 'true'

I'm currently working on a plugin in which I would like to have a new setting (called 'show_introduction') that has the default value 'true'. I did this by the following which is hooked into ...
0
votes
1answer
70 views

allow only lowercase user registrations

I'm trying to get allow only lowercase usernames are valid usernames in my wordpress blog. I managed to write a function but it does not seem to work. add_filter('validate_username' , 'simple_user', ...
5
votes
2answers
581 views

Require featured image

I would like to require a featured image on a site I am developing. I tried the code here: Make featured image required and nothing happened - the JS showed up in the site header, but I could still ...
0
votes
1answer
70 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 ...
1
vote
1answer
729 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
917 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
810 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
1k 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
98 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
249 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
57 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
34 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?
2
votes
1answer
114 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
46 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
505 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 ...
2
votes
3answers
1k 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
547 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
787 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
411 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
2k 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
299 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
904 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
110 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
366 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
456 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
386 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
105 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
400 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
292 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
592 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
201 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
845 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
69 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
110 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
1k 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
216 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
683 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
121 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
183 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 ...