[wp-trac] [WordPress Trac] #36755: Native oEmbed support on Custom Post Types produces Cross-site scripting errors or are not rendered at all.

WordPress Trac noreply at wordpress.org
Wed May 4 20:57:53 UTC 2016


#36755: Native oEmbed support on Custom Post Types produces Cross-site scripting
errors or are not rendered at all.
-------------------------------+------------------------------
 Reporter:  webdevmattcrom     |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  4.5.1
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by webdevmattcrom):

 Forgot the CPT code example:


 {{{
 function matt2016_register_promotion_post_type() {
     $labels = array(
         'name' => 'Promotions',
         'singular_name' => 'Promotion',
         'add_new' => 'Add New',
         'add_new_item' => 'Add New Promotion',
         'edit_item' => 'Edit Promotion',
         'new_item' => 'New Promotion',
         'view_item' => 'View Promotion',
         'search_items' => 'Search Promotions',
         'not_found' =>  'No Promotions found',
         'not_found_in_trash' => 'No Promotions found in trash',
         'parent_item_colon' => '',
         'menu_name' => 'Promotions'
     );

     $args = array(
         'labels' => $labels,
         'public' => true,
         'publicly_queryable' => true,
         'show_ui' => true,
         'show_in_menu' => true,
         'query_var' => true,
         'rewrite' => true,
         'capability_type' => 'post',
         'has_archive' => true,
         'hierarchical' => false,
         'menu_position' => 6.1,
         'menu_icon' => 'dashicons-star-empty',
         'supports' => array('title','thumbnail','excerpt','revisions',
 'editor')
     );

     register_post_type( 'promotion', $args );
 }

 add_action( 'init', 'matt2016_register_promotion_post_type' );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36755#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list