本文整理匯總了PHP中WPBMap::sorted_sc方法的典型用法代碼示例。如果您正苦於以下問題:PHP WPBMap::sorted_sc方法的具體用法?PHP WPBMap::sorted_sc怎麽用?PHP WPBMap::sorted_sc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WPBMap
的用法示例。
在下文中一共展示了WPBMap::sorted_sc方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: generateData
/**
* Generates list of shortcodes.
*
* This method parses the list of mapped shortcodes and creates categories list.
*
* @static_other_category_
*
* @param bool $force - force data generation even data already generated.
*/
protected static function generateData($force = false)
{
if (!$force && false !== self::$categories) {
return;
}
self::$categories = self::collectCategories(self::$sc);
$sort = new Vc_Sort(array_values(self::$sc));
self::$sorted_sc = $sort->sortByKey();
}
示例2: generateData
/**
* Generates list of shortcodes.
*
* This method parses the list of mapped shortcodes and creates categories list.
*
* @static_other_category_
*
* @param bool $force - force data generation even data already generated.
*/
protected static function generateData($force = false)
{
if (!$force && false !== self::$categories) {
return;
}
foreach (self::$sc as $tag => $settings) {
self::setElementSettings($tag);
}
self::$categories = self::collectCategories(self::$sc);
$sort = new Vc_Sort(array_values(self::$sc));
self::$sorted_sc = $sort->sortByKey();
}