wp_filter_kses allow HTML5 video?

Ok This Thread did helped me a LOT! So now my function works (i can embeld HTML5 videos) and it looks like this: function validate_setting($plugin_options){ global $allowedtags; $allowedtags = array( ‘a’ => array( ‘href’ => array (), ‘title’ => array ()), ‘b’ => array( ‘style’=> array(), ), ); $allowedtags[‘video’] = array( ‘width’ => true, ‘height’ … Read more

Select Menu for Custom post Type does not save

This is a javascript issue. on line 52: $ret .= ‘<script>jQuery(document).ready(function(){ jQuery(“#videotype”).val(‘ . get_video_field(“videotype”) . ‘) });</script></div>’; In this specific bit: .val(‘ . get_video_field(“videotype”) . ‘) The value isn’t quoted, so it’s trying to reference a variable named youtube or vimeo, which doesn’t exist, instead of a literal text value. If you add quotes it’ll … Read more

Search results in custom template

You need to declare the variable as global in resources-search.php: <?php global $YearList; // Rest of file… May I ask why you’re hardcoding the years, instead of… $YearList = range( 2000, 2013 ); $YearList = range( 2000, date( ‘Y’ ) ); // From 2000 to current year

Limit length of headline in Editor

You could add this function : add_action(‘publish_post’, ‘wpse_105297_max_char’); function wpse_105297_max_char() { global $post; $title = $post->post_title; if (strlen($title) >= 100 ) wp_die( “The max lenght is 100 for title” ); } This will prevent users from using too much longer titles.

Unable to convert all css and js features to WP theme

I prefer changing all: <?php bloginfo(‘template_url’); ?> and <?php bloginfo(‘stylesheet_directory’); ?> into: <?php echo get_template_directory_uri(); ?> For connection to default style.css I prefer to change: <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/105303/<?php bloginfo(“stylesheet_url’); ?>” type=”text/css”> into: <link rel=”stylesheet” type=”text/css” media=”all” href=”https://wordpress.stackexchange.com/questions/105303/<?php bloginfo(“stylesheet_url’ ); ?>” /> I found no script type is defined in any of the scripts: <script src=”https://wordpress.stackexchange.com/questions/105303/<?php … Read more