本文整理汇总了PHP中block_style_get函数的典型用法代码示例。如果您正苦于以下问题:PHP block_style_get函数的具体用法?PHP block_style_get怎么用?PHP block_style_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了block_style_get函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: b_wp_authors_show
function b_wp_authors_show($options, $wp_num = "")
{
$with_count = empty($options[0]) ? 0 : $options[0];
$idmode = empty($options[1]) ? '' : $options[1];
$show_rss2_icon = empty($options[2]) ? 0 : $options[2];
global $wpdb, $siteurl, $wp_id, $wp_inblock, $user_cache;
$id = 1;
$use_cache = 1;
if ($wp_num == "") {
$wp_id = $wp_num;
$wp_inblock = 1;
require dirname(__FILE__) . '/../wp-config.php';
$wp_inblock = 0;
}
$optioncount = $with_count == 1;
$exclude_admin = false;
$show_fullname = false;
$hide_empty = true;
$feed = $show_rss2_icon == 1 ? 'rss2' : '';
$feed_image = $show_rss2_icon == 1 ? $siteurl . '/wp-images/rss-mini.gif' : '';
ob_start();
block_style_get($wp_num);
echo "<ul class='wpBlockList'>\n";
list_authors2($optioncount, $exclude_admin, $idmode, $hide_empty, $feed, $feed_image);
echo "</ul>\n";
$block['content'] = ob_get_contents();
ob_end_clean();
return $block;
}
示例2: 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;
}
示例3: b_wp_archives_monthly_show
function b_wp_archives_monthly_show($options, $wp_num = "")
{
$block_style = $options[0] ? $options[0] : 0;
$with_count = $options[1] == 0 ? false : true;
global $wpdb, $siteurl, $wp_id, $wp_inblock, $use_cache, $wp_mod, $wp_base;
$id = 1;
$use_cache = 1;
if ($wp_num == "") {
$wp_id = $wp_num;
$wp_inblock = 1;
require dirname(__FILE__) . '/../wp-config.php';
$wp_inblock = 0;
}
ob_start();
block_style_get($wp_num);
if ($block_style == 0) {
// Simple Listing
echo "<ul class='wpBlockList'>\n";
get_archives('monthly', '', 'html', '', '', $with_count);
echo "</ul>\n";
} else {
// Dropdown Listing
echo '<form name="archiveform' . $wp_num . '" action="">';
echo '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform' . $wp_num . '.archive_chrono[document.forms.archiveform' . $wp_num . '.archive_chrono.selectedIndex].value);"> ';
echo '<option value="">' . _WP_BY_MONTHLY . '</option>';
get_archives('monthly', '', 'option', '', '', $with_count);
echo '</select>';
echo '</form>';
}
$block['content'] = ob_get_contents();
ob_end_clean();
return $block;
}
示例4: _b_wp_archives_monthly_show
function _b_wp_archives_monthly_show($options, $wp_num = '')
{
$block_style = $options[0] ? $options[0] : 0;
$with_count = $options[1] == 0 ? false : true;
$tpl_file = empty($options[2]) ? 'wp_archives_monthly.html' : $options[2];
$sel_value = '';
if (current_wp()) {
if (!empty($_SERVER['PATH_INFO'])) {
permlink_to_param();
}
init_param('GET', 'm', 'string', '');
init_param('GET', 'year', 'integer', '');
init_param('GET', 'monthnum', 'integer', '');
init_param('GET', 'day', 'integer', '');
if (strlen(get_param('m')) == 6) {
$sel_value = get_param('m');
} else {
if (test_param('year') && test_param('monthnum') && !test_param('day')) {
$sel_value = get_param('year') . zeroise(get_param('monthnum'), 2);
}
}
}
$block['wp_num'] = $wp_num;
$block['divid'] = 'wpArchive' . $wp_num;
$block['siteurl'] = wp_siteurl();
$block['style'] = block_style_get(false);
$block['block_style'] = $block_style;
$block['with_count'] = $with_count;
$now = current_time('mysql');
$postHandler =& wp_handler('Post');
$criteria =& new CriteriaCompo(new Criteria('post_date', $now, '<'));
$criteria->add(new Criteria('post_status', 'publish'));
$criteria->setSort('post_date');
$criteria->setOrder('DESC');
$criteria->setGroupby('YEAR(post_date), MONTH(post_date)');
$postObjects =& $postHandler->getObjects($criteria, false, 'DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts');
$block['records'] = array();
if ($postObjects) {
foreach ($postObjects as $postObject) {
$this_year = $postObject->getExtraVar('year');
$this_month = $postObject->getExtraVar('month');
$_record['url'] = get_month_link($this_year, $this_month);
$_record['text'] = format_month($this_year, $GLOBALS['month'][zeroise($this_month, 2)]);
if ($with_count) {
$_record['count'] = ' (' . $postObject->getExtraVar('posts') . ')';
} else {
$_record['count'] = '';
}
$_record['select'] = $sel_value == $this_year . zeroise($this_month, 2) ? 'selected="selected"' : '';
$block['records'][] = $_record;
}
}
$_wpTpl =& new WordPresTpl('theme');
$_wpTpl->assign('block', $block);
if (!$_wpTpl->tpl_exists($tpl_file)) {
$tpl_file = 'wp_archives_monthly.html';
}
$block['content'] = $_wpTpl->fetch($tpl_file);
return $block;
}
示例5: _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;
}
示例6: _b_wp_style_show
function _b_wp_style_show($options, $wp_num = "")
{
$block['content'] = block_style_get(false);
if ($block['content']) {
return $block;
} else {
return '';
}
}
示例7: _b_wp_links_show
function _b_wp_links_show($option, $wp_num = "")
{
$block['wp_num'] = $wp_num;
$block['divid'] = 'wpLink' . $wp_num;
$block['style'] = block_style_get(false);
$block['links'] = get_links_list('name', '', false);
$_wpTpl =& new WordPresTpl('theme');
$_wpTpl->assign('block', $block);
$block['content'] = $_wpTpl->fetch('wp_links.html');
return $block;
}
示例8: _b_wp_links_show
function _b_wp_links_show($option, $wp_num = "")
{
ob_start();
block_style_get();
echo "<ul class='wpBlockList'>\n";
get_links_list();
echo "</ul>\n";
$block['content'] = ob_get_contents();
ob_end_clean();
return $block;
}
示例9: _b_wp_search_show
function _b_wp_search_show($option, $wp_num = "")
{
$block['wp_num'] = $wp_num;
$block['divid'] = 'wpSearch' . $wp_num;
$block['style'] = block_style_get(false);
$block['act_url'] = wp_siteurl() . '/';
$_wpTpl =& new WordPresTpl('theme');
$_wpTpl->assign('block', $block);
$block['content'] = $_wpTpl->fetch('wp_search.html');
return $block;
}
示例10: _b_wp_categories_show
function _b_wp_categories_show($options, $wp_num = "")
{
$block_style = $options[0] ? $options[0] : 0;
$with_count = $options[1] ? $options[1] : 0;
$sorting_key = $options[2] ? $options[2] : 'name';
$sorting_order = $options[3] ? $options[3] : 'asc';
if (current_wp()) {
if (!empty($_SERVER['PATH_INFO'])) {
permlink_to_param();
}
init_param('GET', 'cat', 'string', '');
init_param('GET', 'category_name', 'string', '');
if (!empty($GLOBALS['category_name']) && empty($GLOBALS['cat'])) {
if (stristr($GLOBALS['category_name'], '/')) {
$GLOBALS['category_name'] = explode('/', $GLOBALS['category_name']);
if ($GLOBALS['category_name'][count($GLOBALS['category_name']) - 1]) {
$GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 1];
// no trailing slash
} else {
$GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 2];
// there was a trailling slash
}
}
$categoryHandler =& wp_handler('Category');
$categoryObject =& $categoryHandler->getByNiceName($GLOBALS['category_name']);
if ($categoryObject) {
$GLOBALS['cat'] = $categoryObject->getVar('cat_ID');
}
}
} else {
$GLOBALS['cat'] = '';
}
$block['wp_num'] = $wp_num;
$block['divid'] = 'wpCategory' . $wp_num;
$block['siteurl'] = wp_siteurl();
$block['style'] = block_style_get(false);
$block['block_style'] = $block_style;
$block['with_count'] = $with_count;
if ($block_style == 0) {
$cat_block = _b_wp_categories_list($sorting_key, $sorting_order, $with_count, 0, null, true);
} else {
$cat_block = _b_wp_categories_list($sorting_key, $sorting_order, $with_count, 0, null, false, '–', 0, $GLOBALS['cat']);
}
$block['records'] = $cat_block['records'];
$_wpTpl =& new WordPresTpl('theme');
$_wpTpl->assign('block', $block);
$block['content'] = $_wpTpl->fetch('wp_categories.html');
return $block;
}
示例11: _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;
}
示例12: b_wp_recent_posts_show
function b_wp_recent_posts_show($options, $wp_num = "")
{
$no_posts = empty($options[0]) ? 10 : $options[0];
$cat_date = empty($options[1]) ? 0 : $options[1];
global $xoopsDB;
global $wpdb, $siteurl, $wp_id, $wp_inblock, $use_cache;
$id = 1;
$use_cache = 1;
if ($wp_num == "") {
$wp_id = $wp_num;
$wp_inblock = 1;
require dirname(__FILE__) . '/../wp-config.php';
$wp_inblock = 0;
}
$now = date('Y-m-d H:i:s', time() + $time_difference * 3600);
$request = "SELECT * FROM " . $xoopsDB->prefix("wp{$wp_num}_posts") . " WHERE post_status = 'publish' ";
$request .= " AND post_date <= '" . $now . "'";
$request .= " ORDER BY post_date DESC LIMIT 0, {$no_posts}";
$lposts = $wpdb->get_results($request);
$date = "";
$pdate = "";
ob_start();
block_style_get($wp_num);
$output = ob_get_contents();
ob_end_clean();
$output .= '<div id="wpRecentPost">';
if ($lposts) {
foreach ($lposts as $lpost) {
if ($cat_date) {
$date = mysql2date("Y-n-j", $lpost->post_date);
if ($date != $pdate) {
// if ($pdate) $output .= "</ul>";
$output .= '<label id="postDate">' . $date . '</label><br />';
$pdate = $date;
}
$output .= ' ';
}
$post_title = stripslashes($lpost->post_title);
$permalink = get_permalink($lpost->ID);
$output .= ' <strong><big>·</big></strong> <a href="' . $permalink . '" rel="bookmark" title="Permanent Link: ' . $post_title . '">' . $post_title . '</a><br>';
}
}
$output .= '</div>';
$block['content'] = $output;
return $block;
}
示例13: b_wp_archives_monthly_show
function b_wp_archives_monthly_show($options, $wp_num = "")
{
$block_style = $options[0] ? $options[0] : 0;
$with_count = $options[1] == 0 ? false : true;
$id = 1;
$GLOBALS['use_cache'] = 1;
if ($wp_num == "") {
$GLOBALS['wp_id'] = $wp_num;
$GLOBALS['wp_inblock'] = 1;
require dirname(__FILE__) . '/../wp-config.php';
$GLOBALS['wp_inblock'] = 0;
}
$sel_value = '';
if (current_wp()) {
init_param('GET', 'm', 'string', '');
init_param('GET', 'year', 'integer', '');
init_param('GET', 'monthnum', 'integer', '');
if (strlen(get_param('m')) == 6) {
$sel_value = get_param('m');
} else {
if (test_param('year') && test_param('monthnum')) {
$sel_value = get_param('year') . zeroise(get_param('monthnum'), 2);
}
}
}
ob_start();
block_style_get($wp_num);
if ($block_style == 0) {
// Simple Listing
echo "<ul class='wpBlockList'>\n";
get_archives('monthly', '', 'html', '', '', $with_count);
echo "</ul>\n";
} else {
// Dropdown Listing
echo '<form name="archiveform' . $wp_num . '" id="archiveform' . $wp_num . '" action="#">';
echo '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform' . $wp_num . '.archive_chrono[document.forms.archiveform' . $wp_num . '.archive_chrono.selectedIndex].value);"> ';
echo '<option value="">' . _WP_BY_MONTHLY . '</option>';
get_archives('monthly', '', 'option', '', '', $with_count, $sel_value);
echo '</select>';
echo '</form>';
}
$block['content'] = ob_get_contents();
ob_end_clean();
return $block;
}
示例14: _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', '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;
}
示例15: b_wp_calendar_show
function b_wp_calendar_show($option, $wp_num = "")
{
global $wpdb, $siteurl, $wp_id, $wp_inblock, $xoopsConfig, $use_cache;
$id = 1;
$use_cache = 1;
if ($wp_num == "") {
$wp_id = $wp_num;
$wp_inblock = 1;
include dirname(__FILE__) . '/../wp-config.php';
$wp_inblock = 0;
}
ob_start();
block_style_get($wp_num);
get_calendar(1);
$block['content'] = ob_get_contents();
ob_end_clean();
return $block;
}