本文整理汇总了PHP中Vc_Grid_Item::shortcodes方法的典型用法代码示例。如果您正苦于以下问题:PHP Vc_Grid_Item::shortcodes方法的具体用法?PHP Vc_Grid_Item::shortcodes怎么用?PHP Vc_Grid_Item::shortcodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vc_Grid_Item
的用法示例。
在下文中一共展示了Vc_Grid_Item::shortcodes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setItemsIfEmpty
public function setItemsIfEmpty($items)
{
if (empty($items)) {
require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/class-vc-grid-item.php');
$grid_item = new Vc_Grid_Item();
$grid_item->setGridAttributes($this->atts);
$grid_item->shortcodes();
$item = '[vc_gitem]<img src="' . vc_asset_url('vc/vc_gitem_image.png') . '">[/vc_gitem]';
$grid_item->parseTemplate($item);
$items = str_repeat($grid_item->renderItem(get_post((int) vc_request_param('vc_post_id'))), 3);
}
return $items;
}
示例2: vc_gitem_content_shortcodes
function vc_gitem_content_shortcodes()
{
require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/class-vc-grid-item.php');
$grid_item = new Vc_Grid_Item();
$invalid_shortcodes = apply_filters('vc_gitem_zone_grid_item_not_content_shortcodes', array('vc_gitem', 'vc_gitem_animated_block', 'vc_gitem_zone', 'vc_gitem_zone_a', 'vc_gitem_zone_b', 'vc_gitem_zone_c', 'vc_gitem_row', 'vc_gitem_col'));
return array_diff(array_keys($grid_item->shortcodes()), $invalid_shortcodes);
}
示例3: json_encode
<?php
if (!defined('ABSPATH')) {
die('-1');
}
require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/editor/popups/class-vc-add-element-box-grid-item.php');
$add_element_box = new Vc_Add_Element_Box_Grid_Item();
$add_element_box->render();
// Edit form for mapped shortcode.
visual_composer()->editForm()->render();
require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/editor/popups/class-vc-templates-editor-grid-item.php');
$templates_editor = new Vc_Templates_Editor_Grid_Item();
$templates_editor->renderUITemplate();
$grid_item = new Vc_Grid_Item();
$shortcodes = $grid_item->shortcodes();
if (vc_user_access()->part('presets')->can()->get()) {
require_once vc_path_dir('AUTOLOAD_DIR', 'class-vc-settings-presets.php');
$vc_settings_presets = Vc_Settings_Preset::listDefaultSettingsPresets();
$vc_vendor_settings_presets = Vc_Settings_Preset::listDefaultVendorSettingsPresets();
} else {
$vc_settings_presets = array();
$vc_vendor_settings_presets = array();
}
?>
<script type="text/javascript">
var vc_user_mapper = <?php
echo json_encode(WpbMap_Grid_Item::getGitemUserShortCodes());
?>
,
vc_mapper = <?php
echo json_encode(WpbMap_Grid_Item::getShortCodes());
示例4: shortcodes
/**
* Get shortcodes from param type vc_grid_item
* @return array|bool
*/
public function shortcodes()
{
$grid_item = new Vc_Grid_Item();
return $grid_item->shortcodes();
}