WordPress.org

Make WordPress Core

Ticket #35429: 35429.diff

File 35429.diff, 6.7 KB (added by Ipstenu, 18 months ago)
  • wp-admin/css/themes.css

     
    10691069} 
    10701070 
    10711071.theme-install-php a.upload, 
    1072 .theme-install-php a.browse-themes { 
     1072.theme-install-php a.browse-themes, 
     1073.theme-install-php a.browse-plugins { 
    10731074        cursor: pointer; 
    10741075} 
    10751076.theme-install-php a.browse-themes, 
    1076 .theme-install-php.show-upload-theme a.upload { 
     1077.theme-install-php.show-upload-theme a.upload, 
     1078.plugin-install-php a.browse-plugins, 
     1079.plugin-install-php.show-upload-plugin a.upload { 
    10771080        display: none; 
    10781081} 
    1079 .theme-install-php.show-upload-theme a.browse-themes { 
     1082.theme-install-php.show-upload-theme a.browse-themes, 
     1083.plugin-install-php.show-upload-plugin a.browse-plugins { 
    10801084        display: inline; 
    10811085} 
    10821086.upload-theme, 
     
    10931097        top: 10px; 
    10941098} 
    10951099body.show-upload-theme .upload-theme, 
    1096 .upload-plugin { 
     1100body.show-upload-plugin .upload-plugin { 
    10971101        display: block; 
    10981102} 
     1103 
    10991104.upload-theme .wp-upload-form, 
    11001105.upload-plugin .wp-upload-form { 
    11011106        background: #fafafa; 
  • wp-admin/includes/plugin-install.php

     
    210210 */ 
    211211function install_dashboard() { 
    212212        ?> 
    213         <p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format via <a href="%2$s">this page</a>.' ), 'https://wordpress.org/plugins/', self_admin_url( 'plugin-install.php?tab=upload' ) ); ?></p> 
     213        <p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format via the Upload link in the upper left.' ), 'https://wordpress.org/plugins/' ); ?></p> 
    214214 
    215215        <?php display_plugins_table(); ?> 
    216216 
  • wp-admin/plugin-install.php

     
    100100include(ABSPATH . 'wp-admin/admin-header.php'); 
    101101?> 
    102102<div class="wrap"> 
    103 <h1> 
    104         <?php 
     103        <h1><?php 
    105104        echo esc_html( $title ); 
     105 
    106106        if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) { 
    107                 if ( $tab === 'upload' ) { 
    108                         $href = self_admin_url( 'plugin-install.php' ); 
    109                         $text = _x( 'Browse', 'plugins' ); 
    110                 } else { 
    111                         $href = self_admin_url( 'plugin-install.php?tab=upload' ); 
    112                         $text = __( 'Upload Plugin' ); 
    113                 } 
    114                 echo ' <a href="' . $href . '" class="upload page-title-action">' . $text . '</a>'; 
    115         } 
    116         ?> 
    117 </h1> 
     107                echo ' <a href="#" class="upload page-title-action">' . __( 'Upload Plugin' ) . '</a>'; 
     108                echo ' <a href="#" class="browse-plugins page-title-action">' . _x( 'Browse', 'plugins' ) . '</a>'; 
     109        }  
     110        ?></h1> 
    118111 
    119 <?php 
    120 if ( $tab !== 'upload' ) { 
     112        <div class="upload-plugin"> 
     113        <?php install_plugins_upload(); ?> 
     114        </div> 
     115 
     116        <?php 
    121117        $wp_list_table->views(); 
    122118        echo '<br class="clear" />'; 
    123 } 
    124  
    125 /** 
    126  * Fires after the plugins list table in each tab of the Install Plugins screen. 
    127  * 
    128  * The dynamic portion of the action hook, `$tab`, allows for targeting 
    129  * individual tabs, for instance 'install_plugins_plugin-information'. 
    130  * 
    131  * @since 2.7.0 
    132  * 
    133  * @param int $paged The current page number of the plugins list table. 
    134  */ 
    135 do_action( "install_plugins_$tab", $paged ); ?> 
     119         
     120        /** 
     121         * Fires after the plugins list table in each tab of the Install Plugins screen. 
     122         * 
     123         * The dynamic portion of the action hook, `$tab`, allows for targeting 
     124         * individual tabs, for instance 'install_plugins_plugin-information'. 
     125         * 
     126         * @since 2.7.0 
     127         * 
     128         * @param int $paged The current page number of the plugins list table. 
     129         */ 
     130        do_action( "install_plugins_$tab", $paged ); ?> 
    136131</div> 
    137132 
    138133<?php 
  • wp-admin/js/updates.js

     
    469469                } 
    470470        }; 
    471471 
     472        /** 
     473         * Changes body class to show or hide the appropriate plugin upload buttons. 
     474         * 
     475         * @since 4.5.0 
     476         */ 
    472477 
     478        wp.updates.showuploader = function() { 
     479                $( 'a.upload' ).on( 'click', function( event ) { 
     480                        event.preventDefault(); 
     481                        $( 'body' ).addClass( 'show-upload-plugin' ); 
     482                }); 
     483                $( 'a.browse-plugins' ).on( 'click', function( event ) { 
     484                        event.preventDefault(); 
     485                        $( 'body' ).removeClass( 'show-upload-plugin' ); 
     486                }); 
     487 
     488        }; 
     489 
    473490        $( document ).ready( function() { 
    474491                /* 
    475492                 * Check whether a user needs to submit filesystem credentials based on whether 
     
    507524                $( '#request-filesystem-credentials-dialog input[name="connection_type"]' ).on( 'change', function() { 
    508525                        $( this ).parents( 'form' ).find( '#private_key, #public_key' ).parents( 'label' ).toggle( ( 'ssh' == $( this ).val() ) ); 
    509526                }).change(); 
     527         
     528                // Allow the uploader to show on click 
     529                wp.updates.showuploader(); 
    510530 
    511531                // Click handler for plugin updates in List Table view. 
    512532                $( '.plugin-update-tr' ).on( 'click', '.update-link', function( e ) { 
  • wp-admin/plugins.php

     
    372372'content'       => 
    373373        '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' . 
    374374        '<p>' . sprintf( 
    375                 /* translators: 1: Plugin Browser/Installer URL, 2: WordPress Plugin Directory URL 3: local plugin directory */ 
    376                 __( 'You can find additional plugins for your site by using the <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a> directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your %3$s directory. Once a plugin has been installed, you can activate it here.' ), 
    377                 'plugin-install.php', 
    378                 'https://wordpress.org/plugins/', 
    379                 '<code>/wp-content/plugins</code>' 
     375                /* translators: 1: WordPress Plugin Directory URL */ 
     376                __('If you would like to see more plugins to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional plugins from the <a href="%s" target="_blank">WordPress.org Plugin Directory</a>. Plugins in the WordPress.org Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!'), 
     377                'https://wordpress.org/plugins/' 
    380378        ) . '</p>' 
    381379) ); 
    382380get_current_screen()->add_help_tab( array(