├── .gitignore ├── tag.php ├── screenshot.png ├── inc ├── core │ ├── no_category.php │ ├── remove_block.php │ ├── cnpic.php │ ├── nofeed.php │ ├── picalt.php │ ├── pingback.php │ ├── nofollow.php │ ├── ybpql.php │ └── wpbs.php ├── index.php ├── seo.php ├── comment │ ├── app.js │ ├── app.css │ └── main.php ├── widget.php ├── widget │ ├── widget-tags.php │ ├── widget-hotpost.php │ ├── widget-comments.php │ └── widget-author.php ├── thumbnails.php ├── setting.php ├── norm.php └── categories-images.php ├── assets ├── bifont │ └── fonts │ │ ├── bootstrap-icons.woff │ │ └── bootstrap-icons.woff2 ├── js │ └── js.js └── css │ └── fancybox.css ├── sidebar.php ├── page.php ├── functions.php ├── search.php ├── footer.php ├── category.php ├── comments.php ├── excerpt.php ├── index.php ├── header.php ├── 404.php ├── single.php └── style.css /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /tag.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUiTHEME/Mango/HEAD/screenshot.png -------------------------------------------------------------------------------- /inc/core/no_category.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUiTHEME/Mango/HEAD/inc/core/no_category.php -------------------------------------------------------------------------------- /assets/bifont/fonts/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUiTHEME/Mango/HEAD/assets/bifont/fonts/bootstrap-icons.woff -------------------------------------------------------------------------------- /assets/bifont/fonts/bootstrap-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUiTHEME/Mango/HEAD/assets/bifont/fonts/bootstrap-icons.woff2 -------------------------------------------------------------------------------- /inc/core/remove_block.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 15 |
16 | -------------------------------------------------------------------------------- /inc/core/nofeed.php: -------------------------------------------------------------------------------- 1 | Feed已经关闭, 请访问网站首页!')); 9 | } 10 | add_action('do_feed', 'digwp_disable_feed', 1); 11 | add_action('do_feed_rdf', 'digwp_disable_feed', 1); 12 | add_action('do_feed_rss', 'digwp_disable_feed', 1); 13 | add_action('do_feed_rss2', 'digwp_disable_feed', 1); 14 | add_action('do_feed_atom', 'digwp_disable_feed', 1); -------------------------------------------------------------------------------- /inc/core/picalt.php: -------------------------------------------------------------------------------- 1 | /i"; 11 | $replacement = ''; 12 | $content = preg_replace($pattern, $replacement, $content); 13 | return $content; 14 | } 15 | -------------------------------------------------------------------------------- /inc/core/pingback.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |

6 |
7 |
8 | 9 |
10 | 11 |
12 | 13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | __( '主菜单导航' ), 22 | 'mob' => __( '手机导航' ), 23 | ) 24 | ); 25 | 26 | //小工具 27 | require get_template_directory(). '/inc/widget.php'; 28 | -------------------------------------------------------------------------------- /inc/index.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

搜索""的结果!

10 |
11 |
12 |
13 | 14 | 15 | 16 |
17 | 18 |
19 |
20 | 21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /category.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |
7 |
8 | 9 |
10 |

11 |

