~canonical-sysadmins/wordpress/4.9.2

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-theme-install-list-table.php

  • Committer: Barry Price
  • Date: 2017-11-17 04:49:02 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: barry.price@canonical.com-20171117044902-5frux4ycbq6g9fyf
Merge WP4.9 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
        }
155
155
 
156
156
        /**
157
 
         * @access public
158
157
         */
159
158
        public function no_items() {
160
159
                _e( 'No themes match your request.' );
171
170
 
172
171
                $display_tabs = array();
173
172
                foreach ( (array) $tabs as $action => $text ) {
174
 
                        $class = ( $action === $tab ) ? ' class="current"' : '';
 
173
                        $current_link_attributes = ( $action === $tab ) ? ' class="current" aria-current="page"' : '';
175
174
                        $href = self_admin_url('theme-install.php?tab=' . $action);
176
 
                        $display_tabs['theme-install-'.$action] = "<a href='$href'$class>$text</a>";
 
175
                        $display_tabs['theme-install-'.$action] = "<a href='$href'$current_link_attributes>$text</a>";
177
176
                }
178
177
 
179
178
                return $display_tabs;
180
179
        }
181
180
 
182
181
        /**
183
 
         * @access public
184
182
         */
185
183
        public function display() {
186
184
                wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
209
207
        }
210
208
 
211
209
        /**
212
 
         * @access public
213
210
         */
214
211
        public function display_rows() {
215
212
                $themes = $this->items;
227
224
         * Prints a theme from the WordPress.org API.
228
225
         *
229
226
         * @since 3.1.0
230
 
         * @access public
231
227
         *
232
228
         * @global array $themes_allowedtags
233
229
         *
436
432
         * Send required variables to JavaScript land
437
433
         *
438
434
         * @since 3.4.0
439
 
         * @access public
440
435
         *
441
436
         * @global string $tab  Current tab within Themes->Install screen
442
437
         * @global string $type Type of search.
452
447
         * Check to see if the theme is already installed.
453
448
         *
454
449
         * @since 3.4.0
455
 
         * @access private
456
450
         *
457
451
         * @param object $theme - A WordPress.org Theme API object.
458
452
         * @return string Theme status.