本文整理汇总了PHP中pb_backupbuddy::_settings方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::_settings方法的具体用法?PHP pb_backupbuddy::_settings怎么用?PHP pb_backupbuddy::_settings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pb_backupbuddy
的用法示例。
在下文中一共展示了pb_backupbuddy::_settings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: settings
public static function settings($type)
{
//if ( !self::blank( @self::$_settings[$type] ) ) { // Return value if it already exists.
if (isset(self::$_settings[$type])) {
return self::$_settings[$type];
}
// The variable does not exist so check to see if it can be extracted from the plugin's header.
//if ( self::blank( @self::$_settings['name'] ) ) {
if (!isset(self::$_settings['name']) || self::$_settings['name'] == '') {
if (!function_exists('get_plugin_data')) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$info = array_change_key_case(get_plugin_data(self::$_plugin_path . '/' . pb_backupbuddy::settings('init'), false, false), CASE_LOWER);
$info['url'] = $info['pluginuri'];
unset($info['pluginuri']);
self::$_settings = array_merge(self::$_settings, $info);
}
// Try to return setting otherwise throw an error.
if (isset(self::$_settings[$type])) {
return self::$_settings[$type];
} else {
return '{Unknown settings() variable `' . $type . '`}';
}
}