Changeset 47588
- Timestamp:
- 04/16/2020 05:00:58 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r47550 r47588 530 530 $actions['update-selected'] = __( 'Update' ); 531 531 } 532 532 533 if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) ) { 533 534 $actions['delete-selected'] = __( 'Delete' ); … … 621 622 622 623 list( $plugin_file, $plugin_data ) = $item; 623 $context = $status; 624 $screen = $this->screen; 624 625 $plugin_slug = isset( $plugin_data['slug'] ) ? $plugin_data['slug'] : sanitize_title( $plugin_data['Name'] ); 626 627 $context = $status; 628 $screen = $this->screen; 625 629 626 630 // Pre-order. … … 676 680 if ( current_user_can( 'manage_network_plugins' ) ) { 677 681 $actions['deactivate'] = sprintf( 678 '<a href="%s" aria-label="%s">%s</a>',682 '<a href="%s" id="deactivate-%s" aria-label="%s">%s</a>', 679 683 wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ), 684 esc_attr( $plugin_slug ), 680 685 /* translators: %s: Plugin name. */ 681 686 esc_attr( sprintf( _x( 'Network Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ), … … 686 691 if ( current_user_can( 'manage_network_plugins' ) ) { 687 692 $actions['activate'] = sprintf( 688 '<a href="%s" class="edit" aria-label="%s">%s</a>',693 '<a href="%s" id="activate-%s" class="edit" aria-label="%s">%s</a>', 689 694 wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ), 695 esc_attr( $plugin_slug ), 690 696 /* translators: %s: Plugin name. */ 691 697 esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ), … … 693 699 ); 694 700 } 701 695 702 if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) { 696 703 $actions['delete'] = sprintf( 697 '<a href="%s" class="delete" aria-label="%s">%s</a>',704 '<a href="%s" id="delete-%s" class="delete" aria-label="%s">%s</a>', 698 705 wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ), 706 esc_attr( $plugin_slug ), 699 707 /* translators: %s: Plugin name. */ 700 708 esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ), … … 715 723 if ( current_user_can( 'deactivate_plugin', $plugin_file ) ) { 716 724 $actions['deactivate'] = sprintf( 717 '<a href="%s" aria-label="%s">%s</a>',725 '<a href="%s" id="deactivate-%s" aria-label="%s">%s</a>', 718 726 wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ), 727 esc_attr( $plugin_slug ), 719 728 /* translators: %s: Plugin name. */ 720 729 esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ), … … 722 731 ); 723 732 } 733 724 734 if ( current_user_can( 'resume_plugin', $plugin_file ) && is_plugin_paused( $plugin_file ) ) { 725 735 $actions['resume'] = sprintf( 726 '<a class="resume-link" href="%s" aria-label="%s">%s</a>',736 '<a href="%s" id="resume-%s" class="resume-link" aria-label="%s">%s</a>', 727 737 wp_nonce_url( 'plugins.php?action=resume&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'resume-plugin_' . $plugin_file ), 738 esc_attr( $plugin_slug ), 728 739 /* translators: %s: Plugin name. */ 729 740 esc_attr( sprintf( _x( 'Resume %s', 'plugin' ), $plugin_data['Name'] ) ), … … 734 745 if ( current_user_can( 'activate_plugin', $plugin_file ) ) { 735 746 $actions['activate'] = sprintf( 736 '<a href="%s" class="edit" aria-label="%s">%s</a>',747 '<a href="%s" id="activate-%s" class="edit" aria-label="%s">%s</a>', 737 748 wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ), 749 esc_attr( $plugin_slug ), 738 750 /* translators: %s: Plugin name. */ 739 751 esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ), … … 744 756 if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) { 745 757 $actions['delete'] = sprintf( 746 '<a href="%s" class="delete" aria-label="%s">%s</a>',758 '<a href="%s" id="delete-%s" class="delete" aria-label="%s">%s</a>', 747 759 wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ), 760 esc_attr( $plugin_slug ), 748 761 /* translators: %s: Plugin name. */ 749 762 esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ), … … 861 874 } 862 875 863 $plugin_slug = isset( $plugin_data['slug'] ) ? $plugin_data['slug'] : sanitize_title( $plugin_name );864 876 printf( 865 877 '<tr class="%s" data-slug="%s" data-plugin="%s">',
Note: See TracChangeset
for help on using the changeset viewer.