WordPress.org

Make WordPress Core

Changeset 23972


Ignore:
Timestamp:
04/11/2013 11:06:15 PM (8 years ago)
Author:
lancewillett
Message:

Twenty Thirteen: adjust content_width value for video shortcodes in video post formats and on attachment templates. See #23955, props obenland.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentythirteen/functions.php

    r23899 r23972  
    525525
    526526/**
    527  * Adjusts content_width value for image post formats, video post formats, and
    528  * image attachment templates.
    529  *
    530  * @since Twenty Thirteen 1.0
     527 * Adjusts content_width value for video post formats and attachment templates.
     528 *
     529 * @since Twenty Thirteen 1.0
     530 *
     531 * @return void
    531532 */
    532533function twentythirteen_content_width() {
     
    539540
    540541/**
     542 * Adjusts content_width value for video shortcodes in video post formats.
     543 *
     544 * @since Twenty Thirteen 1.0
     545 *
     546 * @param array $atts Attribute list.
     547 * @return array Filtered attribute list.
     548 */
     549function twentythirteen_video_width( $atts ) {
     550    if ( has_post_format( 'video' ) )
     551        $atts['width'] = 724;
     552
     553    return $atts;
     554}
     555add_action( 'embed_defaults',       'twentythirteen_video_width' );
     556add_action( 'shortcode_atts_video', 'twentythirteen_video_width' );
     557
     558/**
    541559 * Adds entry date to aside posts after the content.
    542560 *
Note: See TracChangeset for help on using the changeset viewer.