WPDev.one
Core Function
View Source on Trac ↗

_get_admin_bar_pref()

_get_admin_bar_pref( mixed $context = 'front', mixed $user = 0 )

Retrieves the admin bar display preference of a user.

Parameters 1 required

Name / Type Description
string

$context Context of this preference check. Defaults to 'front'. The 'admin' preference is no longer used.

Required
$user
int

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

Return Value

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

Function Information

Since Version
3.1.0
Source File
wp-includes/admin-bar.php
Advertisement