本文整理匯總了PHP中SucomUtil::get_lib_stub_action方法的典型用法代碼示例。如果您正苦於以下問題:PHP SucomUtil::get_lib_stub_action方法的具體用法?PHP SucomUtil::get_lib_stub_action怎麽用?PHP SucomUtil::get_lib_stub_action使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SucomUtil
的用法示例。
在下文中一共展示了SucomUtil::get_lib_stub_action方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: filter_status_gpl_features
public function filter_status_gpl_features($features, $lca, $info)
{
foreach ($info['lib']['gpl'] as $sub => $libs) {
if ($sub === 'admin') {
// skip status for admin menus and tabs
continue;
}
foreach ($libs as $id_key => $label) {
list($id, $stub, $action) = SucomUtil::get_lib_stub_action($id_key);
$classname = SucomUtil::sanitize_classname('wpssojsongpl' . $sub . $id, false);
// $underscore = false
$features[$label] = array('status' => class_exists($classname) ? 'on' : 'off');
}
}
return $this->filter_common_status_features($features, $lca, $info);
}
示例2: wpsso_init_options
public function wpsso_init_options()
{
if (method_exists('Wpsso', 'get_instance')) {
$this->p =& Wpsso::get_instance();
} else {
$this->p =& $GLOBALS['wpsso'];
}
if ($this->p->debug->enabled) {
$this->p->debug->mark();
}
if (self::$have_min === false) {
return;
}
// stop here
$this->p->is_avail['json'] = true;
foreach (array('gpl', 'pro') as $lib) {
foreach (array('head', 'prop') as $sub) {
if (!isset(WpssoJsonConfig::$cf['plugin']['wpssojson']['lib'][$lib][$sub]) || !is_array(WpssoJsonConfig::$cf['plugin']['wpssojson']['lib'][$lib][$sub])) {
continue;
}
foreach (WpssoJsonConfig::$cf['plugin']['wpssojson']['lib'][$lib][$sub] as $id_key => $label) {
list($id, $stub, $action) = SucomUtil::get_lib_stub_action($id_key);
$this->p->is_avail[$sub][$id] = true;
}
}
}
}