WordPress.org

Make WordPress Core

Changeset 44525


Ignore:
Timestamp:
01/09/2019 08:43:57 PM (7 days ago)
Author:
flixos90
Message:

Bootstrap/Load: Fix missing object argument for singular capability checks and support capability tests overlooked in [44524].

See #44458.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r44524 r44525  
    660660                        'network_active' => __( 'Network Active' ),
    661661                    );
    662                     if ( ! $restrict_network_only && current_user_can( 'resume_plugin' ) && is_plugin_paused( $plugin_file ) ) {
     662                    if ( ! $restrict_network_only && current_user_can( 'resume_plugin', $plugin_file ) && is_plugin_paused( $plugin_file ) ) {
    663663                        /* translators: %s: plugin name */
    664664                        $actions['resume'] = '<a class="resume-link" href="' . wp_nonce_url( 'plugins.php?action=resume&amp;plugin=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'resume-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Resume %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Resume' ) . '</a>';
     
    673673                        $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
    674674                    }
    675                     if ( current_user_can( 'resume_plugin' ) && is_plugin_paused( $plugin_file ) ) {
     675                    if ( current_user_can( 'resume_plugin', $plugin_file ) && is_plugin_paused( $plugin_file ) ) {
    676676                        /* translators: %s: plugin name */
    677677                        $actions['resume'] = '<a class="resume-link" href="' . wp_nonce_url( 'plugins.php?action=resume&amp;plugin=' . urlencode( $plugin_file ) . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'resume-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Resume %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Resume' ) . '</a>';
  • trunk/tests/phpunit/tests/user/capabilities.php

    r44146 r44525  
    258258            'erase_others_personal_data'  => array( 'administrator' ),
    259259            'manage_privacy_options'      => array( 'administrator' ),
     260            'resume_themes'               => array( 'administrator' ),
    260261
    261262            'edit_categories'             => array( 'administrator', 'editor' ),
     
    297298            'delete_site'                 => array( 'administrator' ),
    298299            'add_users'                   => array( 'administrator' ),
     300            'resume_themes'               => array( 'administrator' ),
    299301
    300302            'edit_categories'             => array( 'administrator', 'editor' ),
     
    455457            $expected['activate_plugin'],
    456458            $expected['deactivate_plugin'],
     459            $expected['resume_plugin'],
    457460            $expected['remove_user'],
    458461            $expected['promote_user'],
Note: See TracChangeset for help on using the changeset viewer.