本文整理匯總了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)));
}