本文整理汇总了PHP中get_calendar函数的典型用法代码示例。如果您正苦于以下问题:PHP get_calendar函数的具体用法?PHP get_calendar怎么用?PHP get_calendar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_calendar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _b_wp_calendar_show
function _b_wp_calendar_show($option, $wp_num = "")
{
if (current_wp()) {
if (!empty($_SERVER['PATH_INFO'])) {
permlink_to_param();
}
init_param('GET', 'p', 'integer', '');
init_param('GET', 'm', 'integer', '');
init_param('GET', 'w', 'integer', '');
init_param('GET', 'monthnum', 'integer', '');
init_param('GET', 'year', 'integer', '');
if (test_param('p') && !(test_param('m') || test_param('monthnum') || test_param('w'))) {
$postHandler =& wp_handler('Post');
$postObject =& $postHandler->get(get_param('p'));
if ($postObject) {
$GLOBALS['m'] = mysql2date('Ym', $postObject->getVar('post_date'));
}
}
}
$block['wp_num'] = $wp_num;
$block['divid'] = 'wpCalendar' . $wp_num;
$block['style'] = block_style_get(false);
$block['calendar'] = get_calendar(1, false);
$_wpTpl =& new WordPresTpl('theme');
$_wpTpl->assign('block', $block);
$block['content'] = $_wpTpl->fetch('wp_calendar.html');
return $block;
}
示例2: calendar_sidebar_module
function calendar_sidebar_module($args)
{
extract($args);
echo $before_module . $before_title . $title . $after_title;
get_calendar();
echo $after_module;
}
示例3: b_wp_calendar_show
function b_wp_calendar_show($option, $wp_num = "")
{
global $wpdb, $siteurl, $wp_id, $wp_inblock, $xoopsConfig, $use_cache, $m, $monthnum, $year, $wp_mod, $wp_base;
$id = 1;
$use_cache = 1;
if ($wp_num == "") {
$wp_id = $wp_num;
$wp_inblock = 1;
include dirname(__FILE__) . '/../wp-config.php';
$wp_inblock = 0;
}
if (current_wp()) {
param('m', 'integer', '');
param('monthnum', 'integer', '');
param('year', 'integer', '');
$m = array_key_exists('m', $_GET) ? $_GET['m'] : '';
$monthnum = array_key_exists('monthnum', $_GET) ? $_GET['monthnum'] : '';
$year = array_key_exists('year', $_GET) ? $_GET['year'] : '';
}
ob_start();
block_style_get($wp_num);
get_calendar(1);
$block['content'] = ob_get_contents();
ob_end_clean();
return $block;
}
示例4: widget_quentin_calendar
function widget_quentin_calendar()
{
?>
<li id="calendar">
<?php
get_calendar();
?>
</li>
<?php
}
示例5: widget
function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
echo $before_widget;
if ($title) {
echo $before_title . $title . $after_title;
}
echo '<div id="calendar_wrap">';
get_calendar();
echo '</div>';
echo $after_widget;
}
示例6: widget
/**
* @param array $args
* @param array $instance
*/
public function widget($args, $instance)
{
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
echo $args['before_widget'];
if ($title) {
echo $args['before_title'] . $title . $args['after_title'];
}
echo '<div id="calendar_wrap">';
get_calendar();
echo '</div>';
echo $args['after_widget'];
}
示例7: widget
function widget($args, $instance)
{
$title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title'], $instance, $this->id_base);
echo $args['before_widget'];
if ($title) {
echo $args['before_title'] . $title . $args['after_title'];
}
echo '<div id="calendar_wrap">';
empty($GLOBALS['polylang']->curlang) ? get_calendar() : self::get_calendar();
#modified#
echo '</div>';
echo $args['after_widget'];
}
示例8: widget
public function widget($args, $instance)
{
/** This filter is documented in wp-includes/default-widgets.php */
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
echo $args['before_widget'];
if ($title) {
echo $args['before_title'] . $title . $args['after_title'];
}
echo '<div id="calendar_wrap" class="panel-body"><div class="table-responsive">';
get_calendar();
echo '</div></div>';
echo $args['after_widget'];
}
示例9: widget
function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_title', $instance['title']);
$hide_empty = isset($instance['initial']) ? $instance['initial'] : false;
echo $before_widget;
if ($title) {
echo "\n\t\t\t" . $before_title . $title . $after_title;
}
echo "\n\t\t\t" . '<div class="calendar-wrap">';
get_calendar($initial);
echo "\n\t\t\t" . '</div><!-- .calendar-wrap -->';
echo $after_widget;
}
示例10: _b_wp_calendar_show
function _b_wp_calendar_show($option, $wp_num = "")
{
if (current_wp()) {
init_param('GET', 'm', 'integer', '');
init_param('GET', 'w', 'integer', '');
init_param('GET', 'monthnum', 'integer', '');
init_param('GET', 'year', 'integer', '');
}
ob_start();
block_style_get($wp_num);
get_calendar(1);
$block['content'] = ob_get_contents();
ob_end_clean();
return $block;
}
示例11: widget
/**
* Outputs the widget based on the arguments input through the widget controls.
* @since 0.6
*/
function widget( $args, $instance ) {
extract( $args );
$initial = isset( $instance['initial'] ) ? $instance['initial'] : false;
echo $before_widget;
if ( $instance['title'] )
echo $before_title . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $after_title;
echo '<div class="calendar-wrap">';
get_calendar( $initial );
echo '</div><!-- .calendar-wrap -->';
echo $after_widget;
}
示例12: widget
function widget($args, $instance)
{
global $polylang;
#added#
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title'], $instance, $this->id_base);
echo $before_widget;
if ($title) {
echo $before_title . $title . $after_title;
}
echo '<div id="calendar_wrap">';
isset($polylang) && $polylang->get_languages_list() ? $this->get_calendar() : get_calendar();
#modified#
echo '</div>';
echo $after_widget;
}
示例13: widget
public function widget($args, $instance)
{
/** This filter is documented in wp-includes/default-widgets.php */
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
echo $args['before_widget'];
if ($title) {
echo $args['before_title'] . $title . $args['after_title'];
}
echo '<div id="calendar_wrap">';
if (is_null(fw_ext('translation'))) {
get_calendar();
} else {
$this->get_calendar();
}
echo '</div>';
echo $args['after_widget'];
}
示例14: widget
function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
$before_widget = ' <div id="calendar-' . $args['widget_id'] . '" class="widget-container widget_calendar"> ';
$after_widget = '</div>';
$before_title = '<h3>';
$after_title = '</h3>';
echo $before_widget;
if ($title) {
echo $before_title . $title . $after_title;
}
echo '<div id="calendar_wrap">';
get_calendar();
echo '</div>';
echo $after_widget;
}
示例15: widget
public function widget($args, $instance)
{
extract($args);
$title = isset($instance['title']) ? $instance['title'] : false;
$class_wrap = isset($instance['class_wrap']) ? $instance['class_wrap'] : '';
$calendar_style = isset($instance['calendar_style']) ? $instance['calendar_style'] : '';
// Class wrap
if ('' != $class_wrap) {
$class_widget = $class_wrap;
} else {
$class_widget = uw_option('widgets_style', 'style1');
}
// no 'class' attribute
if (strpos($before_widget, 'class') === false) {
$before_widget = str_replace('>', 'class="' . $class_widget . '"', $before_widget);
} else {
$before_widget = str_replace('class="', 'class="' . $class_widget . ' ', $before_widget);
}
echo $before_widget;
if ($title) {
?>
<h3 class="uw-title">
<span><?php
echo esc_attr($title);
?>
</span>
</h3>
<?php
}
?>
<div class="uw-calendar-<?php
echo esc_attr($calendar_style);
?>
">
<?php
if ('style1' == $calendar_style) {
get_calendar(false);
} else {
get_calendar();
}
?>
</div>
<?php
echo $after_widget;
}