Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_get_admin_bar_pref [ WordPress Function ]

_get_admin_bar_pref ( $context = 'front', $user = 0 )
Access:
  • private
Parameters:
  • (string) $context Context of this preference check. Defaults to 'front'. The 'admin' preference is no longer used.
  • (int) $user Optional. ID of the user to check, defaults to 0 for current user.
Returns:
  • (bool) Whether the admin bar should be showing for this user.
Defined at:



Retrieve the admin bar display preference of a user.

Source


<?php
function _get_admin_bar_pref$context 'front'$user ) {
    
$pref get_user_option"show_admin_bar_{$context}"$user );
    if ( 
false === $pref )
        return 
true;

    return 
'true' === $pref;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics