本文整理汇总了PHP中Widgets::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Widgets::render方法的具体用法?PHP Widgets::render怎么用?PHP Widgets::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Widgets
的用法示例。
在下文中一共展示了Widgets::render方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<div class="modal-body">
<div class="progress progress-striped active">
<div class="progress-bar" style="width: 100%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
if (count(Widgets::render('publish_new')) > 0) {
?>
<div class="col-md-3 col-sm-12 col-xs-12">
<?php
foreach (Widgets::render('publish_new') as $widget) {
?>
<div class="panel panel-sidebar <?php
echo get_class($widget->widget);
?>
">
<?php
echo $widget;
?>
</div>
<?php
}
?>
</div>
<?php
}
示例2: defined
<?php
defined('SYSPATH') or die('No direct script access.');
?>
<div class="col-xs-3">
<?php
foreach (Widgets::render('sidebar') as $widget) {
?>
<div class="panel panel-sidebar <?php
echo get_class($widget->widget);
?>
">
<?php
echo $widget;
?>
</div>
<?php
}
?>
</div>
示例3: defined
<?php
defined('SYSPATH') or die('No direct script access.');
?>
<hr>
<footer>
<div class="row">
<?$i=0; foreach ( Widgets::render('footer') as $widget):?>
<div class="col-md-3">
<?php
echo $widget;
?>
</div>
<? $i++; if ($i%4 == 0) echo '<div class="clearfix"></div>';?>
<?endforeach?>
</div>
<!--This is the license for Open Classifieds, do not remove -->
<div class="center-block">
<p>©
<?if (Theme::get('premium')!=1):?>
Web Powered by <a href="http://open-classifieds.com?utm_source=<?php
echo URL::base();
?>
&utm_medium=oc_footer&utm_campaign=<?php
echo date('Y-m-d');
?>
" title="Best PHP Script Classifieds Software">Open Classifieds</a>
2009 - <?php
echo date('Y');
?>
<?else:?>
示例4: widget
/**
* Outputs the widget
*
* @param array $args
* @param array $instance
* @return void
*/
public function widget($args, $instance)
{
$template = get_current_template();
// If not a page stop rendering
if (!$template) {
return false;
}
// Get template dir
$dir = Sidebars::$sidebars[$template][$args['id']]['dir'];
// If no fields exist stop rendering
$fields = get_fields($instance['widget_id']);
if (!$fields || !isset($fields['widget'])) {
return false;
}
// Render the widgets
foreach ($fields['widget'] as $widget) {
echo Widgets::render($args, $widget, $dir);
}
}
示例5: foreach
<?php
echo Theme::get('header_ad') != '' ? Theme::get('header_ad') : '';
?>
<?php
echo $content;
?>
</section>
<?php
echo Theme::get('sidebar_position') == 'right' ? View::fragment('sidebar_front', 'sidebar') : '';
?>
<div class="container">
<?php
foreach (Widgets::render('footer') as $widget) {
?>
<div class="col-lg-3">
<?php
echo $widget;
?>
</div>
<?php
}
?>
</div>
<?php
echo $footer;
?>