Make WordPress Core


Ignore:
Timestamp:
10/22/2018 07:57:07 PM (6 years ago)
Author:
danielbachhuber
Message:

Themes: Introduce responsive embeds support.

Responsive embeds is a way for a theme to opt in to WordPress dynamically scaling the width/height of an embed. When a theme supports responsive embeds, a wp-embed-responsive class is added to the <body> tag. This information is also presented through the REST API for clients to respect.

Props desrosj.
Fixes #45125.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/theme.php

    r43040 r43790  
    22112211 * @since 4.5.0 The `customize-selective-refresh-widgets` feature was added
    22122212 * @since 4.7.0 The `starter-content` feature was added
     2213 * @since 5.0.0 The `responsive-embeds` feature was added.
    22132214 *
    22142215 * @global array $_wp_theme_features
     
    22162217 * @param string $feature  The feature being added. Likely core values include 'post-formats',
    22172218 *                         'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads',
    2218  *                         'custom-header', 'custom-background', 'title-tag', 'starter-content', etc.
     2219 *                         'custom-header', 'custom-background', 'title-tag', 'starter-content',
     2220 *                         'responsive-embeds/', etc.
    22192221 * @param mixed  $args,... Optional extra arguments to pass along with certain features.
    22202222 * @return void|bool False on failure, void otherwise.
Note: See TracChangeset for help on using the changeset viewer.