12 |
13 |
14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /inc/core/nofollow.php: -------------------------------------------------------------------------------- 1 | ]*href=(\"??)([^\" >]*?)\\1[^>]*>"; 10 | if(preg_match_all("/$regexp/siU", $content, $matches, PREG_SET_ORDER)) { 11 | if( !empty($matches) ) { 12 | 13 | $srcUrl = get_option('siteurl'); 14 | for ($i=0; $i < count($matches); $i++) 15 | { 16 | 17 | $tag = $matches[$i][0]; 18 | $tag2 = $matches[$i][0]; 19 | $url = $matches[$i][0]; 20 | 21 | $noFollow = ''; 22 | $pattern = '/target\s*=\s*"\s*_blank\s*"/'; 23 | preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE); 24 | if( count($match) < 1 ) 25 | $noFollow .= ' target="_blank" '; 26 | 27 | $pattern = '/rel\s*=\s*"\s*[n|d]ofollow\s*"/'; 28 | preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE); 29 | if( count($match) < 1 ) 30 | $noFollow .= ' rel="nofollow" '; 31 | 32 | $pos = strpos($url,$srcUrl); 33 | if ($pos === false) { 34 | $tag = rtrim ($tag,'>'); 35 | $tag .= $noFollow.'>'; 36 | $content = str_replace($tag2,$tag,$content); 37 | } 38 | } 39 | } 40 | } 41 | 42 | $content = str_replace(']]>', ']]>', $content); 43 | return $content; 44 | } -------------------------------------------------------------------------------- /inc/seo.php: -------------------------------------------------------------------------------- 1 | 10 | <?php echo $index_t ?><?php if ( $paged > 1 ) echo $fgf.'第'.$paged.'页' ?> 11 | 12 | 13 | 14 | 15 | <?php echo $single_t.$fgf.$sitename ?> 16 | 17 | 18 | 19 | 20 | <?php echo single_cat_title().$fgf.$sitename; ?><?php if ( $paged > 1 ) echo $fgf.'第'.$paged.'页' ?> 21 | 22 | 23 | 24 | 25 | <?php echo get_query_var( 's' ); echo $fgf.$sitename; ?><?php if ( $paged > 1 ) echo $fgf.'第'.$paged.'页' ?> 26 | 27 | 28 | 29 | 30 | 404 NOT FOUND<?php echo $fgf.$sitename ?> 31 | -------------------------------------------------------------------------------- /inc/core/ybpql.php: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 | 8 |

评论()

9 |
    10 | 'ol', 13 | 'short_ping' => true, 14 | 'reply_text' => '回复', 15 | 'avatar_size' => 40, 16 | 'format' => 'html5' 17 | ) ); 18 | ?> 19 |
20 | '上一页', 22 | 'next_text' => '下一页', 23 | 'prev_next' => false, 24 | ) );?> 25 | 26 | '发布评论', 29 | 'title_reply'=>'发布评论', 30 | 'comment_form_top' => 'ds', 31 | 'comment_notes_before' => '', 32 | 'comment_notes_after' => '', 33 | 'comment_field' => '

', 34 | 'fields' => apply_filters( 'comment_form_default_fields', array( 35 | 'author' => 36 | '

' . 37 | '

', 39 | 'email' => 40 | '', 43 | 'url' => 44 | '

'. 45 | '

