wp_calendar.php

来自「php 开发的内容管理系统」· PHP 代码 · 共 50 行

PHP
50
字号
<?php
// $Id: xoops_version.php,v 1.8 2005/06/03 01:35:02 phppp Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
// Author: phppp (D.J.)                                                      //
// URL: http://xoopsforge.com, http://xoops.org.cn                           //
// ------------------------------------------------------------------------- //
function b_wordpress_calendar_show($option)
{
	/* For wp blocks */
	global $wpdb, $wp_query, $wp_rewrite, $wp_roles;
    global $m, $monthnum, $year, $timedifference, $month, $month_abbrev, $weekday, $weekday_initial, $weekday_abbrev, $posts, $category_posts, $use_cache;
	/* */
	$use_cache = 1;
	require(dirname(__FILE__).'/../wp-config.php');
	include(ABSPATH . WPINC . '/locale.php');
	$m = $wp_query->query_vars['m'] ? $wp_query->query_vars['m']: '';
	$monthnum = $wp_query->query_vars['monthnum'] ? $wp_query->query_vars['monthnum']: '';
	$year = $wp_query->query_vars['year'] ? $wp_query->query_vars['year']: '';
	ob_start();
	get_calendar(2);
	$block['content'] = ob_get_contents();
	ob_end_clean();
	$block['content'] = encoding_wp2xoops($block['content']);
	return $block;
}
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?