Make WordPress Core

Ticket #63238: 63238.button-element.diff

File 63238.button-element.diff, 2.5 KB (added by sabernhardt, 5 months ago)

replaces links with buttons and updates elements in script

  • src/js/_enqueues/vendor/plupload/handlers.js

     
    420420                        target.parents( '.media-item' ).fadeOut( 200, function() {
    421421                                $( this ).remove();
    422422                        } );
    423                 } else if ( target.is( '.upload-flash-bypass a' ) || target.is( 'a.uploader-html' ) ) { // Switch uploader to html4.
     423                } else if ( target.is( '.upload-flash-bypass button' ) || target.is( 'a.uploader-html' ) ) { // Switch uploader to html4.
    424424                        $( '#media-items, p.submit, span.big-file-warning' ).css( 'display', 'none' );
    425425                        switchUploader( 0 );
    426426                        e.preventDefault();
    427                 } else if ( target.is( '.upload-html-bypass a' ) ) { // Switch uploader to multi-file.
     427                } else if ( target.is( '.upload-html-bypass button' ) ) { // Switch uploader to multi-file.
    428428                        $( '#media-items, p.submit, span.big-file-warning' ).css( 'display', '' );
    429429                        switchUploader( 1 );
    430430                        e.preventDefault();
  • src/wp-admin/includes/media.php

     
    30453045        <p class="upload-flash-bypass">
    30463046        <?php
    30473047                printf(
    3048                         /* translators: 1: URL to browser uploader, 2: Additional link attributes. */
    3049                         __( 'You are using the multi-file uploader. Problems? Try the <a href="%1$s" %2$s>browser uploader</a> instead.' ),
    3050                         $browser_uploader,
    3051                         'target="_blank"'
     3048                        /* translators: %s: HTML attributes for button. */
     3049                        __( 'You are using the multi-file uploader. Problems? Try the <button %s>browser uploader</button> instead.' ),
     3050                        'type="button" class="button-link"'
    30523051                );
    30533052        ?>
    30543053        </p>
     
    30633062function media_upload_html_bypass() {
    30643063        ?>
    30653064        <p class="upload-html-bypass hide-if-no-js">
    3066                 <?php _e( 'You are using the browser&#8217;s built-in file uploader. The WordPress uploader includes multiple file selection and drag and drop capability. <a href="#">Switch to the multi-file uploader</a>.' ); ?>
     3065        <?php
     3066                printf(
     3067                        /* translators: %s: HTML attributes for button. */
     3068                        __( 'You are using the browser&#8217;s built-in file uploader. The WordPress uploader includes multiple file selection and drag and drop capability. <button %s>Switch to the multi-file uploader</button>.' ),
     3069                        'type="button" class="button-link"'
     3070                );
     3071        ?>
    30673072        </p>
    30683073        <?php
    30693074}