本文整理汇总了PHP中SPBMap::getShortCodes方法的典型用法代码示例。如果您正苦于以下问题:PHP SPBMap::getShortCodes方法的具体用法?PHP SPBMap::getShortCodes怎么用?PHP SPBMap::getShortCodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SPBMap
的用法示例。
在下文中一共展示了SPBMap::getShortCodes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createShortCodes
public function createShortCodes()
{
remove_all_shortcodes();
foreach (SPBMap::getShortCodes() as $sc_base => $el) {
$name = 'SwiftPageBuilderShortcode_' . $el['base'];
if (class_exists($name) && is_subclass_of($name, 'SwiftPageBuilderShortcode')) {
$this->shortcodes[$sc_base] = new $name($el);
}
}
}
示例2: getContentLayouts
public function getContentLayouts($el_type = null)
{
$output = '';
$element_button = new SPBElementButton();
if ($el_type == 'most_used_elements') {
$most_used_el = array();
if (get_option('spb_most_used_elements')) {
$spb_most_used_elements = get_option('spb_most_used_elements');
arsort($spb_most_used_elements);
$spb_most_used_elements = array_slice($spb_most_used_elements, 0, 24);
foreach ($spb_most_used_elements as $used_element => $value) {
array_push($most_used_el, $used_element);
}
}
}
foreach (SPBMap::getShortCodes() as $sc_base => $el) {
if ($el_type == 'most_used_elements') {
if (in_array($sc_base, $most_used_el)) {
$output .= $element_button->setBase($sc_base)->setup($el)->output();
}
} else {
if ($el['name'] != 'Map Pin' && $el['name'] != 'Pricing Column' && $el['name'] != 'Pricing Column Feature' && $el['name'] != 'Multilayer Parallax Layer' && $el['name'] != 'Icon Box Grid Element') {
$media_pos = strpos($el['class'], 'spb_tab_media');
$ui_pos = strpos($el['class'], 'spb_tab_ui');
$layout_pos = strpos($el['class'], 'spb_tab_layout');
if (isset($el['class']) && $media_pos === false && $ui_pos === false && $layout_pos === false) {
$el['class'] .= ' spb_tab_misc';
}
$output .= $element_button->setBase($sc_base)->setup($el)->output();
}
}
}
return $output;
}
示例3: getContentLayouts
public function getContentLayouts()
{
$output = '';
foreach (SPBMap::getShortCodes() as $sc_base => $el) {
$element_button = new SPBElementButton();
$output .= $element_button->setBase($sc_base)->setup($el)->output();
}
return $output;
}