Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



get_hidden_columns ›

Seit2.7.0
Veraltetn/v
get_hidden_columns ( $screen )
Parameter:
  • (string|WP_Screen) $screen The screen you want the hidden columns for
    Erforderlich: Ja
Gibt zurück:
  • (array)
Definiert in:
Codex:

Get a list of hidden columns.



Quellcode

function get_hidden_columns( $screen ) {
	if ( is_string( $screen ) ) {
		$screen = convert_to_screen( $screen );
	}

	$hidden = get_user_option( 'manage' . $screen->id . 'columnshidden' );

	$use_defaults = ! is_array( $hidden );

	if ( $use_defaults ) {
		$hidden = array();

		/**
		 * Filters the default list of hidden columns.
		 *
		 * @since 4.4.0
		 *
		 * @param array     $hidden An array of columns hidden by default.
		 * @param WP_Screen $screen WP_Screen object of the current screen.
		 */
		$hidden = apply_filters( 'default_hidden_columns', $hidden, $screen );
	}

	/**
	 * Filters the list of hidden columns.
	 *
	 * @since 4.4.0
	 * @since 4.4.1 Added the `use_defaults` parameter.
	 *
	 * @param array     $hidden An array of hidden columns.
	 * @param WP_Screen $screen WP_Screen object of the current screen.
	 * @param bool      $use_defaults Whether to show the default columns.
	 */
	return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults );
}