WordPress.org

Make WordPress Core

Ticket #20151: 20151.3.diff

File 20151.3.diff, 2.6 KB (added by JasonM4563, 6 years ago)

reapplied changes into existing code and added some documentation

  • wp-includes/class-oembed.php

    diff --git a/wp-includes/class-oembed.php b/wp-includes/class-oembed.php
    index 363b7c9..381d3d0 100755
    a b class WP_oEmbed { 
    277277         * @return bool|object False on failure, otherwise the result in the form of an object.
    278278         */
    279279        public function fetch( $provider, $url, $args = '' ) {
    280                 $args = wp_parse_args( $args, wp_embed_defaults() );
     280                $args = wp_parse_args( $args, wp_embed_defaults( $url ) );
    281281
    282282                $provider = add_query_arg( 'maxwidth', (int) $args['width'], $provider );
    283283                $provider = add_query_arg( 'maxheight', (int) $args['height'], $provider );
  • wp-includes/comment-template.php

    diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
    index b3b1e2e..5ea4d5a 100755
    a b function comment_form( $args = array(), $post_id = null ) { 
    21002100                'cancel_reply_link'    => __( 'Cancel reply' ),
    21012101                'label_submit'         => __( 'Post Comment' ),
    21022102                'format'               => 'xhtml',
     2103                'tabindex'             => '',
    21032104        );
    21042105
    21052106        /**
    function comment_form( $args = array(), $post_id = null ) { 
    22152216                                                ?>
    22162217                                                <?php echo $args['comment_notes_after']; ?>
    22172218                                                <p class="form-submit">
    2218                                                         <input name="<?php echo esc_attr( $args['name_submit'] ); ?>" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
     2219                                                        <input name="<?php echo esc_attr( $args['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'] ); ?>" />
    22192220                                                        <?php comment_id_fields( $post_id ); ?>
    22202221                                                </p>
    22212222                                                <?php
  • wp-includes/media.php

    diff --git a/wp-includes/media.php b/wp-includes/media.php
    index 2edfc1a..533560b 100755
    a b function wp_embed_unregister_handler( $id, $priority = 10 ) { 
    20612061 *
    20622062 * @return array Default embed parameters.
    20632063 */
    2064 function wp_embed_defaults() {
     2064function wp_embed_defaults( $url = '' ) {
    20652065        if ( ! empty( $GLOBALS['content_width'] ) )
    20662066                $width = (int) $GLOBALS['content_width'];
    20672067
    function wp_embed_defaults() { 
    20772077         *
    20782078         * @param int $width  Width of the embed in pixels.
    20792079         * @param int $height Height of the embed in pixels.
     2080         * @param string $url URL of embed content.
    20802081         */
    2081         return apply_filters( 'embed_defaults', compact( 'width', 'height' ) );
     2082        return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url );
    20822083}
    20832084
    20842085/**