' 47 | ) 48 | ), 49 | ); 50 | comment_form($comments_args);?> 51 |
52 |
-------------------------------------------------------------------------------- /inc/comment/app.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function(jQuery) { 2 | var __cancel = jQuery('#cancel-comment-reply-link'), 3 | __cancel_text = __cancel.text(), 4 | __list = 'comment-list';//your comment wrapprer 5 | jQuery(document).on("submit", "#commentform", function() { 6 | jQuery.ajax({ 7 | url: ajaxcomment.ajax_url, 8 | data: jQuery(this).serialize() + "&action=ajax_comment", 9 | type: jQuery(this).attr('method'), 10 | beforeSend: faAjax.createButterbar("提交中...."), 11 | error: function(request) { 12 | var t = faAjax; 13 | t.createButterbar(request.responseText); 14 | }, 15 | success: function(data) { 16 | jQuery('textarea').each(function() { 17 | this.value = '' 18 | }); 19 | var t = faAjax, 20 | cancel = t.I('cancel-comment-reply-link'), 21 | temp = t.I('wp-temp-form-div'), 22 | respond = t.I(t.respondId), 23 | post = t.I('comment_post_ID').value, 24 | parent = t.I('comment_parent').value; 25 | if (parent != '0') { 26 | jQuery('#respond').before('
    ' + data + '
'); 27 | } else if (!jQuery('.' + __list ).length) { 28 | if (ajaxcomment.formpostion == 'bottom') { 29 | jQuery('#respond').before('
    ' + data + '
'); 30 | } else { 31 | jQuery('#respond').after('
    ' + data + '
'); 32 | } 33 | 34 | } else { 35 | if (ajaxcomment.order == 'asc') { 36 | jQuery('.' + __list ).append(data); // your comments wrapper 37 | } else { 38 | jQuery('.' + __list ).prepend(data); // your comments wrapper 39 | } 40 | } 41 | t.createButterbar("提交成功"); 42 | cancel.style.display = 'none'; 43 | cancel.onclick = null; 44 | t.I('comment_parent').value = '0'; 45 | if (temp && respond) { 46 | temp.parentNode.insertBefore(respond, temp); 47 | temp.parentNode.removeChild(temp) 48 | } 49 | } 50 | }); 51 | return false; 52 | }); 53 | faAjax = { 54 | I: function(e) { 55 | return document.getElementById(e); 56 | }, 57 | clearButterbar: function(e) { 58 | if (jQuery(".butterBar").length > 0) { 59 | jQuery(".butterBar").remove(); 60 | } 61 | }, 62 | createButterbar: function(message) { 63 | var t = this; 64 | t.clearButterbar(); 65 | jQuery("body").append('

' + message + '

'); 66 | setTimeout("jQuery('.butterBar').remove()", 3000); 67 | } 68 | }; 69 | }); 70 | 71 | -------------------------------------------------------------------------------- /inc/widget.php: -------------------------------------------------------------------------------- 1 | '首页分类侧栏', 36 | 'id' => 'index_widgets', 37 | 'description' => '首页分类侧栏', 38 | 'before_widget' => '', 40 | 'before_title' => '

', 41 | 'after_title' => '

', 42 | ) ); 43 | register_sidebar( array( 44 | 'name' => '文章页面侧栏', 45 | 'id' => 'single_widgets', 46 | 'description' => '文章页面侧栏', 47 | 'before_widget' => '', 49 | 'before_title' => '

', 50 | 'after_title' => '

', 51 | ) ); 52 | } 53 | add_action( 'widgets_init', 'huitheme_widgets_init' ); 54 | 55 | 56 | require get_template_directory(). '/inc/widget/widget-tags.php'; 57 | 58 | require get_template_directory(). '/inc/widget/widget-hotpost.php'; 59 | 60 | require get_template_directory(). '/inc/widget/widget-comments.php'; 61 | 62 | require get_template_directory(). '/inc/widget/widget-author.php'; 63 | -------------------------------------------------------------------------------- /inc/core/wpbs.php: -------------------------------------------------------------------------------- 1 | '标签云的使用') ); 8 | } 9 | function widget($args, $instance) { 10 | extract($args); 11 | $title = apply_filters('widget_title',esc_attr($instance['title'])); 12 | $limit = strip_tags($instance['limit']) ? strip_tags($instance['limit']) : 5; 13 | 14 | echo $before_widget; 15 | 16 | if( $title ) echo $before_title.$title.$after_title; 17 | 18 | echo '
'; 19 | 20 | $tags = get_tags(array( 21 | "number" => $limit, 22 | "order" => "DESC" 23 | )); 24 | foreach($tags as $tag){ 25 | $count = intval( $tag->count ); 26 | $name = apply_filters( 'the_title', $tag->name ); 27 | $class = ( $count > 5 ) ? 'tag-item hot' : 'tag-item'; 28 | echo '' . $name . ''; 29 | } 30 | 31 | echo '
'; 32 | echo $after_widget; 33 | } 34 | 35 | 36 | 37 | function update($new_instance, $old_instance) { 38 | if (!isset($new_instance['submit'])) { 39 | return false; 40 | } 41 | $instance = $old_instance; 42 | $instance['title'] = strip_tags($new_instance['title']); 43 | $instance['limit'] = strip_tags($new_instance['limit']); 44 | 45 | return $instance; 46 | } 47 | 48 | 49 | 50 | function form($instance) { 51 | global $wpdb; 52 | $instance = wp_parse_args((array) $instance, array('title'=> '', 'limit' => '')); 53 | $title = esc_attr($instance['title']); 54 | $limit = strip_tags($instance['limit']); 55 | ?> 56 |

57 | 58 |

59 |

60 | 61 |

62 | 63 | '热门文章的展示')); 8 | } 9 | function widget($args, $instance) { 10 | extract($args); 11 | $title = apply_filters('widget_title',esc_attr($instance['title'])); 12 | $limit = strip_tags($instance['limit']) ? strip_tags($instance['limit']) : 5; 13 | 14 | echo $before_widget; 15 | 16 | if( $title ) echo $before_title.$title.$after_title; 17 | 18 | echo '