WP_Screen::get_help_tabs() WordPress Method

The WP_Screen::get_help_tabs() method allows you to get the help tabs associated with a given screen. This is useful for customizing the help tabs displayed on a screen.

WP_Screen::get_help_tabs() #

Gets the help tabs registered for the screen.


Return

(array) Help tabs with arguments.


Top ↑

Source

File: wp-admin/includes/class-wp-screen.php

	public function get_help_tabs() {
		$help_tabs = $this->_help_tabs;

		$priorities = array();
		foreach ( $help_tabs as $help_tab ) {
			if ( isset( $priorities[ $help_tab['priority'] ] ) ) {
				$priorities[ $help_tab['priority'] ][] = $help_tab;
			} else {
				$priorities[ $help_tab['priority'] ] = array( $help_tab );
			}
		}

		ksort( $priorities );

		$sorted = array();
		foreach ( $priorities as $list ) {
			foreach ( $list as $tab ) {
				$sorted[ $tab['id'] ] = $tab;
			}
		}

		return $sorted;
	}


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Help tabs are ordered by their priority.
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.