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
114      /**
115       * Filter the tabs shown on the Add Themes screen.
116       *
117       * This filter is for backwards compatibility only,
118       * for the suppression of the upload tab.
119       *
120       * @since 2.8.0
121       * @param array $tabs The tabs shown on the Add Themes screen. Default is 'upload'.
122       */
123      $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );
124      if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) {
125           echo ' <a href="#" class="upload add-new-h2">' . __( 'Upload Theme' ) . '</a>';
126           echo ' <a href="#" class="browse-themes add-new-h2">' . _x( 'Browse', 'themes' ) . '</a>';
127      }
128      ?></h2>
129
130      <div class="upload-theme">
131      <?php install_themes_upload(); ?>
132      </div>