Forum Replies Created
-
AuthorPosts
-
SteveKeymaster@cotswoldphoto– That’s the first time this has been reported. It might be a plugin conflict. We can research this for you.
-Go to Tools
-Helpers
-Develop Tab
-Check “Show System Information” and save.
-Tools, again
-System
-Copy that block of data and email to us at: [email protected]We will check and see if there is a plugin conflict.
SteveKeymaster@cotswoldphoto– Do you have the Piklist Demos turned on? If so, turn them off at Piklist > Add-ons >
August 11, 2014 at 11:32 am in reply to: Custom Post Types saving a field to the list of custom post types #2204
SteveKeymasterPerfect. Closing ticket.
SteveKeymasterThe docs have been updated, and a link to the docs page will be in the add-ons as well.
August 11, 2014 at 9:37 am in reply to: Custom Post Types saving a field to the list of custom post types #2200
SteveKeymaster@tuckerjoenz– When you’re registering your post type you are not adding support for the title. With no title, WordPress will automatically add “Auto Draft”.
Add support for a title:
,'supports' => array( 'author' ,'revisions' ,'title' )
SteveKeymasterThanks, @marcus. This will be removed in the next version.
SteveKeymasterThanks for the feedback, everyone. HTML validation will be removed from the next version of Piklist. If you want to Sanitize an input for allowed HTML, then use the built-in sanitization rule wp_kses_post.
SteveKeymaster@jason– Piklist uses a regular expression to validate, and apparently it’s not correct.
But another thought is whether or not this is needed. Do you need to validate HTML, or do you want to SANITIZE it? Piklist already includes the ability to sanitize using wp_kses_post.
Should we pull HTML validation from Piklist and leave the sanitization?
SteveKeymaster@ianmuscat– Just wanted to let you know we are looking into this.
SteveKeymasterGreat! Closing ticket.
SteveKeymaster@tuckerjoenz– You have a few parameters that are conflicting with each other.
Status: This determines which post statuses the box shows on. You currently have it set to: published,prequote,repair-quote. Is this what you want?
New: Only show on creation of new post.If you don’t want these features, you can just remove the parameters all together.
SteveKeymaster@jason– Since you’re validating with Regex, it’s even simpler:
add_filter('piklist_validation_rules', 'validate_youtube_url', 11); function validate_youtube_url() { $validation_rules = array( 'youtube-url' => array( 'rule' => "/^https?:\/\/(www.)?youtu(be\.com|\.be)\/(watch\?v=)?([[:alnum:]_-]+)$/" ,'message' => __('Unrecognized youtube url') ) ); return $validation_rules; }and your field:
piklist('field', array( 'description' => 'Paste either the page or short url', 'type' => 'text', 'field' => 'design-video', 'label' => 'Video Url', 'columns' => 12, 'validate' => array( array( 'type' => 'youtube-url', ) ) )); -
AuthorPosts