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
143      /**
144       * Filters the tabs shown on the Add Themes screen.
145       *
146       * This filter is for backward compatibility only, for the suppression of the upload tab.
147       *
148       * @since 2.8.0
149       *
150       * @param string[] $tabs Associative array of the tabs shown on the Add Themes screen. Default is 'upload'.
151       */
152      $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );
153      if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) {
154           echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js" aria-expanded="false">' . __( 'Upload Theme' ) . '</button>';
155      }
156      ?>
157
158      <hr class="wp-header-end">
159
160      <div class="error hide-if-js">
161           <p><?php _e( 'The Theme Installer screen requires JavaScript.' ); ?></p>