WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/14/2018 01:49:46 AM (3 years ago)
Author:
jeremyfelt
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.

Merges [43790] and [43791] from the 5.0 branch to trunk.

Props desrosj, danielbachhuber, ocean90.
Fixes #45125.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/theme.php

    r43571 r44138  
    23192319 * @since 4.5.0 The `customize-selective-refresh-widgets` feature was added
    23202320 * @since 4.7.0 The `starter-content` feature was added
     2321 * @since 5.0.0 The `responsive-embeds` feature was added.
    23212322 *
    23222323 * @global array $_wp_theme_features
     
    23242325 * @param string $feature  The feature being added. Likely core values include 'post-formats',
    23252326 *                         'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads',
    2326  *                         'custom-header', 'custom-background', 'title-tag', 'starter-content', etc.
     2327 *                         'custom-header', 'custom-background', 'title-tag', 'starter-content',
     2328 *                         'responsive-embeds', etc.
    23272329 * @param mixed  $args,... Optional extra arguments to pass along with certain features.
    23282330 * @return void|bool False on failure, void otherwise.
Note: See TracChangeset for help on using the changeset viewer.