Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: install_themes_tabs

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
169      /**
170       * Filters the tabs shown on the Add Themes screen.
171       *
172       * This filter is for backward compatibility only, for the suppression of the upload tab.
173       *
174       * @since 2.8.0
175       *
176       * @param string[] $tabs Associative array of the tabs shown on the Add Themes screen. Default is 'upload'.
177       */
178      $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );
179      if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) {
180           echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js" aria-expanded="false">' . __( 'Upload Theme' ) . '</button>';
181      }
182      ?>
183
184      <hr class="wp-header-end">
185
186      <div class="error hide-if-js">
187           <p><?php _e( 'The Theme Installer screen requires JavaScript.' ); ?></p>