Ticket #20151: wp_embed_defaults.patch
File wp_embed_defaults.patch, 2.6 KB (added by , 13 years ago) |
---|
-
class-oembed.php
157 157 * @return bool|object False on failure, otherwise the result in the form of an object. 158 158 */ 159 159 function fetch( $provider, $url, $args = '' ) { 160 $args = wp_parse_args( $args, wp_embed_defaults( ) );160 $args = wp_parse_args( $args, wp_embed_defaults( $url ) ); 161 161 162 162 $provider = add_query_arg( 'maxwidth', (int) $args['width'], $provider ); 163 163 $provider = add_query_arg( 'maxheight', (int) $args['height'], $provider ); -
comment-template.php
1544 1544 'title_reply_to' => __( 'Leave a Reply to %s' ), 1545 1545 'cancel_reply_link' => __( 'Cancel reply' ), 1546 1546 'label_submit' => __( 'Post Comment' ), 1547 'tabindex' => '', 1547 1548 ); 1548 1549 1549 1550 $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); … … 1575 1576 <?php echo apply_filters( 'comment_form_field_comment', $args['comment_field'] ); ?> 1576 1577 <?php echo $args['comment_notes_after']; ?> 1577 1578 <p class="form-submit"> 1578 <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />1579 <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" tabindex="<?php echo esc_attr( $args['tabindex'] ); ?>" /> 1579 1580 <?php comment_id_fields( $post_id ); ?> 1580 1581 </p> 1581 1582 <?php do_action( 'comment_form', $post_id ); ?> -
media.php
1158 1158 return ''; 1159 1159 1160 1160 $rawattr = $attr; 1161 $attr = wp_parse_args( $attr, wp_embed_defaults( ) );1161 $attr = wp_parse_args( $attr, wp_embed_defaults( $url ) ); 1162 1162 1163 1163 // kses converts & into & and we need to undo this 1164 1164 // See http://core.trac.wordpress.org/ticket/11311 … … 1323 1323 * 1324 1324 * @return array Default embed parameters. 1325 1325 */ 1326 function wp_embed_defaults( ) {1326 function wp_embed_defaults( $url = '' ) { 1327 1327 if ( !empty($GLOBALS['content_width']) ) 1328 1328 $theme_width = (int) $GLOBALS['content_width']; 1329 1329 … … 1343 1343 return apply_filters( 'embed_defaults', array( 1344 1344 'width' => $width, 1345 1345 'height' => $height, 1346 ) );1346 ) , $url ); 1347 1347 } 1348 1348 1349 1349 /**