Exemplo n.º 1
0
/**
 * [mo_post_link description]
 * @return [type] [description]
 */
function mo_post_link()
{
    global $post;
    $post_ID = $post->ID;
    $link = get_post_meta($post_ID, 'link', true);
    if ($link) {
        echo '<div class="post-linkto"><a class="btn btn-primary' . (!is_single() ? ' btn-xs' : ' btn-lg') . '" href="' . $link . '"' . (_wedn_option('post_link_blank_s') ? ' target="_blank"' : '') . (_wedn_option('post_link_nofollow_s') ? ' rel="external nofollow"' : '') . '>' . _wedn_option('post_link_h1') . '</a></div>';
    }
}
Exemplo n.º 2
0
/**
 * [mo_get_user_page description]
 * @return [type] [description]
 */
function mo_get_user_page()
{
    $pid = _wedn_option('user_page');
    if (!$pid) {
        return false;
    }
    if (get_permalink($pid)) {
        return get_permalink($pid);
    }
    return false;
}
Exemplo n.º 3
0
/**
 * [mo_minicat description]
 * @return html [description]
 */
function mo_minicat()
{
    if (!_wedn_option('minicat')) {
        return;
    }
    $args = array('ignore_sticky_posts' => 1, 'showposts' => 1, 'cat' => _wedn_option('minicat'));
    query_posts($args);
    while (have_posts()) {
        the_post();
        $category = get_the_category();
        echo '<article class="excerpt-minic excerpt-minic-index">';
        echo '<h2><a' . _post_target_blank() . ' class="red" href="' . get_category_link($category[0]->term_id) . '">【' . (_wedn_option('minicat_home_title') ? _wedn_option('minicat_home_title') : '今日观点') . '】</a> <a href="' . get_permalink() . '" title="' . get_the_title() . _get_delimiter() . get_bloginfo('name') . '">' . get_the_title() . '</a></h2>';
        echo '<p class="note">' . _get_excerpt() . '</p>';
        echo '</article>';
    }
    wp_reset_query();
}
Exemplo n.º 4
0
/**
 * [mo_slider description]
 * @param  string $id   [description]
 * @return html         [description]
 */
function mo_slider($id = 'slider')
{
    $indicators = '';
    $inner = '';
    $sort = _wedn_option($id . '_sort') ? _wedn_option($id . '_sort') : '1 2 3 4 5';
    $sort = array_unique(explode(' ', trim($sort)));
    $i = 0;
    foreach ($sort as $key => $value) {
        if (_wedn_option($id . '_src_' . $value) && _wedn_option($id . '_href_' . $value) && _wedn_option($id . '_title_' . $value)) {
            $indicators .= '<li data-target="#' . $id . '" data-slide-to="' . $i . '"' . (!$i ? ' class="active"' : '') . '></li>';
            $inner .= '<div class="item' . (!$i ? ' active' : '') . '"><a' . (_wedn_option($id . '_blank_' . $value) ? ' target="_blank"' : '') . ' href="' . _wedn_option($id . '_href_' . $value) . '"><img src="' . _wedn_option($id . '_src_' . $value) . '"></a></div>';
            // <span class="carousel-caption">'._wedn_option($id.'_title_'.$value).'</span>
            $i++;
        }
    }
    echo '<div id="' . $id . '" class="carousel slide" data-ride="carousel"><ol class="carousel-indicators">' . $indicators . '</ol><div class="carousel-inner" role="listbox">' . $inner . '</div><a class="left carousel-control" href="#' . $id . '" role="button" data-slide="prev"><i class="fa fa-angle-left"></i></a><a class="right carousel-control" href="#' . $id . '" role="button" data-slide="next"><i class="fa fa-angle-right"></i></a></div>';
}
Exemplo n.º 5
0
/**
 * [mo_get_post_from description]
 * @param  string $pid      [description]
 * @param  string $prevtext [description]
 * @return [type]           [description]
 */
function mo_get_post_from($pid = '', $prevtext = '来源:')
{
    if (!_wedn_option('post_from_s')) {
        return;
    }
    if (!$pid) {
        $pid = get_the_ID();
    }
    $fromname = trim(get_post_meta($pid, "fromname_value", true));
    $fromurl = trim(get_post_meta($pid, "fromurl_value", true));
    $from = '';
    if ($fromname) {
        if ($fromurl && _wedn_option('post_from_link_s')) {
            $from = '<a href="' . $fromurl . '" target="_blank" rel="external nofollow">' . $fromname . '</a>';
        } else {
            $from = $fromname;
        }
        $from = (_wedn_option('post_from_h1') ? _wedn_option('post_from_h1') : $prevtext) . $from;
    }
    return $from;
}
Exemplo n.º 6
0
/**
 * [mo_is_minicat description]
 * @return bool [description]
 */
function mo_is_minicat()
{
    if (!_wedn_option('minicat_s')) {
        return false;
    }
    if (!_wedn_option('minicat')) {
        return false;
    }
    if (is_category()) {
        global $wp_query;
        $cat_ID = get_query_var('cat');
    } else {
        if (!is_page()) {
            $category = get_the_category();
            $cat_ID = $category[0]->cat_ID;
        }
    }
    if ($cat_ID == _wedn_option('minicat')) {
        return true;
    }
    return false;
}
Exemplo n.º 7
0
<?php

/**
 * Template name: User
 * Description:   A user profile page
 */
get_header();
?>

<?php 
if (!_wedn_option('user_page_s')) {
    exit('该功能需要开启!');
}
?>
<section class="container">
	<div class="container-user"<?php 
echo is_user_logged_in() ? '' : ' id="issignshow" style="height:500px;"';
?>
>
		<?php 
