Make WordPress Core


Ignore:
Timestamp:
09/30/2017 01:14:34 AM (7 years ago)
Author:
westonruter
Message:

Embeds: Cache oEmbeds in an oembed_cache custom post type instead of postmeta when there is no global $post.

Add processing of embeds to rich Text widget.

Props swissspidy, westonruter, ocean90, johnbillion.
See #40854, #39994, #40935.
Fixes #34115.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r41642 r41651  
    194194            'read_private_posts' => 'customize',
    195195        ),
     196    ) );
     197
     198    register_post_type( 'oembed_cache', array(
     199        'labels' => array(
     200            'name'          => __( 'oEmbed Responses' ),
     201            'singular_name' => __( 'oEmbed Response' ),
     202        ),
     203        'public'           => false,
     204        'hierarchical'     => false,
     205        'rewrite'          => false,
     206        'query_var'        => false,
     207        'delete_with_user' => false,
     208        'can_export'       => false,
     209        '_builtin'         => true, /* internal use only. don't use this when registering your own post type. */
     210        'supports'         => array(),
    196211    ) );
    197212
     
    30043019 *     @type array  $post_category         Array of category names, slugs, or IDs.
    30053020 *                                         Defaults to value of the 'default_category' option.
    3006  *     @type array  $tags_input            Array of tag names, slugs, or IDs. Default empty. 
     3021 *     @type array  $tags_input            Array of tag names, slugs, or IDs. Default empty.
    30073022 *     @type array  $tax_input             Array of taxonomy terms keyed by their taxonomy name. Default empty.
    30083023 *     @type array  $meta_input            Array of post meta values keyed by their post meta key. Default empty.
Note: See TracChangeset for help on using the changeset viewer.