_get_admin_bar_pref

Private AccessPrivate Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

SummerySummery

Retrieve the admin bar display preference of a user.

Syntax

_get_admin_bar_pref( string $context = 'front', int $user )

ParametersParameters

$context

(string) (Optional) Context of this preference check. Defaults to 'front'. The 'admin' preference is no longer used.

Default value: 'front'

$user

(int) (Optional) ID of the user to check, defaults to 0 for current user.

ReturnReturn

(bool) Whether the admin bar should be showing for this user.

SourceSource

File: wp-includes/admin-bar.php


			

ChangelogChangelog

Changelog
Version Description
3.1.0 Introduced.
Scroll to Top