if (is_user_logged_in()) {
    global $current_user;
    ?>
		<div class="userside">
			<div class="usertitle">
				<?php 
    echo _get_the_avatar($user_id = $current_user->ID, $user_email = $current_user->user_email, true);
    ?>
				<h2><?php 
    echo $current_user->display_name;
    ?>
Exemplo n.º 8
0
/**
 * Defines an array of options that will be used to generate the settings page and be saved in the database.
 * When creating the 'id' fields, make sure to use all lowercase and no spaces.
 *
 * If you are making your theme translatable, you should replace 'options_framework_theme'
 * with the actual text domain for your theme.  Read more:
 * http://codex.wordpress.org/Function_Reference/load_theme_textdomain
 */
function optionsframework_options()
{
    // Test data
    $test_array = array('one' => __('One', 'options_framework_theme'), 'two' => __('Two', 'options_framework_theme'), 'three' => __('Three', 'options_framework_theme'), 'four' => __('Four', 'options_framework_theme'), 'five' => __('Five', 'options_framework_theme'));
    // Multicheck Array
    $multicheck_array = array('one' => __('French Toast', 'options_framework_theme'), 'two' => __('Pancake', 'options_framework_theme'), 'three' => __('Omelette', 'options_framework_theme'), 'four' => __('Crepe', 'options_framework_theme'), 'five' => __('Waffle', 'options_framework_theme'));
    // Multicheck Defaults
    $multicheck_defaults = array('one' => '1', 'five' => '1');
    // Background Defaults
    $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll');
    // Typography Defaults
    $typography_defaults = array('size' => '15px', 'face' => 'georgia', 'style' => 'bold', 'color' => '#bada55');
    // Typography Options
    $typography_options = array('sizes' => array('6', '12', '14', '16', '20'), 'faces' => array('Helvetica Neue' => 'Helvetica Neue', 'Arial' => 'Arial'), 'styles' => array('normal' => 'Normal', 'bold' => 'Bold'), 'color' => false);
    // Pull all the categories into an array
    $options_categories = array();
    $options_categories_obj = get_categories();
    foreach ($options_categories_obj as $category) {
        $options_categories[$category->cat_ID] = $category->cat_name;
    }
    // Pull all tags into an array
    $options_tags = array();
    $options_tags_obj = get_tags();
    foreach ($options_tags_obj as $tag) {
        $options_tags[$tag->term_id] = $tag->name;
    }
    // Pull all the pages into an array
    $options_pages = array();
    $options_pages_obj = get_pages('sort_column=post_parent,menu_order');
    // $options_pages[''] = 'Select a page:';
    foreach ($options_pages_obj as $page) {
        $options_pages[$page->ID] = $page->post_title;
    }
    $options_linkcats = array();
    $options_linkcats_obj = get_terms('link_category');
    foreach ($options_linkcats_obj as $tag) {
        $options_linkcats[$tag->term_id] = $tag->name;
    }
    // If using image radio buttons, define a directory path
    $imagepath = get_template_directory_uri() . '/images/';
    $adsdesc = __('可添加任意广告联盟代码或自定义代码', 'wedn');
    $options = array();
    // ======================================================================================================================
    $options[] = array('name' => __('基本设置', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('Logo', 'wedn'), 'id' => 'logo_src', 'desc' => __('Logo 最大高:32px;建议尺寸:140*32px 格式:png', 'wedn'), 'std' => '/wp-content/themes/wedn/img/logo.png', 'type' => 'upload');
    $options[] = array('name' => __('布局', 'wedn'), 'id' => 'layout', 'std' => "2", 'type' => "radio", 'desc' => __("2种布局供选择,点击选择你喜欢的布局方式,保存后前端展示会有所改变。", 'wedn'), 'options' => array('2' => __('有侧边栏', 'wedn'), '1' => __('无侧边栏', 'wedn')));
    $options[] = array('name' => __("主题风格", 'wedn'), 'desc' => __("14种颜色供选择,点击选择你喜欢的颜色,保存后前端展示会有所改变。", 'wedn'), 'id' => "theme_skin", 'std' => "45B6F7", 'type' => "colorradio", 'options' => array('45B6F7' => 100, 'FF5E52' => 1, '2CDB87' => 2, '00D6AC' => 3, '16C0F8' => 4, 'EA84FF' => 5, 'FDAC5F' => 6, 'FD77B2' => 7, '76BDFF' => 8, 'C38CFF' => 9, 'FF926F' => 10, '8AC78F' => 11, 'C7C183' => 12, '555555' => 13));
    $options[] = array('id' => 'theme_skin_custom', 'std' => "", 'desc' => __('不喜欢上面提供的颜色,你好可以在这里自定义设置,如果不用自定义颜色清空即可(默认不用自定义)', 'wedn'), 'type' => "color");
    $options[] = array('name' => __('全站连接符', 'wedn'), 'id' => 'connector', 'desc' => __('一经选择,切勿更改,对SEO不友好,一般为“-”或“_”', 'wedn'), 'std' => _wedn_option('connector') ? _wedn_option('connector') : '-', 'type' => 'text', 'class' => 'mini');
    $options[] = array('name' => __('网页最大宽度', 'wedn'), 'id' => 'site_width', 'std' => 1200, 'class' => 'mini', 'desc' => __('默认:1200,单位:px(像素)', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('jQuery底部加载', 'wedn'), 'id' => 'jquery_bom', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn') . __('(可提高页面内容加载速度,但部分依赖jQuery的插件可能失效)', 'wedn'));
    $options[] = array('name' => __('Gravatar 头像获取', 'wedn'), 'id' => 'gravatar_url', 'std' => "ssl", 'type' => "radio", 'options' => array('no' => __('原有方式', 'wedn'), 'ssl' => __('从Gravatar官方ssl获取', 'wedn'), 'duoshuo' => __('从多说服务器获取', 'wedn')));
    $options[] = array('name' => __('JS文件托管(可大幅提速JS加载)', 'wedn'), 'id' => 'js_outlink', 'std' => "no", 'type' => "radio", 'options' => array('no' => __('不托管', 'wedn'), 'baidu' => __('百度', 'wedn'), '360' => __('360', 'wedn'), 'he' => __('框架来源站点(分别引入jquery和bootstrap官方站点JS文件)', 'wedn')));
    $options[] = array('name' => __('网站整体变灰', 'wedn'), 'id' => 'site_gray', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn') . __('(支持IE、Chrome,基本上覆盖了大部分用户,不会降低访问速度)', 'wedn'));
    // $options[] = array(
    // 	'name' => __('分类url去除category字样', 'wedn'),
    // 	'id' => 'no_categoty',
    // 	'type' => "checkbox",
    // 	'std' => false,
    // 	'desc' => __('开启', 'wedn').__('(主题已内置no-category插件功能,请不要安装插件;开启后请去设置-固定连接中点击保存即可)', 'wedn'));
    $options[] = array('name' => __('品牌文字', 'wedn'), 'id' => 'brand', 'std' => "", 'desc' => __('显示在Logo旁边的两个短文字,请换行填写两句文字(短文字介绍)', 'wedn'), 'settings' => array('rows' => 2), 'type' => 'textarea');
    $options[] = array('name' => __('首页关键字(keywords)', 'wedn'), 'id' => 'keywords', 'std' => '', 'desc' => __('关键字有利于SEO优化,建议个数在5-10之间,用英文逗号隔开', 'wedn'), 'settings' => array('rows' => 2), 'type' => 'textarea');
    $options[] = array('name' => __('首页描述(description)', 'wedn'), 'id' => 'description', 'std' => __('', 'wedn'), 'desc' => __('描述有利于SEO优化,建议字数在30-70之间', 'wedn'), 'settings' => array('rows' => 3), 'type' => 'textarea');
    $options[] = array('name' => __('网站底部信息', 'wedn'), 'id' => 'footer_seo', 'std' => '<a href="' . site_url('/sitemap.xml') . '">' . __('网站地图', 'wedn') . '</a>' . "\n", 'desc' => __('备案号可写于此,网站地图可自行使用sitemap插件自动生成', 'wedn'), 'type' => 'textarea');
    $options[] = array('name' => __('百度自定义站内搜索', 'wedn'), 'id' => 'search_baidu', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn'));
    $options[] = array('id' => 'search_baidu_code', 'std' => '', 'desc' => __('此处存放百度自定义站内搜索代码,请自行去 http://zn.baidu.com/ 设置并获取', 'wedn'), 'settings' => array('rows' => 2), 'type' => 'textarea');
    $options[] = array('name' => __('PC端滚动时导航固定', 'wedn') . '  (v1.3+)', 'id' => 'nav_fixed', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn') . __('由于网址导航左侧菜单的固定,故对网址导航页面无效', 'wedn'));
    $options[] = array('name' => __('新窗口打开文章', 'wedn'), 'id' => 'target_blank', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn'));
    $options[] = array('name' => __('首页不显示该分类下文章', 'wedn'), 'id' => 'notinhome', 'options' => $options_categories, 'type' => 'multicheck');
    $options[] = array('name' => __('首页不显示以下ID的文章', 'wedn'), 'id' => 'notinhome_post', 'std' => "", 'desc' => __('每行填写一个文章ID', 'wedn'), 'settings' => array('rows' => 2), 'type' => 'textarea');
    $options[] = array('name' => __('分页无限加载页数', 'wedn'), 'id' => 'ajaxpager', 'std' => 5, 'class' => 'mini', 'desc' => __('为0时表示不开启该功能', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('列表模式', 'wedn'), 'id' => 'list_type', 'std' => "thumb", 'type' => "radio", 'options' => array('thumb' => __('图文(缩略图尺寸:220*150px,默认已自动裁剪)', 'wedn'), 'text' => __('文字 ', 'wedn')));
    /*
    	$options[] = array(
    		'id' => 'list_thumb_out',
    		'type' => "checkbox",
    		'std' => false,
    		'desc' => __('缩略图使用外链图片 (外链是没有缩略图的,所以不会是小图,浩子不建议外链图,但如果你的文章都是外链图片,这个可以帮你实现以上的列表模式) ', 'wedn'));*/
    $options[] = array('name' => __('文章小部件开启', 'wedn'), 'id' => 'post_plugin', 'std' => array('view' => 1, 'comm' => 1, 'date' => 1, 'author' => 1, 'cat' => 1), 'type' => "multicheck", 'options' => array('view' => __('阅读量(无需安装插件)', 'wedn'), 'comm' => __('列表评论数', 'wedn'), 'date' => __('列表时间', 'wedn'), 'author' => __('列表作者名', 'wedn'), 'cat' => __('列表分类链接', 'wedn') . '  (v1.3+)'));
    $options[] = array('name' => __('文章作者名加链接', 'wedn'), 'id' => 'author_link', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn') . __('(列表和文章有作者的地方都会加上链接) ', 'wedn'));
    /*
    	$options[] = array(
    		'name' => __('评论数只显示人为评论数量', 'wedn'),
    		'id' => 'comment_number_remove_trackback',
    		'type' => "checkbox",
    		'std' => false,
    		'desc' => __('开启', 'wedn').__('(部分文章有trackback导致评论数的增加,这个可以过滤掉) ', 'wedn'));
    */
    // ======================================================================================================================
    $options[] = array('name' => __('文章页', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('相关文章', 'wedn'), 'id' => 'post_related_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'wedn'));
    $options[] = array('desc' => __('相关文章标题', 'wedn'), 'id' => 'related_title', 'std' => __('相关推荐', 'wedn'), 'type' => 'text');
    $options[] = array('desc' => __('相关文章显示数量', 'wedn'), 'id' => 'post_related_n', 'std' => 8, 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => __('文章来源', 'wedn'), 'id' => 'post_from_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'wedn'));
    $options[] = array('id' => 'post_from_h1', 'std' => __('来源:', 'wedn'), 'desc' => __('来源显示字样', 'wedn'), 'type' => 'text');
    $options[] = array('id' => 'post_from_link_s', 'type' => "checkbox", 'std' => true, 'desc' => __('来源加链接', 'wedn'));
    $options[] = array('name' => __('内容段落缩进', 'wedn') . ' (v1.3+)', 'id' => 'post_p_indent_s', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn') . __(' 开启后只对前台文章展示有效,对后台编辑器中的格式无效', 'wedn'));
    /*$options[] = array(
    		'name' => __('文章段落缩进', 'wedn'),
    		'id' => 'post_p_s',
    		'type' => "checkbox",
    		'std' => false,
    		'desc' => __('开启', 'wedn'));*/
    $options[] = array('name' => __('文章页尾版权提示', 'wedn'), 'id' => 'post_copyright_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'wedn'));
    $options[] = array('name' => __('文章页尾版权提示前缀', 'wedn'), 'id' => 'post_copyright', 'std' => __('未经允许,不得转载本站任何文章:', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('自动添加关键字和描述', 'wedn'), 'id' => 'site_keywords_description_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'wedn') . __('(开启后所有页面将自动使用主题配置的关键字和描述,具体规则可以自行查看页面源码得知)', 'wedn'));
    $options[] = array('name' => __('文章关键字和描述自定义', 'wedn'), 'id' => 'post_keywords_description_s', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn') . __('(开启后你需要在编辑文章的时候书写关键字和描述,如果为空,将自动使用主题配置的关键字和描述;开启这个必须开启上面的“自动添加关键字和描述”)', 'wedn'));
    // ======================================================================================================================
    $options[] = array('name' => __('网址导航', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('网址导航标题下描述', 'wedn'), 'id' => 'navpage_desc', 'std' => '这里显示的是网址导航的一句话描述...', 'type' => 'text');
    $options[] = array('name' => __('选择链接分类到网址导航', 'wedn'), 'id' => 'navpage_cats', 'options' => $options_linkcats, 'type' => 'multicheck');
    // ======================================================================================================================
    $options[] = array('name' => __('会员中心', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('选项', 'wedn'), 'id' => 'user_page_s', 'std' => true, 'desc' => __('开启会员中心', 'wedn'), 'type' => 'checkbox');
    $options[] = array('id' => 'user_on_notice_s', 'std' => true, 'desc' => __('在首页公告栏显示会员模块', 'wedn'), 'type' => 'checkbox');
    $options[] = array('name' => __('选择会员中心页面', 'wedn'), 'id' => 'user_page', 'desc' => '如果没有合适的页面作为会员中心,你需要去新建一个页面再来选择', 'options' => $options_pages, 'type' => 'select');
    $options[] = array('name' => __('选择找回密码页面', 'wedn'), 'id' => 'user_rp', 'desc' => '如果没有合适的页面作为找回密码页面,你需要去新建一个页面再来选择', 'options' => $options_pages, 'type' => 'select');
    $options[] = array('name' => __('有新投稿邮件通知', 'wedn') . ' (v1.3+)', 'id' => 'tougao_mail_send', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('投稿通知接收邮箱', 'wedn') . ' (v1.3+)', 'id' => 'tougao_mail_to', 'type' => 'text');
    /*
    	$options[] = array(
    		'name' => __('禁止昵称关键字', 'wedn'),
    		'desc' => __('一行一个关键字,用户昵称将不能使用或包含这些关键字,对编辑以下职位有效', 'wedn'),
    		'id' => 'user_nickname_out',
    		'std' => "赌博\n博彩\n彩票\n性爱\n色情\n做爱\n爱爱\n淫秽\n傻b\n妈的\n妈b\nadmin\ntest",
    		'type' => 'textarea');*/
    // ======================================================================================================================
    $options[] = array('name' => __('微分类', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('开启', 'wedn'), 'id' => 'minicat_s', 'std' => true, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('id' => 'minicat_home_s', 'std' => true, 'desc' => __('在首页显示微分类最新文章', 'wedn'), 'type' => 'checkbox');
    $options[] = array('name' => __('首页模块前缀', 'wedn'), 'id' => 'minicat_home_title', 'desc' => '默认为:今日观点', 'std' => '今日观点', 'type' => 'text');
    $options[] = array('name' => __('选择分类设置为微分类', 'wedn'), 'desc' => __('选择一个使用微分类展示模版,分类下文章将全文输出到微分类列表', 'wedn'), 'id' => 'minicat', 'options' => $options_categories, 'type' => 'select');
    // ======================================================================================================================
    $options[] = array('name' => __('全站底部推广区', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('开启', 'wedn'), 'id' => 'footer_brand_s', 'std' => true, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('name' => __('推广标题', 'wedn'), 'id' => 'footer_brand_title', 'desc' => '建议20字内', 'std' => '', 'type' => 'text');
    for ($i = 1; $i <= 2; $i++) {
        $options[] = array('name' => __('按钮 ', 'wedn') . $i, 'id' => 'footer_brand_btn_text_' . $i, 'desc' => '按钮文字', 'std' => '联系我们', 'type' => 'text');
        $options[] = array('id' => 'footer_brand_btn_href_' . $i, 'desc' => __('按钮链接', 'wedn'), 'std' => 'http://www.micua.com/', 'type' => 'text');
        $options[] = array('id' => 'footer_brand_btn_blank_' . $i, 'std' => true, 'desc' => __('新窗口打开', 'wedn'), 'type' => 'checkbox');
    }
    // ======================================================================================================================
    $options[] = array('name' => __('首页公告', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('显示公告模块', 'wedn'), 'id' => 'site_notice_s', 'std' => true, 'desc' => __('显示公告模块', 'wedn'), 'type' => 'checkbox');
    $options[] = array('name' => __('显示标题', 'wedn'), 'id' => 'site_notice_title', 'desc' => '建议4字内,默认:网站公告', 'std' => '网站公告', 'type' => 'text');
    $options[] = array('name' => __('选择分类设置为网站公告', 'wedn'), 'id' => 'site_notice_cat', 'options' => $options_categories, 'type' => 'select');
    // ======================================================================================================================
    $options[] = array('name' => __('首页焦点图', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('开启', 'wedn'), 'id' => 'focusslide_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('name' => __('排序', 'wedn'), 'id' => 'focusslide_sort', 'desc' => '默认:1 2 3 4 5', 'std' => '1 2 3 4 5', 'type' => 'text');
    for ($i = 1; $i <= 5; $i++) {
        $options[] = array('name' => __('图', 'wedn') . $i, 'id' => 'focusslide_title_' . $i, 'desc' => '标题', 'std' => '', 'type' => 'text');
        $options[] = array('id' => 'focusslide_href_' . $i, 'desc' => __('链接', 'wedn'), 'std' => 'http://www.micua.com', 'type' => 'text');
        $options[] = array('id' => 'focusslide_blank_' . $i, 'std' => true, 'desc' => __('新窗口打开', 'wedn'), 'type' => 'checkbox');
        $options[] = array('id' => 'focusslide_src_' . $i, 'desc' => __('图片,尺寸:', 'wedn') . '820*200', 'std' => '', 'type' => 'upload');
    }
    // ======================================================================================================================
    $options[] = array('name' => __('侧栏随动', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('首页', 'wedn'), 'id' => 'sideroll_index_s', 'std' => true, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('id' => 'sideroll_index', 'std' => '1 2', 'class' => 'mini', 'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('分类/标签/搜索页', 'wedn'), 'id' => 'sideroll_list_s', 'std' => true, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('id' => 'sideroll_list', 'std' => '1 2', 'class' => 'mini', 'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('文章页', 'wedn'), 'id' => 'sideroll_post_s', 'std' => true, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('id' => 'sideroll_post', 'std' => '1 2', 'class' => 'mini', 'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'wedn'), 'type' => 'text');
    // ======================================================================================================================
    $options[] = array('name' => __('直达链接', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('在文章列表显示', 'wedn') . ' (v1.3+)', 'id' => 'post_link_excerpt_s', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn'));
    $options[] = array('name' => __('在文章页面显示', 'wedn'), 'id' => 'post_link_single_s', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'wedn'));
    $options[] = array('name' => __('新窗口打开链接', 'wedn'), 'id' => 'post_link_blank_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'wedn'));
    $options[] = array('name' => __('链接添加 nofollow', 'wedn'), 'id' => 'post_link_nofollow_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'wedn'));
    $options[] = array('name' => __('自定义显示文字', 'wedn'), 'id' => 'post_link_h1', 'type' => "text", 'std' => '直达链接', 'desc' => __('默认为“直达链接” ', 'wedn'));
    // ======================================================================================================================
    $options[] = array('name' => __('独立页面', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('读者墙', 'wedn'), 'id' => 'readwall_limit_time', 'std' => 200, 'class' => 'mini', 'desc' => __('限制在多少月内,单位:月', 'wedn'), 'type' => 'text');
    $options[] = array('id' => 'readwall_limit_number', 'std' => 200, 'class' => 'mini', 'desc' => __('显示个数', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('页面左侧菜单设置', 'wedn'), 'id' => 'page_menu', 'options' => $options_pages, 'type' => 'multicheck');
    $options[] = array('name' => __('友情链接分类选择', 'wedn'), 'id' => 'page_links_cat', 'options' => $options_linkcats, 'type' => 'multicheck');
    // ======================================================================================================================
    $options[] = array('name' => __('字符', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('首页最新发布标题', 'wedn'), 'id' => 'index_list_title', 'std' => __('最新发布', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('首页最新发布标题右侧', 'wedn'), 'id' => 'index_list_title_r', 'std' => '<a href="链接地址">显示文字</a><a href="链接地址">显示文字</a><a href="链接地址">显示文字</a><a href="链接地址">显示文字</a>', 'type' => 'textarea');
    $options[] = array('name' => __('评论标题', 'wedn'), 'id' => 'comment_title', 'std' => __('评论', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('评论框默认字符', 'wedn'), 'id' => 'comment_text', 'std' => __('你的评论一定可以一针见血', 'wedn'), 'type' => 'text');
    $options[] = array('name' => __('评论提交按钮字符', 'wedn'), 'id' => 'comment_submit_text', 'std' => __('提交评论', 'wedn'), 'type' => 'text');
    // ======================================================================================================================
    $options[] = array('name' => __('社交', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('微博', 'wedn'), 'id' => 'weibo', 'std' => 'http://weibo.com/micua', 'type' => 'text');
    $options[] = array('name' => __('腾讯微博', 'wedn'), 'id' => 'tqq', 'std' => 'http://www.micua.com', 'type' => 'text');
    $options[] = array('name' => __('Twitter', 'wedn'), 'id' => 'twitter', 'std' => '', 'type' => 'text');
    $options[] = array('name' => __('Facebook', 'wedn'), 'id' => 'facebook', 'std' => '', 'type' => 'text');
    $options[] = array('name' => __('微信帐号', 'wedn'), 'id' => 'wechat', 'std' => 'Micua-', 'type' => 'text');
    $options[] = array('id' => 'wechat_qr', 'std' => '/wp-content/themes/wedn/img/wx_qrcode.jpg', 'desc' => __('微信二维码,建议图片尺寸:', 'wedn') . '200x200px', 'type' => 'upload');
    $options[] = array('name' => __('RSS订阅', 'wedn'), 'id' => 'feed', 'std' => get_feed_link(), 'type' => 'text');
    // ======================================================================================================================
    $options[] = array('name' => __('广告位', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('文章页正文结尾文字广告', 'wedn'), 'id' => 'ads_post_footer_s', 'std' => false, 'desc' => ' 显示', 'type' => 'checkbox');
    $options[] = array('desc' => '前标题', 'id' => 'ads_post_footer_pretitle', 'std' => '', 'type' => 'text');
    $options[] = array('desc' => '标题', 'id' => 'ads_post_footer_title', 'std' => '', 'type' => 'text');
    $options[] = array('desc' => '链接', 'id' => 'ads_post_footer_link', 'std' => '', 'type' => 'text');
    $options[] = array('id' => 'ads_post_footer_link_blank', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'wedn') . ' (' . __('新窗口打开链接', 'wedn') . ')');
    $options[] = array('name' => __('首页文章列表上', 'wedn'), 'id' => 'ads_index_01_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'wedn') . ' ' . $adsdesc, 'id' => 'ads_index_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_index_01_m', 'std' => '', 'desc' => __('手机端', 'wedn') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('首页分页下', 'wedn'), 'id' => 'ads_index_02_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'wedn') . ' ' . $adsdesc, 'id' => 'ads_index_02', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_index_02_m', 'std' => '', 'desc' => __('手机端', 'wedn') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('文章页正文上', 'wedn'), 'id' => 'ads_post_01_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'wedn') . ' ' . $adsdesc, 'id' => 'ads_post_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_post_01_m', 'std' => '', 'desc' => __('手机端', 'wedn') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('文章页正文下', 'wedn'), 'id' => 'ads_post_02_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'wedn') . ' ' . $adsdesc, 'id' => 'ads_post_02', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_post_02_m', 'std' => '', 'desc' => __('手机端', 'wedn') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('文章页评论上', 'wedn'), 'id' => 'ads_post_03_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'wedn') . ' ' . $adsdesc, 'id' => 'ads_post_03', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_post_03_m', 'std' => '', 'desc' => __('手机端', 'wedn') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('分类页列表上', 'wedn'), 'id' => 'ads_cat_01_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'wedn') . ' ' . $adsdesc, 'id' => 'ads_cat_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_cat_01_m', 'std' => '', 'desc' => __('手机端', 'wedn') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('标签页列表上', 'wedn'), 'id' => 'ads_tag_01_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'wedn') . ' ' . $adsdesc, 'id' => 'ads_tag_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_tag_01_m', 'std' => '', 'desc' => __('手机端', 'wedn') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('搜索页列表上', 'wedn'), 'id' => 'ads_search_01_s', 'std' => false, 'desc' => __('开启', 'wedn'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'wedn') . ' ' . $adsdesc, 'id' => 'ads_search_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_search_01_m', 'std' => '', 'desc' => __('手机端', 'wedn') . ' ' . $adsdesc, 'type' => 'textarea');
    // ======================================================================================================================
    $options[] = array('name' => __('自定义代码', 'wedn'), 'type' => 'heading');
    $options[] = array('name' => __('自定义网站底部内容', 'wedn'), 'desc' => __('该块显示在网站底部版权上方,可已定义放一些链接或者图片之类的内容。', 'wedn'), 'id' => 'fcode', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => __('自定义CSS样式', 'wedn'), 'desc' => __('位于</head>之前,直接写样式代码,不用添加&lt;style&gt;标签', 'wedn'), 'id' => 'csscode', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => __('自定义头部代码', 'wedn'), 'desc' => __('位于</head>之前,这部分代码是在主要内容显示之前加载,通常是CSS样式、自定义的<meta>标签、全站头部JS等需要提前加载的代码', 'wedn'), 'id' => 'headcode', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => __('自定义底部代码', 'wedn'), 'desc' => __('位于&lt;/body&gt;之前,这部分代码是在主要内容加载完毕加载,通常是JS代码', 'wedn'), 'id' => 'footcode', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => __('网站统计代码', 'wedn'), 'desc' => __('位于底部,用于添加第三方流量数据统计代码,如:Google analytics、百度统计、CNZZ、51la,国内站点推荐使用百度统计,国外站点推荐使用Google analytics', 'wedn'), 'id' => 'trackcode', 'std' => '', 'type' => 'textarea');
    /**
     * For $settings options see:
     * http://codex.wordpress.org/Function_Reference/wp_editor
     *
     * 'media_buttons' are not supported as there is no post to attach items to
     * 'textarea_name' is set by the 'id' you choose
     */
    /*
    	$wp_editor_settings = array(
    		'wpautop' => true, // Default
    		'textarea_rows' => 5,
    		'tinymce' => array( 'plugins' => 'wordpress' )
    	);
    	$options[] = array(
    		'name' => __('Default Text Editor', 'options_framework_theme'),
    		'desc' => sprintf( __( 'You can also pass settings to the editor.  Read more about wp_editor in <a href="%1$s" target="_blank">the WordPress codex</a>', 'options_framework_theme' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ),
    		'id' => 'example_editor',
    		'type' => 'editor',
    		'settings' => $wp_editor_settings );
    */
    return $options;
}
Exemplo n.º 9
0
        $data = $_POST[$meta_box['name']];
        if (get_post_meta($post_id, $meta_box['name']) == "") {
            add_post_meta($post_id, $meta_box['name'], $data, true);
        } elseif ($data != get_post_meta($post_id, $meta_box['name'], true)) {
            update_post_meta($post_id, $meta_box['name'], $data);
        } elseif ($data == "") {
            delete_post_meta($post_id, $meta_box['name'], get_post_meta($post_id, $meta_box['name'], true));
        }
    }
}
/*
 * post meta link
 * ====================================================
*/
$postmeta_link = array(array("name" => "link", "std" => ""));
if (_wedn_option('post_link_excerpt_s') || _wedn_option('post_link_single_s')) {
    add_action('admin_menu', '_postmeta_link_create');
    add_action('save_post', '_postmeta_link_save');
}
function _postmeta_link()
{
    global $post, $postmeta_link;
    foreach ($postmeta_link as $meta_box) {
        $meta_box_value = get_post_meta($post->ID, $meta_box['name'], true);
        if ($meta_box_value == "") {
            $meta_box_value = $meta_box['std'];
        }
        echo '<p>' . $meta_box['title'] . '</p>';
        echo '<p><input type="text" style="width:98%" value="' . $meta_box_value . '" name="' . $meta_box['name'] . '"></p>';
    }
    echo '<input type="hidden" name="post_newmetaboxes_noncename" id="post_newmetaboxes_noncename" value="' . wp_create_nonce(plugin_basename(__FILE__)) . '" />';
Exemplo n.º 10
0
<?php

$pagemenus = _wedn_option('page_menu');
$menus = '';
if ($pagemenus) {
    foreach ($pagemenus as $key => $value) {
        if ($value) {
            $menus .= '<li><a href="' . get_permalink($key) . '">' . get_post($key)->post_title . '</a></li>';
        }
    }
}
?>
<div class="pageside">
	<div class="pagemenus">
		<ul class="pagemenu">
			<?php 
echo $menus;
?>
		</ul>
	</div>
</div>
Exemplo n.º 11
0
_the_ads($name = 'ads_cat_01', $class = 'asb-cat asb-cat-01');
?>
			<?php 
if (mo_is_minicat()) {
    $p_meta = _wedn_option('post_plugin');
    while (have_posts()) {
        the_post();
        echo '<article class="excerpt-minic">';
        echo '<h2><a' . _post_target_blank() . ' href="' . get_permalink() . '" title="' . get_the_title() . _get_delimiter() . get_bloginfo('name') . '">' . get_the_title() . '</a></h2>';
        echo '<p class="meta">';
        if ($p_meta && $p_meta['date']) {
            echo '<time><i class="fa fa-clock-o"></i>' . get_the_time('Y-m-d') . '</time>';
        }
        if ($p_meta && $p_meta['author']) {
            $author = get_the_author();
            if (_wedn_option('author_link')) {
                $author = '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . $author . '</a>';
            }
            echo '<span class="author"><i class="fa fa-user"></i>' . $author . '</span>';
        }
        if ($p_meta && $p_meta['view']) {
            echo '<span class="pv"><i class="fa fa-eye"></i>' . _get_post_views() . '</span>';
        }
        if (comments_open() && $p_meta && $p_meta['view']) {
            echo '<a class="pc" href="' . get_comments_link() . '"><i class="fa fa-comments-o"></i>评论(' . get_comments_number('0', '1', '%') . ')</a>';
        }
        echo '</p>';
        echo '<div class="article-content">';
        the_content();
        echo '</div>';
        echo '</article>';
Exemplo n.º 12
0
            echo '<a class="cat" href="' . get_category_link($category[0]->term_id) . '">' . $category[0]->cat_name . '<i></i></a> ';
        }
    }
    echo '<h2><a' . _post_target_blank() . ' href="' . get_permalink() . '" title="' . get_the_title() . _get_delimiter() . get_bloginfo('name') . '">' . get_the_title() . '</a></h2>';
    echo '</header>';
    echo '<p class="meta">';
    if ($p_meta && $p_meta['date']) {
        echo '<time><i class="fa fa-clock-o"></i>' . get_the_time('Y-m-d') . '</time>';
    }
    if ($p_meta && $p_meta['author']) {
        $author = get_the_author();
        if (_wedn_option('author_link')) {
            $author = '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . $author . '</a>';
        }
        echo '<span class="author"><i class="fa fa-user"></i>' . $author . '</span>';
    }
    if ($p_meta && $p_meta['view']) {
        echo '<span class="pv"><i class="fa fa-eye"></i>' . _get_post_views() . '</span>';
    }
    if (comments_open() && $p_meta && $p_meta['comm']) {
        echo '<a class="pc" href="' . get_comments_link() . '"><i class="fa fa-comments-o"></i>评论(' . get_comments_number('0', '1', '%') . ')</a>';
    }
    echo '</p>';
    echo '<p class="note">' . _get_excerpt() . '</p>';
    if (_wedn_option('post_link_excerpt_s')) {
        _moloader('mo_post_link');
    }
    echo '</article>';
}
_moloader('mo_paging');
wp_reset_query();
Exemplo n.º 13
0
    ?>
				<p><a id="cancel-comment-reply-link" href="javascript:;">取消</a></p>
			</div>
			<div class="comt-box">
				<textarea placeholder="<?php 
    echo _wedn_option('comment_text');
    ?>
" class="input-block-level comt-area" name="comment" id="comment" cols="100%" rows="3" tabindex="1" onkeydown="if(event.ctrlKey&amp;&amp;event.keyCode==13){document.getElementById('submit').click();return false};"></textarea>
				<div class="comt-ctrl">
					<div class="comt-tips"><?php 
    comment_id_fields();
    do_action('comment_form', $post->ID);
    ?>
</div>
					<button type="submit" name="submit" id="submit" tabindex="5"><?php 
    echo _wedn_option('comment_submit_text') ? _wedn_option('comment_submit_text') : '提交评论';
    ?>
</button>
					<!-- <span data-type="comment-insert-smilie" class="muted comt-smilie"><i class="icon-thumbs-up icon12"></i> 表情</span> -->
				</div>
			</div>

			<?php 
    if (!is_user_logged_in()) {
        ?>
				<?php 
        if (get_option('require_name_email')) {
            ?>
					<div class="comt-comterinfo" id="comment-author-info" <?php 
            if (!empty($comment_author)) {
                echo 'style="display:none"';
Exemplo n.º 14
0
    www: '<?php 
echo home_url();
?>
',
    uri: '<?php 
echo get_stylesheet_directory_uri();
?>
',
    ver: '<?php 
echo THEME_VERSION;
?>
',
	roll: <?php 
echo $roll;
?>
,
    ajaxpager: '<?php 
echo _wedn_option("ajaxpager");
?>
',
    url_rp: '<?php 
echo mo_get_user_rp();
?>
'
};
</script>
<?php 
wp_footer();
?>
</body>
</html>
Exemplo n.º 15
0
<div class="branding branding-black">
	<div class="container">
		<h2><?php 
echo _wedn_option('footer_brand_title');
?>
</h2>
		<?php 
for ($i = 1; $i <= 2; $i++) {
    if (_wedn_option('footer_brand_btn_text_' . $i) && _wedn_option('footer_brand_btn_href_' . $i)) {
        echo '<a' . (_wedn_option('footer_brand_btn_blank_' . $i) ? ' target="blank"' : '') . ' class="btn btn-lg" href="' . _wedn_option('footer_brand_btn_href_' . $i) . '">' . _wedn_option('footer_brand_btn_text_' . $i) . '</a>';
    }
}
?>
	</div>
</div>
Exemplo n.º 16
0
        ?>
>会员中心</li><?php 
    }
    ?>
		</ul>
		<ul class="widget-navcontent">
			<?php 
    if ($s_notice && _wedn_option('site_notice_cat')) {
        ?>
				<li class="item item-01<?php 
        echo $s_notice ? ' active' : '';
        ?>
">
					<ul>
						<?php 
        $args = array('ignore_sticky_posts' => 1, 'showposts' => 5, 'cat' => _wedn_option('site_notice_cat'));
        query_posts($args);
        while (have_posts()) {
            the_post();
            echo '<li><time>' . get_the_time('m-d') . '</time><a target="_blank" href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
        }
        wp_reset_query();
        ?>
					</ul>
				</li>
			<?php 
    }
    ?>
			<?php 
    if ($s_user) {
        ?>
Exemplo n.º 17
0
?>

<div class="pageheader">
	<div class="container">
		<div class="share bdsharebuttonbox">
			<?php 
_moloader('mo_share', false);
mo_share('renren');
?>
		</div>
		<h1><?php 
the_title();
?>
</h1>
		<div class="note"><?php 
echo _wedn_option('navpage_desc') ? _wedn_option('navpage_desc') : '这里显示的是网址导航的一句话描述...';
?>
</div>
	</div>
</div>

<section class="container" id="navs">
	<nav>
		<ul></ul>
	</nav>
	<div class="items">
		<?php 
wp_list_bookmarks(array('category' => $link_cat_ids, 'show_description' => true, 'between' => '<br>', 'title_li' => __(''), 'category_before' => '<div class="item">', 'category_after' => '</div>'));
?>
	</div>
</section>
Exemplo n.º 18
0
    the_title();
    ?>
</a></h1>
		</header>
		<article class="article-content">
			<?php 
    the_content();
    ?>
		</article>
		<?php 
}
?>

		<ul class="plinks">
			<?php 
$links_cat = _wedn_option('page_links_cat');
$links = array();
if ($links_cat) {
    foreach ($links_cat as $key => $value) {
        if ($value) {
            $links[] = $key;
        }
    }
}
$links = implode(',', $links);
if (!empty($links)) {
    wp_list_bookmarks(array('category' => $links));
}
?>
		</ul>
Exemplo n.º 19
0
}
?>
		</div>
		<?php 
$args = array('ignore_sticky_posts' => 1, 'paged' => $paged);
if (_wedn_option('notinhome')) {
    $pool = array();
    foreach (_wedn_option('notinhome') as $key => $value) {
        if ($value) {
            $pool[] = $key;
        }
    }
    $args['cat'] = '-' . implode($pool, ',-');
}
if (_wedn_option('notinhome_post')) {
    $pool = _wedn_option('notinhome_post');
    $args['post__not_in'] = explode("\n", $pool);
}
query_posts($args);
?>
		<?php 
get_template_part('excerpt');
?>
		<?php 
_the_ads($name = 'ads_index_02', $class = 'asb-index asb-index-02');
?>
	</div>
	</div>
	<?php 
get_sidebar();
?>
Exemplo n.º 20
0
     }
     // insert post data
     $in_data = array('post_title' => $title, 'post_author' => $cuid, 'post_content' => $content);
     $in_id = wp_insert_post($in_data);
     // fail
     if (!$in_id) {
         print_r(json_encode(array('error' => 1, 'msg' => '投稿失败,请稍后再试')));
         exit;
     }
     // insert post meta
     if (!empty($url)) {
         add_post_meta($in_id, 'fromurl_value', $url, true);
     }
     // mail message
     if (_wedn_option('tougao_mail_send')) {
         wp_mail(_wedn_option('tougao_mail_to'), '站长,有新投稿:' . $title, $content);
     }
     print_r(json_encode(array('error' => 0, 'msg' => '投稿成功,站长审核中...')));
     exit;
     break;
 case 'posts':
     $status_all = array('publish', 'draft', 'pending', 'trash', 'future');
     if ($ui['status'] == 'all') {
         $post_status = $status_all;
     } else {
         if (!in_array($ui['status'], $status_all)) {
             die('a');
         }
         $post_status = $ui['status'];
     }
     $args = array('ignore_sticky_posts' => 1, 'showposts' => 10, 'paged' => $ui['paged'], 'orderby' => 'date', 'author' => $cuid, 'post_status' => $post_status);
Exemplo n.º 21
0
"><?php 
    the_title();
    ?>
</a></h1>
		</header>
		<article class="article-content">
			<?php 
    the_content();
    ?>
		</article>
		<?php 
}
?>

		<div class="readers">
			<?php 
//readers_wall(1, 6, 100);
?>
			<?php 
readers_wall(1, _wedn_option('readwall_limit_time'), _wedn_option('readwall_limit_number'));
?>
		</div>

		<?php 
comments_template('', true);
?>
	</div>
</div>

<?php 
get_footer();
Exemplo n.º 22
0
    <div class="action-share bdsharebuttonbox">
      <?php 
_moloader('mo_share');
?>
    </div>
    <div class="article-tags"><?php 
the_tags('标签:', '', '');
?>
</div>
    <?php 
_the_ads($name = 'ads_post_02', $class = 'asb-post asb-post-02');
?>
    <?php 
if (_wedn_option('post_related_s')) {
    _moloader('mo_posts_related', false);
    mo_posts_related(_wedn_option('related_title'), _wedn_option('post_related_n'));
}
?>
    <?php 
_the_ads($name = 'ads_post_03', $class = 'asb-post asb-post-03');
?>
    <?php 
comments_template('', true);
?>
  </div>
  </div>
  <?php 
get_sidebar();
?>
</section>
Exemplo n.º 23
0
    ?>
			<?php 
} else {
    ?>
				<?php 
    _moloader('mo_get_user_rp', false);
    ?>
				<a href="javascript:;" class="signin-loader">Hi, 请登录</a>
				&nbsp; &nbsp; <a href="javascript:;" class="signup-loader">我要注册</a>
				&nbsp; &nbsp; <a href="<?php 
    echo mo_get_user_rp();
    ?>
">找回密码</a>
			<?php 
}
?>
		</div>
		<i class="fa fa-bars m-icon-nav"></i>
	</div>
</header>
<div class="site-search">
	<div class="container">
		<?php 
if (_wedn_option('search_baidu') && _wedn_option('search_baidu_code')) {
    echo _wedn_option('search_baidu_code');
} else {
    echo '<form method="get" class="site-search-form" action="' . esc_url(home_url('/')) . '" ><input class="search-input" name="s" type="text" placeholder="输入关键字" value="' . htmlspecialchars($s) . '"><button class="search-btn" type="submit"><i class="fa fa-search"></i></button></form>';
}
?>
	</div>
</div>
Exemplo n.º 24
0
<?php

if (_wedn_option('layout') == '1') {
    return;
}
?>
<aside class="sidebar">
<?php 
_moloader('mo_notice', false);
if (function_exists('dynamic_sidebar')) {
    dynamic_sidebar('gheader');
    if (is_home()) {
        dynamic_sidebar('home');
    } elseif (is_category()) {
        dynamic_sidebar('cat');
    } else {
        if (is_tag()) {
            dynamic_sidebar('tag');
        } else {
            if (is_search()) {
                dynamic_sidebar('search');
            } else {
                if (is_single()) {
                    dynamic_sidebar('single');
                }
            }
        }
    }
    dynamic_sidebar('gfooter');
}
?>
Exemplo n.º 25
0
function _post_copyright($content)
{
    _moloader('mo_is_minicat', false);
    if (!is_page() && !mo_is_minicat()) {
        if (_wedn_option('ads_post_footer_s')) {
            $content .= '<p class="asb-post-footer"><b>AD:</b><strong>【' . _wedn_option('ads_post_footer_pretitle') . '】</strong><a' . (_wedn_option('ads_post_footer_link_blank') ? ' target="_blank"' : '') . ' href="' . _wedn_option('ads_post_footer_link') . '">' . _wedn_option('ads_post_footer_title') . '</a></p>';
        }
        if (_wedn_option('post_copyright_s')) {
            $content .= '<p class="post-copyright">' . _wedn_option('post_copyright') . '<a href="' . get_bloginfo('url') . '">' . get_bloginfo('name') . '</a> &raquo; <a href="' . get_permalink() . '">' . get_the_title() . '</a></p>';
        }
    }
    return $content;
}