Make WordPress Core

Ticket #38084: 38084.patch

File 38084.patch, 6.3 KB (added by turtlepod, 8 years ago)
  • wp-admin/css/common.css

     
    14121412}
    14131413
    14141414.update-message p:before,
     1415.update-message-no-package p:before,
    14151416.updating-message p:before,
    14161417.updated-message p:before,
    14171418.import-php .updating-message:before,
     
    14361437
    14371438/* Update icon. */
    14381439.update-message p:before,
     1440.update-message-no-package p:before,
    14391441.updating-message p:before,
    14401442.import-php .updating-message:before,
    14411443.button.updating-message:before,
  • wp-admin/includes/theme.php

     
    561561                }
    562562
    563563                $prepared_themes[ $slug ] = array(
    564                         'id'           => $slug,
    565                         'name'         => $theme->display( 'Name' ),
    566                         'screenshot'   => array( $theme->get_screenshot() ), // @todo multiple
    567                         'description'  => $theme->display( 'Description' ),
    568                         'author'       => $theme->display( 'Author', false, true ),
    569                         'authorAndUri' => $theme->display( 'Author' ),
    570                         'version'      => $theme->display( 'Version' ),
    571                         'tags'         => $theme->display( 'Tags' ),
    572                         'parent'       => $parent,
    573                         'active'       => $slug === $current_theme,
    574                         'hasUpdate'    => isset( $updates[ $slug ] ),
    575                         'update'       => get_theme_update_available( $theme ),
    576                         'actions'      => array(
     564                        'id'               => $slug,
     565                        'name'             => $theme->display( 'Name' ),
     566                        'screenshot'       => array( $theme->get_screenshot() ), // @todo multiple
     567                        'description'      => $theme->display( 'Description' ),
     568                        'author'           => $theme->display( 'Author', false, true ),
     569                        'authorAndUri'     => $theme->display( 'Author' ),
     570                        'version'          => $theme->display( 'Version' ),
     571                        'tags'             => $theme->display( 'Tags' ),
     572                        'parent'           => $parent,
     573                        'active'           => $slug === $current_theme,
     574                        'hasUpdate'        => isset( $updates[ $slug ] ),
     575                        'hasUpdatePackage' => isset( $updates[ $slug ]['package'] ) && !empty( $updates[ $slug ]['package'] ),
     576                        'update'           => get_theme_update_available( $theme ),
     577                        'actions'          => array(
    577578                                'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
    578579                                'customize' => $customize_action,
    579580                                'delete'   => current_user_can( 'delete_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null,
  • wp-admin/themes.php

     
    250250                <div class="theme-screenshot blank"></div>
    251251        <?php } ?>
    252252
    253         <?php if ( $theme['hasUpdate'] ) : ?>
     253        <?php if ( $theme['hasUpdate'] && $theme['hasUpdatePackage'] ) : ?>
    254254                <div class="update-message notice inline notice-warning notice-alt">
    255255                        <p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p>
    256256                </div>
     257        <?php elseif( $theme['hasUpdate'] ) : ?>
     258                <div class="update-message-no-package notice inline notice-warning notice-alt">
     259                        <p><?php _e( 'New version available.' ); ?></p>
     260                </div>
    257261        <?php endif; ?>
    258262
    259263        <span class="more-details" id="<?php echo $aria_action; ?>"><?php _e( 'Theme Details' ); ?></span>
     
    377381                <div class="theme-screenshot blank"></div>
    378382        <# } #>
    379383
    380         <# if ( data.hasUpdate ) { #>
     384        <# if ( data.hasUpdate && data.hasUpdatePackage ) { #>
    381385                <div class="update-message notice inline notice-warning notice-alt"><p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p></div>
     386        <# } else if( data.hasUpdate ) { #>
     387                <div class="update-message-no-package notice inline notice-warning notice-alt"><p><?php _e( 'New version available.' ); ?></p></div>
    382388        <# } #>
    383389
    384390        <span class="more-details" id="{{ data.id }}-action"><?php _e( 'Theme Details' ); ?></span>
  • wp-admin/update-core.php

     
    294294                ?>
    295295                <tr>
    296296                        <td class="check-column">
    297                                 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
    298                                 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"><?php
    299                                         /* translators: %s: plugin name */
    300                                         printf( __( 'Select %s' ),
    301                                                 $plugin_data->Name
    302                                         );
    303                                 ?></label>
     297                                <?php if( isset( $plugin_data->update->package ) && !empty( $plugin_data->update->package ) ){ ?>
     298                                        <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
     299                                        <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"><?php
     300                                                /* translators: %s: plugin name */
     301                                                printf( __( 'Select %s' ),
     302                                                        $plugin_data->Name
     303                                                );
     304                                        ?></label>
     305                                <?php } ?>
    304306                        </td>
    305307                        <td class="plugin-title"><p>
    306308                                <strong><?php echo $plugin_data->Name; ?></strong>
     
    365367                ?>
    366368                <tr>
    367369                        <td class="check-column">
    368                                 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
    369                                 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"><?php
    370                                         /* translators: %s: theme name */
    371                                         printf( __( 'Select %s' ),
    372                                                 $theme->display( 'Name' )
    373                                         );
    374                                 ?></label>
     370                                <?php if( isset( $theme->update['package'] ) && !empty( $theme->update['package'] ) ){ ?>
     371                                        <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
     372                                        <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"><?php
     373                                                /* translators: %s: theme name */
     374                                                printf( __( 'Select %s' ),
     375                                                        $theme->display( 'Name' )
     376                                                );
     377                                        ?></label>
     378                                <?php } ?>
    375379                        </td>
    376380                        <td class="plugin-title"><p>
    377381                                <img src="<?php echo esc_url( $theme->get_screenshot() ); ?>" width="85" height="64" class="updates-table-screenshot" alt="" />