예제 #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" href="' . $link . '"' . (_hui('post_link_blank_s') ? ' target="_blank"' : '') . (_hui('post_link_nofollow_s') ? ' rel="external nofollow"' : '') . '>' . (is_single() ? '<i class="glyphicon glyphicon-share-alt"></i>' : '') . _hui('post_link_h1') . ' <i class="fa fa-hand-o-right"></i></a></div>';
    }
}
예제 #2
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 . '"' . (_hui('post_link_blank_s') ? ' target="_blank"' : '') . (_hui('post_link_nofollow_s') ? ' rel="external nofollow"' : '') . '>' . _hui('post_link_h1') . '</a></div>';
    }
}
예제 #3
0
function hui_recent_posts_most()
{
    global $wpdb;
    // $days=400;
    $days = _hui('most_list_date');
    $limit = _hui('most_list_number');
    $output = '';
    if (!_hui('most_list_style') || _hui('most_list_style') == 'comment') {
        $today = date("Y-m-d H:i:s");
        $daysago = date("Y-m-d H:i:s", strtotime($today) - $days * 24 * 60 * 60);
        $result = $wpdb->get_results("SELECT comment_count, ID, post_title, post_date FROM {$wpdb->posts} WHERE post_date BETWEEN '{$daysago}' AND '{$today}' AND post_status='publish' AND post_type='post' ORDER BY comment_count DESC LIMIT 0 , {$limit}");
        if (empty($result)) {
            $output = '<li>' . __('暂无文章!', 'haoui') . __('近期有评论的文章才会显示在这里,你也可以在主题设置中选择按阅读数排行。', 'haoui') . '</li>';
        } else {
            $i = 1;
            foreach ($result as $topten) {
                $postid = $topten->ID;
                $title = $topten->post_title;
                $commentcount = $topten->comment_count;
                if ($commentcount != 0) {
                    $output .= '<li><p class="text-muted"><span class="post-comments">' . __('评论', 'haoui') . ' (' . $commentcount . ')</span>' . hui_get_post_like($class = 'post-like', $pid = $postid) . '</p><span class="label label-' . $i . '">' . $i . '</span><a' . hui_target_blank() . ' href="' . get_permalink($postid) . '" title="' . $title . '">' . $title . '</a></li>';
                    $i++;
                }
            }
        }
    } else {
        if (_hui('most_list_style') == 'view') {
            global $post;
            $limit_date = current_time('timestamp') - $days * 86400;
            $limit_date = date("Y-m-d H:i:s", $limit_date);
            $where = '';
            $mode = 'post';
            if (!empty($mode) && $mode != 'both') {
                $where = "post_type = '{$mode}'";
            } else {
                $where = '1=1';
            }
            $most_viewed = $wpdb->get_results("SELECT DISTINCT {$wpdb->posts}.*, (meta_value+0) AS views FROM {$wpdb->posts} LEFT JOIN {$wpdb->postmeta} ON {$wpdb->postmeta}.post_id = {$wpdb->posts}.ID WHERE post_date < '" . current_time('mysql') . "' AND post_date > '" . $limit_date . "' AND {$where} AND post_status = 'publish' AND meta_key = 'views' AND post_password = '' ORDER  BY views DESC LIMIT {$limit}");
            if ($most_viewed) {
                $i = 1;
                foreach ($most_viewed as $post) {
                    $title = get_the_title();
                    $post_views = intval($post->views);
                    // $output .= '<li class="item-'.$i.'"><a target="_blank" href="'.get_permalink($postid).'">'._get_post_thumbnail(array()).'<h2>'.$post_title.'</h2><p>'.hui_get_post_date( get_the_time('Y-m-d H:i:s') ).'<span class="post-views">阅读('.$post_views.')</span></p></a></li>';
                    $output .= '<li><p class="text-muted"><span class="post-comments">' . __('阅读', 'haoui') . ' (' . $post_views . ')</span>' . hui_get_post_like($class = 'post-like', $pid = $postid) . '</p><span class="label label-' . $i . '">' . $i . '</span><a' . hui_target_blank() . ' href="' . get_permalink($postid) . '" title="' . $title . '">' . $title . '</a></li>';
                    $i++;
                }
            } else {
                $output = '<li>' . __('暂无文章!', 'haoui') . '</li>';
            }
        }
    }
    echo '<div class="most-comment-posts">
            <h3 class="title"><strong>' . _hui('most_list_title') . '</strong></h3>
            <ul>' . $output . '</ul>
        </div>';
}
/**
 * [mo_get_user_page description]
 * @return [type] [description]
 */
