本文整理汇总了PHP中Vc_Grid_Item::setTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP Vc_Grid_Item::setTemplate方法的具体用法?PHP Vc_Grid_Item::setTemplate怎么用?PHP Vc_Grid_Item::setTemplate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vc_Grid_Item
的用法示例。
在下文中一共展示了Vc_Grid_Item::setTemplate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$this->post_id = vc_request_param('post_id');
$this->shortcodes_string = stripslashes(vc_request_param('shortcodes_string', true));
require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/class-vc-grid-item.php');
$grid_item = new Vc_Grid_Item();
$grid_item->setIsEnd(false);
$grid_item->setGridAttributes(array('element_width' => 4));
$grid_item->setTemplate($this->shortcodes_string, $this->post_id);
$this->enqueue();
vc_include_template('params/vc_grid_item/preview.tpl.php', array('preview' => $this, 'grid_item' => $grid_item, 'shortcodes_string' => $this->shortcodes_string, 'post' => $this->mockingPost(), 'default_width_value' => apply_filters('vc_grid_item_preview_render_default_width_value', 4)));
}