本文整理匯總了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 . '`}';
}
}