function mo_get_user_page()
{
    $pid = _hui('user_page');
    if (!$pid) {
        return false;
    }
    if (get_permalink($pid)) {
        return get_permalink($pid);
    }
    return false;
}
예제 #5
0
function hui_post_link()
{
    global $post;
    $post_ID = $post->ID;
    $link = get_post_meta($post_ID, 'link', true);
    $linktitle = get_post_meta($post_ID, 'linktitle', true);
    if ($link) {
        if ($linktitle) {
            echo '<a class="post-linkto' . (is_single() ? ' action' : '') . '" href="' . $link . '"' . (_hui('post_link_blank_s') ? ' target="_blank"' : '') . (_hui('post_link_nofollow_s') ? ' rel="external nofollow"' : '') . '>' . (is_single() ? '<i class="glyphicon glyphicon-share-alt"></i>' : '') . $linktitle . '</a>';
        } else {
            echo '<a class="post-linkto' . (is_single() ? ' action' : '') . '" href="' . $link . '"' . (_hui('post_link_blank_s') ? ' target="_blank"' : '') . (_hui('post_link_nofollow_s') ? ' rel="external nofollow"' : '') . '>' . (is_single() ? '<i class="glyphicon glyphicon-share-alt"></i>' : '') . _hui('post_link_h1') . '</a>';
        }
    }
}
예제 #6
0
function hui_focusslide()
{
    $indicators = '';
    $inner = '';
    $sort = _hui('focusslide_sort') ? _hui('focusslide_sort') : '1 2 3 4 5';
    $sort = array_unique(explode(' ', trim($sort)));
    $i = 0;
    foreach ($sort as $key => $value) {
        if (_hui('focusslide_src_' . $value) && _hui('focusslide_href_' . $value) && _hui('focusslide_title_' . $value)) {
            $indicators .= '<li data-target="#slider" data-slide-to="' . $i . '"' . (!$i ? ' class="active"' : '') . '></li>';
            $inner .= '<div class="item' . (!$i ? ' active' : '') . '"><a' . (_hui('focusslide_blank_' . $value) ? ' target="_blank"' : '') . ' href="' . _hui('focusslide_href_' . $value) . '"><img src="' . _hui('focusslide_src_' . $value) . '"><span class="carousel-caption">' . _hui('focusslide_title_' . $value) . '</span><span class="carousel-bg"></span></a></div>';
            $i++;
        }
    }
    echo '<div id="slider" class="carousel slide" data-ride="carousel"><ol class="carousel-indicators">' . $indicators . '</ol><div class="carousel-inner">' . $inner . '</div><a class="left carousel-control" href="#slider" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span></a><a class="right carousel-control" href="#slider" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span></a></div>';
}
예제 #7
0
/**
 * [mo_minicat description]
 * @return html [description]
 */
