WordPress.org

Make WordPress Core

Ticket #35051: 35051.2.patch

File 35051.2.patch, 4.1 KB (added by afercia, 4 years ago)
  • src/wp-admin/includes/class-wp-ms-themes-list-table.php

     
    399399
    400400                if ( ! $allowed ) {
    401401                        if ( ! $theme->errors() ) {
    402                                 $actions['enable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=enable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'enable-theme_' . $stylesheet ) ) . '" title="' . esc_attr__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>';
     402                                /* translators: %s: theme name */
     403                                $actions['enable'] = '<a href="' . esc_url( wp_nonce_url( $url . 'action=enable&amp;theme=' . $theme_key . '&amp;paged=' . $page .
     404                                        '&amp;s=' . $s, 'enable-theme_' . $stylesheet ) ) . '" class="edit" aria-label="' .
     405                                        esc_attr( sprintf( ( $this->is_site_themes ? __( 'Enable %s' ) : __( 'Network Enable %s' ) ), $theme->display( 'Name' ) ) ) . '">' .
     406                                        ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>';
    403407                        }
    404408                } else {
    405                         $actions['disable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=disable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'disable-theme_' . $stylesheet ) ) . '" title="' . esc_attr__('Disable this theme') . '">' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>';
     409                        /* translators: %s: theme name */
     410                        $actions['disable'] = '<a href="' . esc_url( wp_nonce_url( $url . 'action=disable&amp;theme=' . $theme_key . '&amp;paged=' . $page .
     411                                '&amp;s=' . $s, 'disable-theme_' . $stylesheet ) ) . '" aria-label="' .
     412                                esc_attr( sprintf( ( $this->is_site_themes ? __( 'Disable %s' ) : __( 'Network Disable %s' ) ), $theme->display( 'Name' ) ) ) . '">' .
     413                                ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>';
    406414                }
    407415
    408416                if ( current_user_can('edit_themes') ) {
    409                         $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . $theme_key ) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';
     417                        /* translators: %s: theme name */
     418                        $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . $theme_key ) . '" class="edit" aria-label="' .
     419                                esc_attr( sprintf( __( 'Open %s in the Theme Editor' ), $theme->display( 'Name' ) ) ) . '">' . __( 'Edit' ) . '</a>';
    410420                }
    411421
    412422                if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) {
    413                         $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&amp;checked[]=' . $theme_key . '&amp;theme_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
     423                        /* translators: %s: theme name */
     424                        $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&amp;checked[]=' . $theme_key . '&amp;theme_status=' . $context .
     425                                '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-themes' ) ) . '" class="delete" aria-label="' .
     426                                esc_attr( sprintf( __( 'Delete %s' ), $theme->display( 'Name' ) ) ) . '">' . __( 'Delete' ) . '</a>';
    414427                }
    415428                /**
    416429                 * Filter the action links displayed for each theme in the Multisite
     
    495508                $theme_meta[] = sprintf( __( 'By %s' ), $theme->display('Author') );
    496509
    497510                if ( $theme->get('ThemeURI') ) {
    498                         $theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>';
     511                        /* translators: %s: theme name */
     512                        $theme_meta[] = '<a href="' . $theme->display( 'ThemeURI' ) . '" aria-label="' .
     513                                esc_attr( sprintf( __( 'Visit %s homepage' ), $theme->display( 'Name' ) ) ) . '">' . __( 'Visit Theme Site' ) . '</a>';
    499514                }
    500515                /**
    501516                 * Filter the array of row meta for each theme in the Multisite themes