Filter hook 'install_themes_nonmenu_tabs'

in WP Core File wp-admin/includes/class-wp-theme-install-list-table.php at line 82

View Source

install_themes_nonmenu_tabs

Filter Hook
Description
Filters tabs not associated with a menu item on the Install Themes screen.

Hook Information

File Location wp-admin/includes/class-wp-theme-install-list-table.php View on GitHub
Hook Type Filter
Line Number 82

Hook Parameters

Type Name Description
string[] $nonmenu_tabs The tabs that don't have a menu item on the Install Themes screen.

Usage Examples

Basic Usage
<?php
// Hook into install_themes_nonmenu_tabs
add_filter('install_themes_nonmenu_tabs', 'my_custom_filter', 10, 1);

function my_custom_filter($nonmenu_tabs) {
    // Your custom filtering logic here
    return $nonmenu_tabs;
}

Source Code Context

wp-admin/includes/class-wp-theme-install-list-table.php:82 - How this hook is used in WordPress core
<?php
  77  		 * @since 2.8.0
  78  		 *
  79  		 * @param string[] $nonmenu_tabs The tabs that don't have a menu item on
  80  		 *                               the Install Themes screen.
  81  		 */
  82  		$nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs );
  83  
  84  		// If a non-valid menu tab has been selected, And it's not a non-menu action.
  85  		if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs, true ) ) ) {
  86  			$tab = key( $tabs );
  87  		}

PHP Documentation

<?php
/**
		 * Filters tabs not associated with a menu item on the Install Themes screen.
		 *
		 * @since 2.8.0
		 *
		 * @param string[] $nonmenu_tabs The tabs that don't have a menu item on
		 *                               the Install Themes screen.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/class-wp-theme-install-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.