function mo_minicat()
{
    if (!_hui('minicat')) {
        return;
    }
    $args = array('ignore_sticky_posts' => 1, 'showposts' => 1, 'cat' => _hui('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) . '">【' . (_hui('minicat_home_title') ? _hui('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();
}
예제 #8
0
/**
 * [mo_slider description]
 * @param  string $id   [description]
 * @return html         [description]
 */
function mo_slider($id = 'slider')
{
    $indicators = '';
    $inner = '';
    $sort = _hui($id . '_sort') ? _hui($id . '_sort') : '1 2 3 4 5';
    $sort = array_unique(explode(' ', trim($sort)));
    $i = 0;
    foreach ($sort as $key => $value) {
        if (_hui($id . '_src_' . $value) && _hui($id . '_href_' . $value) && _hui($id . '_title_' . $value)) {
            $indicators .= '<li data-target="#' . $id . '" data-slide-to="' . $i . '"' . (!$i ? ' class="active"' : '') . '></li>';
            $inner .= '<div class="item' . (!$i ? ' active' : '') . '"><a' . (_hui($id . '_blank_' . $value) ? ' target="_blank"' : '') . ' href="' . _hui($id . '_href_' . $value) . '"><img src="' . _hui($id . '_src_' . $value) . '"></a></div>';
            // <span class="carousel-caption">'._hui($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>';
}
예제 #9
0
function hui_posts_focus()
{
    $html = '';
    $html .= '<li class="large"><a' . hui_target_blank() . ' href="' . _hui('focus_href') . '"><img class="thumb" data-original="' . _hui('focus_src') . '"><h4>' . _hui('focus_title') . '</h4></a></li>';
    $sticky = get_option('sticky_posts');
    rsort($sticky);
    query_posts(array('post__in' => $sticky, 'ignore_sticky_posts' => 1, 'showposts' => 4));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $html .= '<li><a' . hui_target_blank() . ' href="' . get_permalink() . '">';
            $html .= hui_get_thumbnail();
            $html .= '<h4>' . get_the_title() . '</h4>';
            $html .= '</a></li>';
        }
    }
    wp_reset_query();
    echo '<div class="focusmo"><ul>' . $html . '</ul></div>';
}
예제 #10
0
function hui_posts_sticky()
{
    $title = _hui('sticky_title');
    $showposts = _hui('sticky_limit');
    $sticky = get_option('sticky_posts');
    rsort($sticky);
    query_posts(array('post__in' => $sticky, 'ignore_sticky_posts' => 1, 'showposts' => $showposts));
    if (have_posts()) {
        printf('<div class="sticky"><h3 class="title"><strong>' . $title . '</strong></h3><ul>');
        while (have_posts()) {
            the_post();
            echo '<li class="item"><a' . hui_target_blank() . ' href="' . get_permalink() . '">';
            echo hui_get_thumbnail();
            echo get_the_title();
            echo '</a></li>';
        }
        printf('</ul></div>');
    }
    wp_reset_query();
}
예제 #11
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 (!_hui('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 && _hui('post_from_link_s')) {
            $from = '<a href="' . $fromurl . '" target="_blank" rel="external nofollow">' . $fromname . '</a>';
        } else {
            $from = $fromname;
        }
        $from = (_hui('post_from_h1') ? _hui('post_from_h1') : $prevtext) . $from;
    }
    return $from;
}
예제 #12
0
/**
 * [mo_is_minicat description]
 * @return bool [description]
 */
function mo_is_minicat()
{
    if (!_hui('minicat_s')) {
        return false;
    }
    if (!_hui('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 == _hui('minicat')) {
        return true;
    }
    return false;
}
예제 #13
0
    ?>
                <li>
                    <time><?php 
    the_time('d');
    ?>
日</time>
                    <a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
 </a>
                    <span class="text-muted"><?php 
    echo hui_get_comment_number();
    ?>
</span>
                </li>
            <?php 
}
?>
            </ul>
        </div>
        </article>
    </div>
</div>
<?php 
if (_hui('archives_sidebar_s')) {
    get_sidebar();
}
get_footer();
예제 #14
0
파일: footer.php 프로젝트: yszar/linuxwp
} else {
    if ((is_category() || is_tag() || is_search()) && _hui('sideroll_list_s')) {
        $roll = _hui('sideroll_list');
    } else {
        if (is_single() && _hui('sideroll_post_s')) {
            $roll = _hui('sideroll_post');
        } else {
            if (is_page() && _hui('sideroll_page_s')) {
                $roll = _hui('sideroll_page');
            }
        }
    }
}
$ajaxpager = '0';
if ((!wp_is_mobile() && _hui('ajaxpager_s') || wp_is_mobile() && _hui('ajaxpager_s_m')) && _hui('ajaxpager')) {
    $ajaxpager = _hui('ajaxpager');
}
?>
<script>
window.jui = {
	uri: '<?php 
echo THEME_URI;
?>
',
	roll: '<?php 
echo $roll;
?>
',
	ajaxpager: '<?php 
echo $ajaxpager;
?>
예제 #15
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 (_hui('post_link_excerpt_s') || _hui('post_link_single_s')) {
    add_action('admin_menu', 'hui_postmeta_link_create');
    add_action('save_post', 'hui_postmeta_link_save');
}
function hui_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__)) . '" />';
예제 #16
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 = __('可添加任意广告联盟代码或自定义代码', 'haoui');
    $options = array();
    // ======================================================================================================================
    $options[] = array('name' => __('基本设置', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('Logo', 'haoui'), 'id' => 'logo_src', 'desc' => __('最大宽:180px;最大高:32px;建议尺寸:140*32px 格式:png', 'haoui'), 'std' => 'http://www.daqianduan.com/wp-content/uploads/2015/01/logo.png', 'type' => 'upload');
    $options[] = array('name' => __('布局', 'haoui'), 'id' => 'layout', 'std' => "2", 'type' => "radio", 'desc' => __("2种布局供选择,点击选择你喜欢的布局方式,保存后前端展示会有所改变。", 'haoui'), 'options' => array('2' => __('有侧边栏', 'haoui'), '1' => __('无侧边栏', 'haoui')));
    $options[] = array('name' => __("主题风格", 'haoui'), 'desc' => __("14种颜色供选择,点击选择你喜欢的颜色,保存后前端展示会有所改变。", 'haoui'), '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' => __('不喜欢上面提供的颜色,你好可以在这里自定义设置,如果不用自定义颜色清空即可(默认不用自定义)', 'haoui'), 'type' => "color");
    $options[] = array('name' => __('全站连接符', 'haoui'), 'id' => 'connector', 'desc' => __('一经选择,切勿更改,对SEO不友好,一般为“-”或“_”', 'haoui'), 'std' => _hui('connector') ? _hui('connector') : '-', 'type' => 'text', 'class' => 'mini');
    $options[] = array('name' => __('网页最大宽度', 'haoui'), 'id' => 'site_width', 'std' => 1200, 'class' => 'mini', 'desc' => __('默认:1200,单位:px(像素)', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('jQuery底部加载', 'haoui'), 'id' => 'jquery_bom', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'haoui') . __('(可提高页面内容加载速度,但部分依赖jQuery的插件可能失效)', 'haoui'));
    $options[] = array('name' => __('Gravatar 头像获取', 'haoui'), 'id' => 'gravatar_url', 'std' => "ssl", 'type' => "radio", 'options' => array('no' => __('原有方式', 'haoui'), 'ssl' => __('从Gravatar官方ssl获取', 'haoui'), 'duoshuo' => __('从多说服务器获取', 'haoui')));
    $options[] = array('name' => __('JS文件托管(可大幅提速JS加载)', 'haoui'), 'id' => 'js_outlink', 'std' => "no", 'type' => "radio", 'options' => array('no' => __('不托管', 'haoui'), 'baidu' => __('百度', 'haoui'), '360' => __('360', 'haoui'), 'he' => __('框架来源站点(分别引入jquery和bootstrap官方站点JS文件)', 'haoui')));
    $options[] = array('name' => __('网站整体变灰', 'haoui'), 'id' => 'site_gray', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'haoui') . __('(支持IE、Chrome,基本上覆盖了大部分用户,不会降低访问速度)', 'haoui'));
    $options[] = array('name' => __('分类url去除category字样', 'haoui'), 'id' => 'no_categoty', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'haoui') . __('(主题已内置no-category插件功能,请不要安装插件;开启后请去设置-固定连接中点击保存即可)', 'haoui'));
    $options[] = array('name' => __('品牌文字', 'haoui'), 'id' => 'brand', 'std' => "欢迎光临\n我们一直在努力", 'desc' => __('显示在Logo旁边的两个短文字,请换行填写两句文字(短文字介绍)', 'haoui'), 'settings' => array('rows' => 2), 'type' => 'textarea');
    $options[] = array('name' => __('首页关键字(keywords)', 'haoui'), 'id' => 'keywords', 'std' => '一个网站, 一个牛x的网站', 'desc' => __('关键字有利于SEO优化,建议个数在5-10之间,用英文逗号隔开', 'haoui'), 'settings' => array('rows' => 2), 'type' => 'textarea');
    $options[] = array('name' => __('首页描述(description)', 'haoui'), 'id' => 'description', 'std' => __('本站是一个高端大气上档次的网站', 'haoui'), 'desc' => __('描述有利于SEO优化,建议字数在30-70之间', 'haoui'), 'settings' => array('rows' => 3), 'type' => 'textarea');
    $options[] = array('name' => __('网站底部信息', 'haoui'), 'id' => 'footer_seo', 'std' => '<a href="' . site_url('/sitemap.xml') . '">' . __('网站地图', 'haoui') . '</a>' . "\n", 'desc' => __('备案号可写于此,网站地图可自行使用sitemap插件自动生成', 'haoui'), 'type' => 'textarea');
    $options[] = array('name' => __('百度自定义站内搜索', 'haoui'), 'id' => 'search_baidu', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'haoui'));
    $options[] = array('id' => 'search_baidu_code', 'std' => '', 'desc' => __('此处存放百度自定义站内搜索代码,请自行去 http://zn.baidu.com/ 设置并获取', 'haoui'), 'settings' => array('rows' => 2), 'type' => 'textarea');
    $options[] = array('name' => __('新窗口打开文章', 'haoui'), 'id' => 'target_blank', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'haoui'));
    $options[] = array('name' => __('首页不显示该分类下文章', 'haoui'), 'id' => 'notinhome', 'options' => $options_categories, 'type' => 'multicheck');
    $options[] = array('name' => __('首页不显示以下ID的文章', 'haoui'), 'id' => 'notinhome_post', 'std' => "11245\n12846", 'desc' => __('每行填写一个文章ID', 'haoui'), 'settings' => array('rows' => 2), 'type' => 'textarea');
    $options[] = array('name' => __('分页无限加载页数', 'haoui'), 'id' => 'ajaxpager', 'std' => 5, 'class' => 'mini', 'desc' => __('为0时表示不开启该功能', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('列表模式', 'haoui'), 'id' => 'list_type', 'std' => "thumb", 'type' => "radio", 'options' => array('thumb' => __('图文(缩略图尺寸:220*150px,默认已自动裁剪)', 'haoui'), 'text' => __('文字 ', 'haoui')));
    /*
    	$options[] = array(
    		'id' => 'list_thumb_out',
    		'type' => "checkbox",
    		'std' => false,
    		'desc' => __('缩略图使用外链图片 (外链是没有缩略图的,所以不会是小图,浩子不建议外链图,但如果你的文章都是外链图片,这个可以帮你实现以上的列表模式) ', 'haoui'));*/
    $options[] = array('name' => __('文章小部件开启', 'haoui'), 'id' => 'post_plugin', 'std' => array('view' => 1, 'comm' => 1, 'date' => 1, 'author' => 1), 'type' => "multicheck", 'options' => array('view' => __('阅读量(无需安装插件)', 'haoui'), 'comm' => __('列表评论数', 'haoui'), 'date' => __('列表时间', 'haoui'), 'author' => __('列表作者名', 'haoui')));
    $options[] = array('name' => __('文章作者名加链接', 'haoui'), 'id' => 'author_link', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'haoui') . __('(列表和文章有作者的地方都会加上链接) ', 'haoui'));
    /*
    	$options[] = array(
    		'name' => __('评论数只显示人为评论数量', 'haoui'),
    		'id' => 'comment_number_remove_trackback',
    		'type' => "checkbox",
    		'std' => false,
    		'desc' => __('开启', 'haoui').__('(部分文章有trackback导致评论数的增加,这个可以过滤掉) ', 'haoui'));
    */
    // ======================================================================================================================
    $options[] = array('name' => __('文章页', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('相关文章', 'haoui'), 'id' => 'post_related_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'haoui'));
    $options[] = array('desc' => __('相关文章标题', 'haoui'), 'id' => 'related_title', 'std' => __('相关推荐', 'haoui'), 'type' => 'text');
    $options[] = array('desc' => __('相关文章显示数量', 'haoui'), 'id' => 'post_related_n', 'std' => 8, 'class' => 'mini', 'type' => 'text');
    $options[] = array('name' => __('文章来源', 'haoui'), 'id' => 'post_from_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'haoui'));
    $options[] = array('id' => 'post_from_h1', 'std' => __('来源:', 'haoui'), 'desc' => __('来源显示字样', 'haoui'), 'type' => 'text');
    $options[] = array('id' => 'post_from_link_s', 'type' => "checkbox", 'std' => true, 'desc' => __('来源加链接', 'haoui'));
    /*$options[] = array(
    		'name' => __('文章段落缩进', 'haoui'),
    		'id' => 'post_p_s',
    		'type' => "checkbox",
    		'std' => false,
    		'desc' => __('开启', 'haoui'));*/
    $options[] = array('name' => __('文章页尾版权提示', 'haoui'), 'id' => 'post_copyright_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'haoui'));
    $options[] = array('name' => __('文章页尾版权提示前缀', 'haoui'), 'id' => 'post_copyright', 'std' => __('未经允许不得转载:', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('自动添加关键字和描述', 'haoui'), 'id' => 'site_keywords_description_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'haoui') . __('(开启后所有页面将自动使用主题配置的关键字和描述,具体规则可以自行查看页面源码得知)', 'haoui'));
    $options[] = array('name' => __('文章关键字和描述自定义', 'haoui'), 'id' => 'post_keywords_description_s', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'haoui') . __('(开启后你需要在编辑文章的时候书写关键字和描述,如果为空,将自动使用主题配置的关键字和描述;开启这个必须开启上面的“自动添加关键字和描述”)', 'haoui'));
    // ======================================================================================================================
    $options[] = array('name' => __('网址导航', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('网址导航标题下描述', 'haoui'), 'id' => 'navpage_desc', 'std' => '这里显示的是网址导航的一句话描述...', 'type' => 'text');
    $options[] = array('name' => __('选择链接分类到网址导航', 'haoui'), 'id' => 'navpage_cats', 'options' => $options_linkcats, 'type' => 'multicheck');
    // ======================================================================================================================
    $options[] = array('name' => __('会员中心', 'haoui'), 'type' => 'heading');
    $options[] = array('id' => 'user_page_s', 'std' => true, 'desc' => __('开启会员中心', 'haoui'), 'type' => 'checkbox');
    $options[] = array('id' => 'user_on_notice_s', 'std' => true, 'desc' => __('在首页公告栏显示会员模块', 'haoui'), 'type' => 'checkbox');
    $options[] = array('name' => __('选择会员中心页面', 'haoui'), 'id' => 'user_page', 'desc' => '如果没有合适的页面作为会员中心,你需要去新建一个页面再来选择', 'options' => $options_pages, 'type' => 'select');
    $options[] = array('name' => __('选择找回密码页面', 'haoui'), 'id' => 'user_rp', 'desc' => '如果没有合适的页面作为找回密码页面,你需要去新建一个页面再来选择', 'options' => $options_pages, 'type' => 'select');
    /*
    	$options[] = array(
    		'name' => __('禁止昵称关键字', 'haoui'),
    		'desc' => __('一行一个关键字,用户昵称将不能使用或包含这些关键字,对编辑以下职位有效', 'haoui'),
    		'id' => 'user_nickname_out',
    		'std' => "赌博\n博彩\n彩票\n性爱\n色情\n做爱\n爱爱\n淫秽\n傻b\n妈的\n妈b\nadmin\ntest",
    		'type' => 'textarea');*/
    // ======================================================================================================================
    $options[] = array('name' => __('微分类', 'haoui'), 'type' => 'heading');
    $options[] = array('id' => 'minicat_s', 'std' => true, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('id' => 'minicat_home_s', 'std' => true, 'desc' => __('在首页显示微分类最新文章', 'haoui'), 'type' => 'checkbox');
    $options[] = array('name' => __('首页模块前缀', 'haoui'), 'id' => 'minicat_home_title', 'desc' => '默认为:今日观点', 'std' => '今日观点', 'type' => 'text');
    $options[] = array('name' => __('选择分类设置为微分类', 'haoui'), 'desc' => __('选择一个使用微分类展示模版,分类下文章将全文输出到微分类列表', 'haoui'), 'id' => 'minicat', 'options' => $options_categories, 'type' => 'select');
    // ======================================================================================================================
    $options[] = array('name' => __('全站底部推广区', 'haoui'), 'type' => 'heading');
    $options[] = array('id' => 'footer_brand_s', 'std' => true, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('name' => __('推广标题', 'haoui'), 'id' => 'footer_brand_title', 'desc' => '建议20字内', 'std' => '大前端WP主题 更专业 更方便', 'type' => 'text');
    for ($i = 1; $i <= 2; $i++) {
        $options[] = array('name' => __('按钮 ', 'haoui') . $i, 'id' => 'footer_brand_btn_text_' . $i, 'desc' => '按钮文字', 'std' => '联系我们', 'type' => 'text');
        $options[] = array('id' => 'footer_brand_btn_href_' . $i, 'desc' => __('按钮链接', 'haoui'), 'std' => 'http://www.daqianduan.com/contact', 'type' => 'text');
        $options[] = array('id' => 'footer_brand_btn_blank_' . $i, 'std' => true, 'desc' => __('新窗口打开', 'haoui'), 'type' => 'checkbox');
    }
    // ======================================================================================================================
    $options[] = array('name' => __('首页公告', 'haoui'), 'type' => 'heading');
    $options[] = array('id' => 'site_notice_s', 'std' => true, 'desc' => __('显示公告模块', 'haoui'), 'type' => 'checkbox');
    $options[] = array('name' => __('显示标题', 'haoui'), 'id' => 'site_notice_title', 'desc' => '建议4字内,默认:网站公告', 'std' => '网站公告', 'type' => 'text');
    $options[] = array('name' => __('选择分类设置为网站公告', 'haoui'), 'id' => 'site_notice_cat', 'options' => $options_categories, 'type' => 'select');
    // ======================================================================================================================
    $options[] = array('name' => __('首页焦点图', 'haoui'), 'type' => 'heading');
    $options[] = array('id' => 'focusslide_s', 'std' => true, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('name' => __('排序', 'haoui'), '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' => __('图', 'haoui') . $i, 'id' => 'focusslide_title_' . $i, 'desc' => '标题', 'std' => 'xiu主题 - 大前端', 'type' => 'text');
        $options[] = array('id' => 'focusslide_href_' . $i, 'desc' => __('链接', 'haoui'), 'std' => 'http://www.daqianduan.com/theme/xiu', 'type' => 'text');
        $options[] = array('id' => 'focusslide_blank_' . $i, 'std' => true, 'desc' => __('新窗口打开', 'haoui'), 'type' => 'checkbox');
        $options[] = array('id' => 'focusslide_src_' . $i, 'desc' => __('图片,尺寸:', 'haoui') . '820*200', 'std' => 'http://www.daqianduan.com/wp-content/uploads/2014/11/hs-xiu.jpg', 'type' => 'upload');
    }
    // ======================================================================================================================
    $options[] = array('name' => __('侧栏随动', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('首页', 'haoui'), 'id' => 'sideroll_index_s', 'std' => true, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('id' => 'sideroll_index', 'std' => '1 2', 'class' => 'mini', 'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('分类/标签/搜索页', 'haoui'), 'id' => 'sideroll_list_s', 'std' => true, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('id' => 'sideroll_list', 'std' => '1 2', 'class' => 'mini', 'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('文章页', 'haoui'), 'id' => 'sideroll_post_s', 'std' => true, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('id' => 'sideroll_post', 'std' => '1 2', 'class' => 'mini', 'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块 ', 'haoui'), 'type' => 'text');
    // ======================================================================================================================
    $options[] = array('name' => __('直达链接', 'haoui'), 'type' => 'heading');
    /*$options[] = array(
    		'name' => __('在文章列表显示', 'haoui'),
    		'id' => 'post_link_excerpt_s',
    		'type' => "checkbox",
    		'std' => false,
    		'desc' => __('开启', 'haoui'));*/
    $options[] = array('name' => __('在文章页面显示', 'haoui'), 'id' => 'post_link_single_s', 'type' => "checkbox", 'std' => false, 'desc' => __('开启', 'haoui'));
    $options[] = array('name' => __('新窗口打开链接', 'haoui'), 'id' => 'post_link_blank_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'haoui'));
    $options[] = array('name' => __('链接添加 nofollow', 'haoui'), 'id' => 'post_link_nofollow_s', 'type' => "checkbox", 'std' => true, 'desc' => __('开启', 'haoui'));
    $options[] = array('name' => __('自定义显示文字', 'haoui'), 'id' => 'post_link_h1', 'type' => "text", 'std' => '直达链接', 'desc' => __('默认为“直达链接” ', 'haoui'));
    // ======================================================================================================================
    $options[] = array('name' => __('独立页面', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('读者墙', 'haoui'), 'id' => 'readwall_limit_time', 'std' => 200, 'class' => 'mini', 'desc' => __('限制在多少月内,单位:月', 'haoui'), 'type' => 'text');
    $options[] = array('id' => 'readwall_limit_number', 'std' => 200, 'class' => 'mini', 'desc' => __('显示个数', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('页面左侧菜单设置', 'haoui'), 'id' => 'page_menu', 'options' => $options_pages, 'type' => 'multicheck');
    $options[] = array('name' => __('友情链接分类选择', 'haoui'), 'id' => 'page_links_cat', 'options' => $options_linkcats, 'type' => 'multicheck');
    // ======================================================================================================================
    $options[] = array('name' => __('字符', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('首页最新发布标题', 'haoui'), 'id' => 'index_list_title', 'std' => __('最新发布', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('首页最新发布标题右侧', 'haoui'), 'id' => 'index_list_title_r', 'std' => '<a href="链接地址">显示文字</a><a href="链接地址">显示文字</a><a href="链接地址">显示文字</a><a href="链接地址">显示文字</a>', 'type' => 'textarea');
    $options[] = array('name' => __('评论标题', 'haoui'), 'id' => 'comment_title', 'std' => __('评论', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('评论框默认字符', 'haoui'), 'id' => 'comment_text', 'std' => __('你的评论可以一针见血', 'haoui'), 'type' => 'text');
    $options[] = array('name' => __('评论提交按钮字符', 'haoui'), 'id' => 'comment_submit_text', 'std' => __('提交评论', 'haoui'), 'type' => 'text');
    // ======================================================================================================================
    $options[] = array('name' => __('社交', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('微博', 'haoui'), 'id' => 'weibo', 'std' => 'http://weibo.com/daqianduan', 'type' => 'text');
    $options[] = array('name' => __('腾讯微博', 'haoui'), 'id' => 'tqq', 'std' => 'http://t.qq.com/daqianduan', 'type' => 'text');
    $options[] = array('name' => __('Twitter', 'haoui'), 'id' => 'twitter', 'std' => '', 'type' => 'text');
    $options[] = array('name' => __('Facebook', 'haoui'), 'id' => 'facebook', 'std' => '', 'type' => 'text');
    $options[] = array('name' => __('微信帐号', 'haoui'), 'id' => 'wechat', 'std' => '阿里百秀', 'type' => 'text');
    $options[] = array('id' => 'wechat_qr', 'std' => 'http://www.daqianduan.com/wp-content/uploads/2015/01/weixin-qrcode.jpg', 'desc' => __('微信二维码,建议图片尺寸:', 'haoui') . '200x200px', 'type' => 'upload');
    $options[] = array('name' => __('RSS订阅', 'haoui'), 'id' => 'feed', 'std' => get_feed_link(), 'type' => 'text');
    // ======================================================================================================================
    $options[] = array('name' => __('广告位', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('文章页正文结尾文字广告', 'haoui'), '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' => __('开启', 'haoui') . ' (' . __('新窗口打开链接', 'haoui') . ')');
    $options[] = array('name' => __('首页文章列表上', 'haoui'), 'id' => 'ads_index_01_s', 'std' => false, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'haoui') . ' ' . $adsdesc, 'id' => 'ads_index_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_index_01_m', 'std' => '', 'desc' => __('手机端', 'haoui') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('首页分页下', 'haoui'), 'id' => 'ads_index_02_s', 'std' => false, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'haoui') . ' ' . $adsdesc, 'id' => 'ads_index_02', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_index_02_m', 'std' => '', 'desc' => __('手机端', 'haoui') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('文章页正文上', 'haoui'), 'id' => 'ads_post_01_s', 'std' => false, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'haoui') . ' ' . $adsdesc, 'id' => 'ads_post_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_post_01_m', 'std' => '', 'desc' => __('手机端', 'haoui') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('文章页正文下', 'haoui'), 'id' => 'ads_post_02_s', 'std' => false, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'haoui') . ' ' . $adsdesc, 'id' => 'ads_post_02', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_post_02_m', 'std' => '', 'desc' => __('手机端', 'haoui') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('文章页评论上', 'haoui'), 'id' => 'ads_post_03_s', 'std' => false, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'haoui') . ' ' . $adsdesc, 'id' => 'ads_post_03', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_post_03_m', 'std' => '', 'desc' => __('手机端', 'haoui') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('分类页列表上', 'haoui'), 'id' => 'ads_cat_01_s', 'std' => false, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'haoui') . ' ' . $adsdesc, 'id' => 'ads_cat_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_cat_01_m', 'std' => '', 'desc' => __('手机端', 'haoui') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('标签页列表上', 'haoui'), 'id' => 'ads_tag_01_s', 'std' => false, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'haoui') . ' ' . $adsdesc, 'id' => 'ads_tag_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_tag_01_m', 'std' => '', 'desc' => __('手机端', 'haoui') . ' ' . $adsdesc, 'type' => 'textarea');
    $options[] = array('name' => __('搜索页列表上', 'haoui'), 'id' => 'ads_search_01_s', 'std' => false, 'desc' => __('开启', 'haoui'), 'type' => 'checkbox');
    $options[] = array('desc' => __('非手机端', 'haoui') . ' ' . $adsdesc, 'id' => 'ads_search_01', 'std' => '', 'type' => 'textarea');
    $options[] = array('id' => 'ads_search_01_m', 'std' => '', 'desc' => __('手机端', 'haoui') . ' ' . $adsdesc, 'type' => 'textarea');
    // ======================================================================================================================
    $options[] = array('name' => __('自定义代码', 'haoui'), 'type' => 'heading');
    $options[] = array('name' => __('自定义CSS样式', 'haoui'), 'desc' => __('位于</head>之前,直接写样式代码,不用添加&lt;style&gt;标签', 'haoui'), 'id' => 'csscode', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => __('自定义头部代码', 'haoui'), 'desc' => __('位于</head>之前,这部分代码是在主要内容显示之前加载,通常是CSS样式、自定义的<meta>标签、全站头部JS等需要提前加载的代码', 'haoui'), 'id' => 'headcode', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => __('自定义底部代码', 'haoui'), 'desc' => __('位于&lt;/body&gt;之前,这部分代码是在主要内容加载完毕加载,通常是JS代码', 'haoui'), 'id' => 'footcode', 'std' => '', 'type' => 'textarea');
    $options[] = array('name' => __('网站统计代码', 'haoui'), 'desc' => __('位于底部,用于添加第三方流量数据统计代码,如:Google analytics、百度统计、CNZZ、51la,国内站点推荐使用百度统计,国外站点推荐使用Google analytics', 'haoui'), '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;
}
예제 #17
0
<div class="branding branding-black">
	<div class="container">
		<h2><?php 
echo _hui('footer_brand_title');
?>
</h2>
		<?php 
for ($i = 1; $i <= 2; $i++) {
    if (_hui('footer_brand_btn_text_' . $i) && _hui('footer_brand_btn_href_' . $i)) {
        echo '<a' . (_hui('footer_brand_btn_blank_' . $i) ? ' target="blank"' : '') . ' class="btn btn-lg" href="' . _hui('footer_brand_btn_href_' . $i) . '">' . _hui('footer_brand_btn_text_' . $i) . '</a>';
    }
}
?>
	</div>
</div>
예제 #18
0
파일: navs.php 프로젝트: yszar/linuxwp
?>

<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 _hui('navpage_desc') ? _hui('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>
예제 #19
0
/**
 * hui_get_post_date function
 * v4.1 at 2015-08-13
 *
 * @return date
 * @author http://themebetter.com/theme/xiu
 * ====================================================================================================
 **/
function hui_get_post_date($ptime = '')
{
    if (empty($ptime)) {
        return false;
    }
    if (_hui('post_date_ago')) {
        return timeago($ptime);
    }
    $format = _hui('post_date_format');
    if (!$format) {
        $format = 'Y-m-d';
    }
    return date($format, strtotime($ptime));
}
예제 #20
0
		</div>
		<?php 
}
?>
		<?php 
if (!$paged && _hui('sticky_s')) {
    hui_posts_sticky($title = _hui('sticky_title'), $showposts = _hui('sticky_limit'));
}
?>
		<?php 
echo _hui('ads_index_02_s') ? '<div class="ads ads-content">' . _hui('ads_index_02') . '</div>' : '';
?>
		<?php 
if ($paged && $paged > 1) {
    printf('<h3 class="title"><strong>所有文章</strong> <small>第' . $paged . '页</small></h3>');
} else {
    printf('<h3 class="title">' . (_hui('recent_posts_number') ? '<small class="pull-right">24小时更新:' . hui_get_recent_posts_number() . '篇 &nbsp; &nbsp; 一周更新:' . hui_get_recent_posts_number(7) . '篇</small>' : '') . '<strong>' . _hui('index_list_title') . '</strong></h3>');
}
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('caller_get_posts' => 1, 'paged' => $paged);
query_posts($args);
hui_post_excerpt();
?>
		<?php 
echo _hui('ads_index_03_s') ? '<div class="ads ads-content">' . _hui('ads_index_03') . '</div>' : '';
?>
	</div>
</div>
<?php 
get_sidebar();
get_footer();
예제 #21
0
파일: links.php 프로젝트: yszar/linuxwp
    the_title();
    ?>
</a></h1>
		</header>
		<article class="article-content">
			<?php 
    the_content();
    ?>
		</article>
		<?php 
}
?>

		<ul class="plinks">
			<?php 
$links_cat = _hui('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>
예제 #22
0
파일: comments.php 프로젝트: yszar/linuxwp
    ?>
				<p><a id="cancel-comment-reply-link" href="javascript:;">取消</a></p>
			</div>
			<div class="comt-box">
				<textarea placeholder="<?php 
    echo _hui('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 _hui('comment_submit_text') ? _hui('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"';
예제 #23
0
_the_ads($name = 'ads_cat_01', $class = 'asb-cat asb-cat-01');
?>
			<?php 
if (mo_is_minicat()) {
    $p_meta = _hui('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 (_hui('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>';
예제 #24
0
}
?>
						<?php 
if (_hui('facebook')) {
    echo '<li><a target="_blank" rel="external nofollow" href="' . _hui('facebook') . '"><i class="fa fa-facebook"></i> Facebook</a></li>';
}
?>
						<?php 
if (_hui('feed')) {
    echo '<li><a target="_blank" href="' . _hui('feed') . '"><i class="fa fa-rss"></i> RSS订阅</a></li>';
}
?>
					</ul>
				</li>
			</ul>
			<!--进入会员中心代码-->
		</div>
		<i class="fa fa-bars m-icon-nav"></i>
	</div>
</header>
<div class="site-search">
	<div class="container">
		<?php 
if (_hui('search_baidu') && _hui('search_baidu_code')) {
    echo _hui('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>
예제 #25
0
파일: readers.php 프로젝트: yszar/linuxwp
"><?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, _hui('readwall_limit_time'), _hui('readwall_limit_number'));
?>
		</div>

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

<?php 
get_footer();
예제 #26
0
function hui_head_css()
{
    $styles = '';
    $site_width = _hui('site_width');
    if ($site_width && $site_width !== '1280') {
        $styles .= ".container{max-width:{$site_width}px}";
    }
    if (_hui('site_gray')) {
        $styles .= "html{overflow-y:scroll;filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);-webkit-filter: grayscale(100%);}";
    }
    if (_hui('theme_skin_custom')) {
        $skin_option = _hui('theme_skin_custom');
        $skc = $skin_option;
    } else {
        $skin_option = _hui('theme_skin');
        $skc = '#' . $skin_option;
    }
    if ($skin_option && $skin_option !== 'FF5E52') {
        $styles .= "a:hover, a:focus,.post-like.actived,.excerpt h2 a:hover,.user-welcome strong,.article-title a:hover,#comments b,.text-muted a:hover,.relates a:hover,.archives .item:hover h3,.linkcat h2,.sticky a:hover,.article-content a:hover,.nav li.current-menu-item > a, .nav li.current-menu-parent > a, .nav li.current_page_item > a, .nav li.current-posa,.article-meta a:hover{color:{$skc};}.logo a,.article-tags a,.search-form .btn,.widget_tags_inner a:hover:hover,.focusmo a:hover h4,.tagslist .tagname:hover,.pagination ul > li.next-page > a{background-color:{$skc};}.label-important,.badge-important{background-color:{$skc};}.label-important .label-arrow,.badge-important .label-arrow{border-left-color:{$skc};}.title strong{border-bottom-color:{$skc};}#submit{background: {$skc};border-right: 2px solid {$skc};border-bottom: 2px solid {$skc};}";
    }
    $styles .= _hui('csscode');
    if ($styles) {
        echo '<style>' . $styles . '</style>';
    }
}
예제 #27
0
} else {
    ?>
		<div class="user-signin">
			<a target="_blank" href="<?php 
    echo site_url('/wp-login.php');
    ?>
"><?php 
    echo __('登陆', 'haoui');
    ?>
</a><br>
			<a target="_blank" href="<?php 
    echo site_url('/wp-login.php?action=register');
    ?>
"><?php 
    echo __('注册', 'haoui');
    ?>
</a>
		</div>
	<?php 
}
if (_hui('layout') == 'ui-navtop') {
    ?>
</div>
</header>
<section class="container">
<?php 
} else {
    ?>
</header>
<?php 
}
예제 #28
0
파일: search.php 프로젝트: yszar/linuxwp
<?php

get_header();
?>
<div class="content-wrap">
	<div class="content">
		<?php 
echo _hui('ads_search_01_s') ? '<div class="ads ads-content">' . hui_get_adcode('ads_search_01') . '</div>' : '';
?>
		<h1 class="title"><strong><?php 
echo htmlspecialchars($s);
?>
 <?php 
echo __('的搜索结果', 'haoui');
?>
</strong></h1>
		<?php 
if (!have_posts()) {
    ?>
			<h3 class="text-muted text-center"><?php 
    echo __('暂无搜索结果', 'haoui');
    ?>
</h3>
		<?php 
} else {
    ?>
			<?php 
    get_template_part('excerpt');
    ?>
		<?php 
}
예제 #29
0
파일: excerpt.php 프로젝트: yszar/linuxwp
            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 (_hui('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 (_hui('post_link_excerpt_s')) {
        _moloader('mo_post_link');
    }
    echo '</article>';
}
_moloader('mo_paging');
wp_reset_query();
예제 #30
0
<?php

/*
 * Template Name: Page Has Menu
 * http://themebetter.com/theme/xiu
*/
get_header();
?>

<?php 
$pagemenus = _hui('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">
		<?php 
if (!empty($menus)) {
    echo '<ul class="pagemenu">' . $menus . '</ul>';
} else {
    echo __('如果你是本站管理员,请去后台-外观-xiu主题设置-独立页面,选择页面菜单后并保存,你选择的菜单将显示在这里。', 'haoui');
}
?>
	</div>
</div>