本文整理汇总了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;
}
}
}
}