├── .gitattributes ├── 404.php ├── README.md ├── category.php ├── comments.php ├── component ├── nav-footer.php ├── nav-header.php ├── pageobj.php ├── post-content.php ├── post-list-item.php ├── post-main-index.php ├── post-page.php ├── set-ad.php ├── set-comment.php ├── set-index.php ├── set-info.php ├── set-insertcode.php ├── set-interface.php ├── set-module.php ├── set-optimization.php ├── set-post.php ├── set-routine.php ├── set-seo.php └── set-user.php ├── footer.php ├── functions.php ├── geekframe ├── ThemeUpdateChecker.php ├── VerificationCode.php ├── ajax.php ├── comment-pro.php ├── options.php ├── page-setting.php ├── shortcode.php ├── support.php ├── users.php └── utils.php ├── header.php ├── index.php ├── page-login.php ├── page-lostpassword.php ├── page-reg.php ├── page-usercenter.php ├── page.php ├── psd ├── banner.psd ├── jieshao01.psd ├── jieshao02.psd ├── jieshao03.psd └── jieshao04.psd ├── screenshot.png ├── screenshot ├── corepress4js02.webp ├── corepress4js03.webp ├── corepress4js04.webp ├── corepress4jsbanner.webp └── corepresstheme.png ├── search.php ├── searchform.php ├── single.php ├── static ├── css │ ├── admin.css │ ├── comment-module.css │ ├── editor-style.css │ ├── editor-window.css │ ├── login-plane.css │ ├── main-mobile.css │ ├── main.css │ └── post-content.css ├── img │ ├── face │ │ ├── OK.gif │ │ ├── aixin.gif │ │ ├── aoman.gif │ │ ├── baoquan.gif │ │ ├── bizui.gif │ │ ├── cahan.gif │ │ ├── caidao.gif │ │ ├── ciya.gif │ │ ├── dabing.gif │ │ ├── doge.gif │ │ ├── fadai.gif │ │ ├── ganga.gif │ │ ├── guzhang.gif │ │ ├── haixiu.gif │ │ ├── hanxiao.gif │ │ ├── huaixiao.gif │ │ ├── jie.gif │ │ ├── jingkong.gif │ │ ├── keai.gif │ │ ├── koubi.gif │ │ ├── ku.gif │ │ ├── leiben.gif │ │ ├── lenghan.gif │ │ ├── liuhan.gif │ │ ├── nanguo.gif │ │ ├── penxue.gif │ │ ├── piezui.gif │ │ ├── qiang.gif │ │ ├── qinqin.gif │ │ ├── quantou.gif │ │ ├── se.gif │ │ ├── shengli.gif │ │ ├── shuai.gif │ │ ├── tiaopi.gif │ │ ├── touxiao.gif │ │ ├── tuosai.gif │ │ ├── weiqu.gif │ │ ├── woshou.gif │ │ ├── wozuimei.gif │ │ ├── wunai.gif │ │ ├── xiaojiujie.gif │ │ ├── xiaoku.gif │ │ ├── xieyanxiao.gif │ │ ├── xigua.gif │ │ ├── yinxian.gif │ │ ├── yiwen.gif │ │ ├── youling.gif │ │ └── yun.gif │ ├── icp.svg │ ├── loading.gif │ ├── police.svg │ ├── reward.svg │ ├── share-btn.svg │ ├── share-qq.svg │ ├── share-qzone.svg │ ├── share-weibo.svg │ ├── share │ │ ├── github.svg │ │ ├── qq.svg │ │ ├── wechat.svg │ │ └── weibo.svg │ ├── shortcode │ │ └── c-downbtn │ │ │ ├── 360.png │ │ │ ├── bdwp.svg │ │ │ ├── ct.png │ │ │ ├── default.svg │ │ │ ├── github.svg │ │ │ ├── lanzou.png │ │ │ ├── ty.png │ │ │ └── weiyun.png │ ├── svg-ewm.svg │ ├── thumbnail.png │ └── wordpress.svg ├── js │ ├── admin.js │ ├── axios.min.js │ ├── base64.js │ ├── clipboard.min.js │ ├── editor-functions.js │ ├── editorButton.js │ ├── jquery.lazyload.min.js │ ├── jquery.min.js │ ├── qrcode.min.js │ ├── tools.js │ └── vue.min.js └── lib │ ├── element │ ├── fonts │ │ ├── element-icons.ttf │ │ └── element-icons.woff │ ├── index.css │ └── index.js │ ├── fancybox │ ├── init.js │ ├── jquery.fancybox.min.css │ └── jquery.fancybox.min.js │ ├── fontawesome5 │ ├── css │ │ ├── all.min.css │ │ ├── brands.css │ │ ├── fontawesome.css │ │ ├── light.css │ │ ├── regular.css │ │ └── solid.css │ └── webfonts │ │ ├── fa-light-300.woff │ │ ├── fa-light-300.woff2 │ │ ├── fa-regular-400.woff │ │ ├── fa-regular-400.woff2 │ │ ├── fa-solid-900.woff │ │ └── fa-solid-900.woff2 │ ├── highlight │ ├── highlight.min.js │ ├── init.js │ └── style │ │ ├── corepress-dark.css │ │ └── corepress.css │ ├── layer │ ├── layer.js │ └── theme │ │ ├── corepress │ │ └── style.css │ │ └── default │ │ ├── icon-ext.png │ │ ├── icon.png │ │ ├── layer.css │ │ ├── loading-0.gif │ │ ├── loading-1.gif │ │ └── loading-2.gif │ └── swiper │ ├── swiper.min.css │ └── swiper.min.js ├── style.css ├── tag.php └── widgets ├── author.php ├── comments.php └── hot-post.php /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |最新文章
'; 142 | } elseif (is_author()) { 143 | echo '' . get_the_author() . ' 的文章
'; 144 | } else { 145 | echo '最新文章
'; 146 | } 147 | ?> 148 |CorePress主题,一款功能强大的博客主题,适合个人,极客,程序员使用
3 |前端无任何界面框架,加载迅速,流畅
4 |集成代码高亮,多种短代码,帮你打造超强文字内容
5 |注重WordPress和SEO优化,设置详细
6 |主题成长中,有问题请反馈
7 |欢迎加入QQ群:664592923
8 | 9 |帮助地址:CorePress菜单图标使用教程
78 |<#username#>:当前文章用户名
64 |<#url#>:当前文章地址
65 |换行请使用html代码:<br> 66 |
搜索内容:
53 |搜索内容:
84 |24 |
27 |请放到文章侧边栏,否则无法获取到作者用户信息
28 | id_base)) { 35 | echo $args['before_title'] . $title . $args['after_title']; 36 | } 37 | 38 | } 39 | 40 | public function widget_end($args) 41 | { 42 | echo $args['after_widget']; 43 | } 44 | 45 | 46 | function update($new_instance, $old_instance) 47 | { 48 | $instance = $old_instance; 49 | $instance['title'] = sanitize_text_field($new_instance['title']); 50 | return $instance; 51 | } 52 | 53 | function widget($args, $instance) 54 | { 55 | 56 | $this->widget_start($args, $instance); 57 | $author_id = get_the_author_meta('ID'); 58 | $author_description = get_the_author_meta('description'); 59 | $author_url = get_author_posts_url($author_id); 60 | $author_name = get_the_author(); 61 | $avatar = get_avatar($author_id, 50, ''); 62 | 63 | ?> 64 | 88 | 99 | widget_end($args, $instance); 102 | } 103 | } 104 | 105 | // register widget 106 | function register_corepress_author_widget() 107 | { 108 | register_widget('CorePress_author_widget'); 109 | } 110 | 111 | add_action('widgets_init', 'register_corepress_author_widget'); -------------------------------------------------------------------------------- /widgets/comments.php: -------------------------------------------------------------------------------- 1 | '显示最新评论' 14 | ) 15 | ); 16 | } 17 | 18 | function form($instance) 19 | { 20 | $num = isset($instance['number']) ? absint($instance['number']) : 5; 21 | $title = isset($instance['title']) ? $instance['title'] : '最新评论'; 22 | ?> 23 |24 |
27 | 28 |29 |
32 | id_base)) { 39 | echo $args['before_title'] . $title . $args['after_title']; 40 | } 41 | } 42 | 43 | public function widget_end($args) 44 | { 45 | echo $args['after_widget']; 46 | } 47 | 48 | 49 | function update($new_instance, $old_instance) 50 | { 51 | /* $instance = $old_instance; 52 | $instance['num'] = absint($new_instance['num']); 53 | $instance['title'] = sanitize_text_field($new_instance['title']);*/ 54 | return $new_instance; 55 | } 56 | 57 | function widget($args, $instance) 58 | { 59 | 60 | $this->widget_start($args, $instance); 61 | $number = (!empty($instance['number'])) ? absint($instance['number']) : 5; 62 | $comments = get_comments( 63 | /** 64 | * Filters the arguments for the Recent Comments widget. 65 | * 66 | * @param array $comment_args An array of arguments used to retrieve the recent comments. 67 | * @param array $instance Array of settings for the current widget. 68 | * @see WP_Comment_Query::query() for information on accepted arguments. 69 | * 70 | * @since 3.4.0 71 | * @since 4.9.0 Added the `$instance` parameter. 72 | * 73 | */ 74 | apply_filters( 75 | 'widget_comments_args', 76 | array( 77 | 'number' => $number, 78 | 'status' => 'approve', 79 | 'post_status' => 'publish', 80 | 81 | ), 82 | $instance 83 | ) 84 | ); 85 | foreach ($comments as $comment) { 86 | if ($comment->user_id) { 87 | $author_url = get_author_posts_url($comment->user_id); 88 | $userdata = get_userdata($comment->user_id); 89 | $display_name = $userdata->display_name; 90 | } else { 91 | $author_url = 'javascript:;'; 92 | $display_name = $comment->comment_author; 93 | } 94 | $post_title = get_the_title($comment->comment_post_ID); 95 | $post_link = get_permalink($comment->comment_post_ID); 96 | ?> 97 |comment_content, 55))); ?>
114 |116 | 评论于 comment_post_ID);?> 117 |
118 |26 |
29 | 30 |31 |
34 | 35 | 36 |37 | 38 | 42 |
43 | id_base)) { 50 | echo $args['before_title'] . $title . $args['after_title']; 51 | } 52 | } 53 | 54 | public function widget_end($args) 55 | { 56 | echo $args['after_widget']; 57 | } 58 | 59 | 60 | function update($new_instance, $old_instance) 61 | { 62 | /* $instance = $old_instance; 63 | $instance['num'] = absint($new_instance['num']); 64 | $instance['title'] = sanitize_text_field($new_instance['title']);*/ 65 | return $new_instance; 66 | } 67 | 68 | function widget($args, $instance) 69 | { 70 | 71 | $this->widget_start($args, $instance); 72 | $number = (!empty($instance['number'])) ? absint($instance['number']) : 5; 73 | $type = (!empty($instance['type'])) ? $instance['type'] : 'comment'; 74 | if ($type == 'comment') { 75 | $the_query = new WP_Query(array('order' => 'DESC', 'orderby' => 'comment_count', 'posts_per_page' => $number)); 76 | 77 | } elseif ($type == 'view') { 78 | $the_query = new WP_Query(array('order' => 'DESC', 'orderby' => 'meta_value_num', 'meta_key'=>'views','posts_per_page' => $number)); 79 | } 80 | 81 | if ($the_query->have_posts()) { 82 | $postitem = array(); 83 | $i = 0; 84 | while ($the_query->have_posts()) { 85 | $i++; 86 | $the_query->the_post(); 87 | $postitem['title'] = get_the_title(); 88 | $postitem['time'] = get_the_time('Y-m-d'); 89 | $postitem['category'] = get_the_category(); 90 | $postitem['url'] = get_the_permalink(); 91 | ?> 92 | 110 | 114 | 115 | 119 | 120 | widget_end($args, $instance); 123 | } 124 | } 125 | 126 | // register widget 127 | function register_corepress_hot_post_widget() 128 | { 129 | register_widget('CorePress_hot_post_widget'); 130 | } 131 | 132 | add_action('widgets_init', 'register_corepress_hot_post_widget'); --------------------------------------------------------------------------------
登录后才能发表评论
共有 条评论
91 | 92 | 95 |102 | 'ol', 105 | 'short_ping' => true, 106 | 'avatar_size' => 48, 107 | 'type' => 'comment', 108 | 'callback' => 'my_comment', 109 | )); 110 | ?> 111 |
112 | 116 | 117 | 119 | 152 | 155 |%3$s
' 11 | ) 12 | ); 13 | ?> -------------------------------------------------------------------------------- /component/nav-header.php: -------------------------------------------------------------------------------- 1 | 31 |CorePress
'; 47 | } else { 48 | echo '搜索内容
60 | 69 |%3$s
' 84 | ) 85 | ); 86 | ?> 87 | 88 |97 |-
98 |
101 | ';
105 | }
106 | ?>
107 |
108 |
111 | - 管理中心
112 | -
113 | 新建文章
114 |
118 | - 退出登录
120 |
121 | 122 | 123 | 124 | } else { 125 | if ($set['user']['hideloginbtn'] != 1) { 126 | ?> 127 | 128 | 129 | 130 | 132 | 134 | 135 | } ?> 136 | 137 | 138 | } 139 | 140 | } 141 | ?> 142 |102 | 账号设置
' . $item['title'] . '
'; 45 | } 46 | echo '