本文整理汇总了PHP中WPBMap::settings方法的典型用法代码示例。如果您正苦于以下问题:PHP WPBMap::settings方法的具体用法?PHP WPBMap::settings怎么用?PHP WPBMap::settings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WPBMap
的用法示例。
在下文中一共展示了WPBMap::settings方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSettings
public static function getSettings()
{
global $current_user;
if (self::$settings === null) {
if (function_exists('get_currentuserinfo')) {
get_currentuserinfo();
/** @var $settings - get use group access rules */
if (!empty($current_user->roles)) {
self::$user_role = $current_user->roles[0];
} else {
self::$user_role = 'author';
}
} else {
self::$user_role = 'author';
}
self::$settings = WPBakeryVisualComposerSettings::get('groups_access_rules');
}
return self::$settings;
}
示例2: getSettings
/**
* Gets user role and access rules for current user.
*
* @static
* @return mixed
*/
protected static function getSettings()
{
global $current_user;
if (self::$settings === null) {
if (function_exists('get_currentuserinfo')) {
get_currentuserinfo();
/** @var Vc_Settings $settings - get use group access rules */
if (!empty($current_user->roles)) {
self::$user_role = $current_user->roles[0];
} else {
self::$user_role = 'author';
}
} else {
self::$user_role = 'author';
}
self::$settings = vc_settings()->get('groups_access_rules');
}
return self::$settings;
}
示例3: getSettings
/**
* Gets user role and access rules for current user.
*
* @static
* @return mixed
*/
protected static function getSettings()
{
global $current_user;
// @todo fix_roles? what is this and why it is inside class-wpb-map?
if (null !== self::$settings) {
if (function_exists('get_currentuserinfo')) {
get_currentuserinfo();
/** @var Vc_Settings $settings - get use group access rules */
if (!empty($current_user->roles)) {
self::$user_role = $current_user->roles[0];
} else {
self::$user_role = 'author';
}
} else {
self::$user_role = 'author';
}
self::$settings = vc_settings()->get('groups_access_rules');
}
return self::$settings;
}