├── 404.php ├── README.md ├── archive.php ├── author.php ├── comments.php ├── footer.php ├── functions.php ├── header.php ├── images ├── avatar.jpg ├── background.svg ├── background1.svg ├── cd-arrow.svg ├── earth.jpg ├── f-logo.png ├── favicon.ico ├── gotop.png ├── gowest │ ├── allmen.png │ └── road.jpg ├── grid.png ├── hd.jpg ├── icons.png ├── login.png ├── login_loading.gif ├── none.png ├── postload.gif ├── random │ └── random.jpg ├── rocket.png ├── smilies │ ├── icon_arrow.gif │ ├── icon_biggrin.gif │ ├── icon_confused.gif │ ├── icon_cool.gif │ ├── icon_cry.gif │ ├── icon_eek.gif │ ├── icon_evil.gif │ ├── icon_exclaim.gif │ ├── icon_idea.gif │ ├── icon_lol.gif │ ├── icon_mad.gif │ ├── icon_mrgreen.gif │ ├── icon_neutral.gif │ ├── icon_question.gif │ ├── icon_razz.gif │ ├── icon_redface.gif │ ├── icon_rolleyes.gif │ ├── icon_sad.gif │ ├── icon_smile.gif │ ├── icon_surprised.gif │ ├── icon_twisted.gif │ └── icon_wink.gif ├── social_icon.png ├── temp.jpg ├── ua │ ├── 360se.png │ ├── android.png │ ├── chrome.png │ ├── chromium.png │ ├── crios.png │ ├── debian.png │ ├── edge.png │ ├── fedora.png │ ├── firefox.png │ ├── ie.png │ ├── ie10.png │ ├── ie11.png │ ├── ie8.png │ ├── ie9.png │ ├── ipad.png │ ├── iphone.png │ ├── linux.png │ ├── macos.png │ ├── maxthon.png │ ├── opera.png │ ├── opera15.png │ ├── safari.png │ ├── sogou.png │ ├── ubuntu.png │ ├── ucweb.png │ ├── unknow.png │ ├── windows.png │ ├── windows_phone.png │ ├── windows_vista.png │ ├── windows_win10.png │ ├── windows_win7.png │ ├── windows_win8.png │ └── wordpress.png ├── wave1.png └── wave2.png ├── inc ├── categories-images.php ├── css │ ├── admin.css │ ├── color-picker.min.css │ └── optionsframework.css ├── customizer.php ├── decorate.php ├── fonts │ ├── iconfont.css │ ├── iconfont.eot │ ├── iconfont.svg │ ├── iconfont.ttf │ └── iconfont.woff ├── images │ └── ico-delete.png ├── js │ ├── color-picker.min.js │ ├── iris.min.js │ ├── media-uploader.js │ └── options-custom.js ├── login.css ├── options-framework.php ├── options-interface.php ├── options-media-uploader.php ├── options-sanitize.php ├── siren-update.php ├── smiley.php └── template-tags.php ├── index.php ├── js ├── app.js ├── canvas-nest.min.js ├── customizer.js ├── fish.js ├── html2jpg.js ├── input.min.js ├── jquery.min.js ├── jquery.pjax.js ├── login.js ├── nprogress.js └── qrcode.min.js ├── layouts ├── authorprofile.php ├── feature.php ├── imgbox.php ├── post-nextprev.php └── sharelike.php ├── options.php ├── page-archive.php ├── page-links.php ├── page.php ├── screenshot.jpg ├── search.php ├── sidebar.php ├── single.php ├── style.css ├── tpl ├── content-category.php ├── content-image.php ├── content-none.php ├── content-page.php ├── content-search.php ├── content-single.php ├── content-status.php ├── content-thumb.php ├── content.php └── single-image.php └── user ├── page-login.php ├── page-register.php ├── statics.php └── verification.js /404.php: -------------------------------------------------------------------------------- 1 | 11 | > 12 | 13 | 14 | 15 | <?php global $page, $paged;wp_title( '-', true, 'right' ); 16 | bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' ); 17 | if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( '第 %s 页'), max( $paged, $page ) );?> 18 | 19 | 20 | 23 | 24 | 25 |
26 |
施主,您要取的经书404了
27 |
28 | 返回女儿国 29 | 返回东土大唐 30 |
31 |
32 |
33 |
34 |
35 |
36 | 40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Asky - WordPress 主题 2 | 3 | Asky 是一款精美的 WordPress 主题,原作者为 keith。 4 | 5 | 该主题在众多优秀主题的基础上进行了精心的创作与改进,具有简洁美观的界面和丰富的功能。 6 | 7 | 我对其进行了一些修改和优化,旨在为用户提供更好的使用体验。你可以点击 [演示站](https://peanoo.com) https://peanoo.com 查看修改后的实际效果。 8 | 9 | # 由来介绍 10 | Asky 主题的诞生离不开多位大佬的贡献: 11 | 12 | - 首先,感谢 Fuzzz 创作出 Akina 主题 13 | 14 | - 然后,感谢 路易 在 Akina 的基础上作出 Siren 15 | 16 | - 最后,感谢 keith 在前面两者基础上作出 Asky 17 | 18 | 最后的最后,前面的三位大佬都停更了,我按照自己的想法修改了一下,都是在前人的贡献上。 19 | 20 | # 主题功能亮点 21 | 22 | ### 自定义设置 23 | 通过 WordPress 的主题定制器,你可以轻松地对网站的标题、描述、头部文字颜色等进行实时预览和修改,无需复杂的代码操作。 24 | 25 | ### 文章导航 26 | 在文章页面,支持显示上一篇和下一篇文章的导航链接,并且可以显示文章的缩略图,增强用户的浏览体验。 27 | 28 | ### 作者简介 29 | 可以在文章页面显示作者的简介信息,包括作者头像、姓名和个人描述等。 30 | 31 | ### 特色区域展示 32 | 在网站首页提供特色区域,可展示自定义的链接和图片,吸引用户的注意力。 33 | 34 | ### 登录页面优化 35 | 对 WordPress 的登录页面进行了美化和优化,使其更加美观和易用。 36 | 37 | # 安装与使用 38 | ### 安装 39 | 1. 下载本主题的压缩包。 40 | 2. 登录 WordPress 后台,进入“外观” -> “主题”。 41 | 3. 点击“添加新主题”,选择“上传主题”,上传下载的压缩包。 42 | 4. 上传完成后,点击“启用”即可使用该主题。 43 | 44 | 45 | # 最新版本:1.8.5 46 | 47 | 主要修改: 48 | 49 | 发现并继续调整css不同风格之间更统一。 50 | 51 | 修复上个版本评论不显示。 52 | 53 | 增加之前为了简洁而删掉了的返回顶部按钮。 54 | 55 | 更新点赞功能。 56 | 57 | 更新输入框特效和输入框显示。 58 | 59 | 更新替换 Gravatar 头像为 WeAvatar 头像。 60 | 61 | 更新文章页面头像模糊问题。 62 | 63 | 还有什么呢,想不起来了,可能是一些微不足道的小东西吧 64 | 65 | 修改后的演示站:https://peanoo.com 66 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 | 15 | 17 | 18 | 19 | 29 | 30 | 31 | 45 |
46 | 47 | 52 | 53 |
54 | 55 | 56 | 57 | 60 | 61 |
62 | 63 | 6 |
7 |
8 | <?php the_author(); ?> 9 |
10 |
11 |

12 |
13 |
14 |
15 | 52 |
53 |
54 | 55 | 67 |
68 | 73 | 74 |
75 | 76 | 77 | 78 | 81 | 82 |
83 | 84 | 14 | 15 | 16 | 17 |
18 | 19 |
20 |
21 |
22 |
23 | 24 |
25 |

Comments |

26 |
27 | 28 | 29 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 |
42 |
43 |
44 | 45 | 46 | 47 | 48 |
49 |
50 | 51 | 52 |

[ 登录 ] 才能发表留言!

53 | 54 |
55 | 56 |

  

57 | 58 | 59 | 60 |
61 | 62 | 63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
75 | 76 |
77 | 78 |

79 | 98 | ID); ?> 99 |
100 |
101 | 102 |
103 |
104 |
105 |
106 | 125 | 126 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 |
31 | 36 | 2, 'theme_location' => 'primary', 'container' => false ) ); ?> 37 |
38 |
39 |
40 |
41 |
42 |
43 | 53 | 54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 | 63 |
64 |
65 | 66 | 67 | 68 | 117 | 118 | 119 |
120 | 123 | 124 | 125 | 126 | 127 |
128 | 129 |
130 | 131 | 132 | 133 | 134 | 135 | 136 | 141 | 142 | 143 | 144 | 146 | 147 | 157 | 158 | 159 | 160 | 161 | 162 |
163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | section and everything up until
6 | * 7 | * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials 8 | * 9 | * @package Akina 10 | */ 11 | ?> 12 | 13 | > 14 | 15 | 16 | 17 | 18 | 19 | 20 | <?php global $page, $paged;wp_title( '-', true, 'right' ); 21 | bloginfo( 'name' ); 22 | $site_description = get_bloginfo( 'description', 'display' ); 23 | if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( '第 %s 页'), max( $paged, $page ) );?> 24 | 25 | 26 | 27 | 31 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | name . ','; 59 | }; 60 | }; 61 | if ( $categories ) { 62 | foreach ( $categories as $category ) { 63 | $keywords .= $category->name . ','; 64 | }; 65 | }; 66 | $description = mb_strimwidth( str_replace( "\r\n", '', strip_tags( $post->post_content ) ), 0, 240, '…' ); 67 | } else { 68 | $keywords = akina_option( 'akina_meta_keywords' ); 69 | $description = akina_option( 'akina_meta_description' ); 70 | }; 71 | ?> 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | > 82 | 83 | 84 |
85 | 86 | 90 |
91 | 92 |
93 | 94 |
95 | 116 | 117 | 118 |
119 | -------------------------------------------------------------------------------- /images/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/avatar.jpg -------------------------------------------------------------------------------- /images/background.svg: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /images/cd-arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | Imported Layers 8 | Created with Sketch. 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /images/earth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/earth.jpg -------------------------------------------------------------------------------- /images/f-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/f-logo.png -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/favicon.ico -------------------------------------------------------------------------------- /images/gotop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/gotop.png -------------------------------------------------------------------------------- /images/gowest/allmen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/gowest/allmen.png -------------------------------------------------------------------------------- /images/gowest/road.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/gowest/road.jpg -------------------------------------------------------------------------------- /images/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/grid.png -------------------------------------------------------------------------------- /images/hd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/hd.jpg -------------------------------------------------------------------------------- /images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/icons.png -------------------------------------------------------------------------------- /images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/login.png -------------------------------------------------------------------------------- /images/login_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/login_loading.gif -------------------------------------------------------------------------------- /images/none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/none.png -------------------------------------------------------------------------------- /images/postload.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/postload.gif -------------------------------------------------------------------------------- /images/random/random.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/random/random.jpg -------------------------------------------------------------------------------- /images/rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/rocket.png -------------------------------------------------------------------------------- /images/smilies/icon_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_arrow.gif -------------------------------------------------------------------------------- /images/smilies/icon_biggrin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_biggrin.gif -------------------------------------------------------------------------------- /images/smilies/icon_confused.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_confused.gif -------------------------------------------------------------------------------- /images/smilies/icon_cool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_cool.gif -------------------------------------------------------------------------------- /images/smilies/icon_cry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_cry.gif -------------------------------------------------------------------------------- /images/smilies/icon_eek.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_eek.gif -------------------------------------------------------------------------------- /images/smilies/icon_evil.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_evil.gif -------------------------------------------------------------------------------- /images/smilies/icon_exclaim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_exclaim.gif -------------------------------------------------------------------------------- /images/smilies/icon_idea.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_idea.gif -------------------------------------------------------------------------------- /images/smilies/icon_lol.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_lol.gif -------------------------------------------------------------------------------- /images/smilies/icon_mad.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_mad.gif -------------------------------------------------------------------------------- /images/smilies/icon_mrgreen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_mrgreen.gif -------------------------------------------------------------------------------- /images/smilies/icon_neutral.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_neutral.gif -------------------------------------------------------------------------------- /images/smilies/icon_question.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_question.gif -------------------------------------------------------------------------------- /images/smilies/icon_razz.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_razz.gif -------------------------------------------------------------------------------- /images/smilies/icon_redface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_redface.gif -------------------------------------------------------------------------------- /images/smilies/icon_rolleyes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_rolleyes.gif -------------------------------------------------------------------------------- /images/smilies/icon_sad.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_sad.gif -------------------------------------------------------------------------------- /images/smilies/icon_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_smile.gif -------------------------------------------------------------------------------- /images/smilies/icon_surprised.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_surprised.gif -------------------------------------------------------------------------------- /images/smilies/icon_twisted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_twisted.gif -------------------------------------------------------------------------------- /images/smilies/icon_wink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/smilies/icon_wink.gif -------------------------------------------------------------------------------- /images/social_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/social_icon.png -------------------------------------------------------------------------------- /images/temp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/temp.jpg -------------------------------------------------------------------------------- /images/ua/360se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/360se.png -------------------------------------------------------------------------------- /images/ua/android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/android.png -------------------------------------------------------------------------------- /images/ua/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/chrome.png -------------------------------------------------------------------------------- /images/ua/chromium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/chromium.png -------------------------------------------------------------------------------- /images/ua/crios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/crios.png -------------------------------------------------------------------------------- /images/ua/debian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/debian.png -------------------------------------------------------------------------------- /images/ua/edge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/edge.png -------------------------------------------------------------------------------- /images/ua/fedora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/fedora.png -------------------------------------------------------------------------------- /images/ua/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/firefox.png -------------------------------------------------------------------------------- /images/ua/ie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/ie.png -------------------------------------------------------------------------------- /images/ua/ie10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/ie10.png -------------------------------------------------------------------------------- /images/ua/ie11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/ie11.png -------------------------------------------------------------------------------- /images/ua/ie8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/ie8.png -------------------------------------------------------------------------------- /images/ua/ie9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/ie9.png -------------------------------------------------------------------------------- /images/ua/ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/ipad.png -------------------------------------------------------------------------------- /images/ua/iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/iphone.png -------------------------------------------------------------------------------- /images/ua/linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/linux.png -------------------------------------------------------------------------------- /images/ua/macos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/macos.png -------------------------------------------------------------------------------- /images/ua/maxthon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/maxthon.png -------------------------------------------------------------------------------- /images/ua/opera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/opera.png -------------------------------------------------------------------------------- /images/ua/opera15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/opera15.png -------------------------------------------------------------------------------- /images/ua/safari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/safari.png -------------------------------------------------------------------------------- /images/ua/sogou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/sogou.png -------------------------------------------------------------------------------- /images/ua/ubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/ubuntu.png -------------------------------------------------------------------------------- /images/ua/ucweb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/ucweb.png -------------------------------------------------------------------------------- /images/ua/unknow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/unknow.png -------------------------------------------------------------------------------- /images/ua/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/windows.png -------------------------------------------------------------------------------- /images/ua/windows_phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/windows_phone.png -------------------------------------------------------------------------------- /images/ua/windows_vista.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/windows_vista.png -------------------------------------------------------------------------------- /images/ua/windows_win10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/windows_win10.png -------------------------------------------------------------------------------- /images/ua/windows_win7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/windows_win7.png -------------------------------------------------------------------------------- /images/ua/windows_win8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/windows_win8.png -------------------------------------------------------------------------------- /images/ua/wordpress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/ua/wordpress.png -------------------------------------------------------------------------------- /images/wave1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/wave1.png -------------------------------------------------------------------------------- /images/wave2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saresam/Asky/6801afcbcae51a5dfbbd54ad0d1870dc76f888d4/images/wave2.png -------------------------------------------------------------------------------- /inc/categories-images.php: -------------------------------------------------------------------------------- 1 | 27 | th.column-thumb {width:60px;} 28 | .form-field img.taxonomy-image {border:1px solid #eee;max-width:300px;max-height:300px;} 29 | .inline-edit-row fieldset .thumb label span.title {width:48px;height:48px;border:1px solid #eee;display:inline-block;} 30 | .column-thumb span {width:48px;height:48px;border:1px solid #eee;display:inline-block;} 31 | .inline-edit-row fieldset .thumb img,.column-thumb img {width:48px;height:48px;} 32 | '; 33 | } 34 | 35 | // 添加在添加窗体中的图像字段 36 | function z_add_texonomy_field() { 37 | if (get_bloginfo('version') >= 3.5) // worpdress 最低版本3.5 38 | wp_enqueue_media(); 39 | else { 40 | wp_enqueue_style('thickbox'); 41 | wp_enqueue_script('thickbox'); 42 | } 43 | 44 | echo '
45 | 46 | 47 |
48 | 49 |
'.z_script(); 50 | } 51 | 52 | // 在编辑窗体中添加图像字段 53 | function z_edit_texonomy_field($taxonomy) { 54 | if (get_bloginfo('version') >= 3.5) 55 | wp_enqueue_media(); 56 | else { 57 | wp_enqueue_style('thickbox'); 58 | wp_enqueue_script('thickbox'); 59 | } 60 | 61 | if (z_taxonomy_image_url( $taxonomy->term_id, NULL, TRUE ) == Z_IMAGE_PLACEHOLDER) 62 | $image_url = ""; 63 | else 64 | $image_url = z_taxonomy_image_url( $taxonomy->term_id, NULL, TRUE ); 65 | echo ' 66 | 67 |

68 | 69 | 70 | 71 | '.z_script(); 72 | } 73 | 74 | // 上传图像 75 | function z_script() { 76 | return ''; 143 | } 144 | 145 | // 添加到钩子 146 | add_action('edit_term','z_save_taxonomy_image'); 147 | add_action('create_term','z_save_taxonomy_image'); 148 | function z_save_taxonomy_image($term_id) { 149 | if(isset($_POST['taxonomy_image'])) 150 | update_option('z_taxonomy_image'.$term_id, $_POST['taxonomy_image'], NULL); 151 | } 152 | 153 | // 附件地址 154 | function z_get_attachment_id_by_url($image_src) { 155 | global $wpdb; 156 | $query = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid = %s", $image_src); 157 | $id = $wpdb->get_var($query); 158 | return (!empty($id)) ? $id : NULL; 159 | } 160 | 161 | // 我不知道 162 | function z_taxonomy_image_url($term_id = NULL, $size = 'full', $return_placeholder = FALSE) { 163 | if (!$term_id) { 164 | if (is_category()) 165 | $term_id = get_query_var('cat'); 166 | elseif (is_tag()) 167 | $term_id = get_query_var('tag_id'); 168 | elseif (is_tax()) { 169 | $current_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); 170 | $term_id = $current_term->term_id; 171 | } 172 | } 173 | 174 | $taxonomy_image_url = get_option('z_taxonomy_image'.$term_id); 175 | if(!empty($taxonomy_image_url)) { 176 | $attachment_id = z_get_attachment_id_by_url($taxonomy_image_url); 177 | if(!empty($attachment_id)) { 178 | $taxonomy_image_url = wp_get_attachment_image_src($attachment_id, $size); 179 | $taxonomy_image_url = $taxonomy_image_url[0]; 180 | } 181 | } 182 | 183 | if ($return_placeholder) 184 | return ($taxonomy_image_url != '') ? $taxonomy_image_url : Z_IMAGE_PLACEHOLDER; 185 | else 186 | return $taxonomy_image_url; 187 | } 188 | 189 | function z_quick_edit_custom_box($column_name, $screen, $name) { 190 | if ($column_name == 'thumb') 191 | echo '
192 |
193 | 201 |
202 |
'; 203 | } 204 | 205 | /** 206 | * 添加类别管理 207 | */ 208 | function z_taxonomy_columns( $columns ) { 209 | $new_columns = array(); 210 | $new_columns['cb'] = $columns['cb']; 211 | $new_columns['thumb'] = __('图像', 'categories-images'); 212 | 213 | unset( $columns['cb'] ); 214 | 215 | return array_merge( $new_columns, $columns ); 216 | } 217 | 218 | /** 219 | * 图像列表 220 | */ 221 | function z_taxonomy_column( $columns, $column, $id ) { 222 | if ( $column == 'thumb' ) 223 | $columns = '' . __('暂无', 'categories-images') . ''; 224 | 225 | return $columns; 226 | } 227 | 228 | // 将“插入帖子”更改为“使用此图片” 229 | function z_change_insert_button_text($safe_text, $text) { 230 | return str_replace("Insert into Post", "Use this image", $text); 231 | } 232 | 233 | // 列表图片样式 234 | if ( strpos( $_SERVER['SCRIPT_NAME'], 'edit-tags.php' ) > 0 ) { 235 | add_action('quick_edit_custom_box', 'z_quick_edit_custom_box', 10, 3); 236 | add_filter("attribute_escape", "z_change_insert_button_text", 10, 2); 237 | } 238 | -------------------------------------------------------------------------------- /inc/css/admin.css: -------------------------------------------------------------------------------- 1 | .theme-about { 2 | background: #fff; 3 | max-width:860px; 4 | margin: 0 auto; 5 | box-shadow: 0 2px 6px rgba(0,0,0,.04); 6 | border: 1px solid #ddd; 7 | margin-top:50px 8 | } 9 | .fu-info { 10 | padding:20px 40px 11 | } 12 | .fu-info p { 13 | line-height: 30px; 14 | font-size: 15px; 15 | color: #797979; 16 | letter-spacing: 2px; 17 | } 18 | 19 | .fu-she { 20 | text-align: center; 21 | margin-bottom: 30px; 22 | display: inline-block; 23 | width: 100%; 24 | padding:20px 0 25 | } 26 | .fu-she span { 27 | margin-right:15px 28 | } 29 | .akina img { 30 | width: 50px; 31 | } 32 | .fufooter-info { 33 | height: 70px; 34 | background: #384152; 35 | margin-top:20px 36 | } 37 | span.copyright-fu { 38 | width: 100%; 39 | display: inline-block; 40 | padding: 25px 0; 41 | text-align: center; 42 | color: white; 43 | } 44 | .fufooter-info a{ 45 | color:#fff 46 | } -------------------------------------------------------------------------------- /inc/css/color-picker.min.css: -------------------------------------------------------------------------------- 1 | .wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f9f9f9;border:1px solid #bbb;border-radius:2px;cursor:pointer;display:inline-block;height:22px;margin:0 6px 6px 0;position:relative;top:1px;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;vertical-align:bottom;display:inline-block;padding-left:30px}.wp-color-result:after{background:#f3f3f3;background-image:-webkit-gradient(linear,left top,left bottom,from(#fefefe),to(#f4f4f4));background-image:-webkit-linear-gradient(top,#fefefe,#f4f4f4);background-image:-moz-linear-gradient(top,#fefefe,#f4f4f4);background-image:-o-linear-gradient(top,#fefefe,#f4f4f4);background-image:linear-gradient(to bottom,#fefefe,#f4f4f4);color:#333;text-shadow:0 1px 0 #fff;border-radius:0 1px 1px 0;border-left:1px solid #bbb;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;right:0;text-align:center;top:0}.wp-color-result:hover{border-color:#aaa;box-shadow:0 1px 1px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.1);-ms-box-shadow:0 1px 1px rgba(0,0,0,0.1);-o-box-shadow:0 1px 1px rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.1)}.wp-color-result:hover:after{color:#222;border-color:#aaa;border-left:1px solid #999}.wp-color-result.wp-picker-open{top:0}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result:focus{border-color:#888;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.2);-ms-box-shadow:0 1px 2px rgba(0,0,0,0.2);-o-box-shadow:0 1px 2px rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.2);box-shadow:0 1px 2px rgba(0,0,0,0.2)}.wp-color-result:focus:after{border-color:#888}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-left:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{border-color:#dfdfdf;margin-top:6px}input[type="text"].iris-error{background-color:#ffebe8;border-color:#c00;color:#000} -------------------------------------------------------------------------------- /inc/css/optionsframework.css: -------------------------------------------------------------------------------- 1 | /* Options Framework Admin Styles */ 2 | 3 | body { 4 | font-family:miranafont,"Hiragino Sans GB",STXihei,"Microsoft YaHei",SimSun,sans-serif; 5 | background:#F5F5F5 ; 6 | height: auto; 7 | } 8 | 9 | .nav-tab-wrapper { 10 | position: relative; 11 | max-width: 1000px; 12 | margin: auto !important; 13 | } 14 | 15 | .wrap h2.nav-tab-wrapper { 16 | border-bottom:none 17 | } 18 | 19 | .metabox-holder { 20 | padding-top:0 !important 21 | } 22 | 23 | .nav-tab-active { 24 | border-bottom: none; 25 | background: #fff; 26 | color: #000; 27 | border:none; 28 | font-weight: 300; 29 | font-size: 18px; 30 | color: #4B6894; 31 | } 32 | 33 | .nav-tab-active:hover { 34 | background: #fff; 35 | } 36 | 37 | .nav-tab { 38 | background: none; 39 | border:none; 40 | padding: 10px 20px; 41 | font-weight: 300; 42 | font-size: 15px; 43 | color: darkgoldenrod; 44 | border-radius: 3px 3px 0 0; 45 | } 46 | 47 | .nav-tab-active { 48 | background:#fff 49 | } 50 | 51 | a#options-group-1-tab:before { 52 | font-family: "dashicons"; 53 | content: "\f111"; 54 | float: left; 55 | } 56 | 57 | a#options-group-2-tab:before { 58 | font-family: "dashicons"; 59 | content: "\f102"; 60 | float: left; 61 | } 62 | 63 | a#options-group-3-tab:before { 64 | font-family: "dashicons"; 65 | content: "\f123"; 66 | float: left; 67 | } 68 | 69 | a#options-group-4-tab:before { 70 | font-family: "dashicons"; 71 | content: "\f487"; 72 | float: left; 73 | } 74 | 75 | a#options-group-5-tab:before { 76 | font-family: "dashicons"; 77 | content: "\f227"; 78 | float: left; 79 | } 80 | 81 | a#options-group-6-tab:before { 82 | font-family: "dashicons"; 83 | content: "\f105"; 84 | float: left; 85 | } 86 | 87 | a#options-group-7-tab:before { 88 | font-family: "dashicons"; 89 | content: "\f110"; 90 | float: left; 91 | } 92 | 93 | a#options-group-8-tab:before { 94 | font-family: "dashicons"; 95 | content: "\f109"; 96 | float: left; 97 | } 98 | 99 | a#options-group-10-tab:before { 100 | font-family: "dashicons"; 101 | content: "\f112"; 102 | float: left; 103 | } 104 | 105 | 106 | input[type=checkbox], input[type=radio] { 107 | border: 1px solid #b4b9be; 108 | background: #fff; 109 | color: #555; 110 | clear: none; 111 | cursor: pointer; 112 | display: inline-block; 113 | line-height: 0; 114 | height: 16px; 115 | margin: -4px 4px 0 0; 116 | outline: none; 117 | padding: 0!important; 118 | text-align: center; 119 | vertical-align: middle; 120 | width: 16px; 121 | min-width: 16px; 122 | box-shadow: none 123 | } 124 | 125 | input[type="button"]{ 126 | box-shadow: none !important; 127 | border: none !important; 128 | background:#FF5858 !important; 129 | color:#fff !important 130 | } 131 | 132 | input[type=text], 133 | input[type=password], 134 | input[type=checkbox], 135 | input[type=color], 136 | input[type=date], 137 | input[type=datetime], 138 | input[type=datetime-local], 139 | input[type=email], 140 | input[type=month], 141 | input[type=number], 142 | input[type=radio], 143 | input[type=tel], 144 | input[type=time], 145 | input[type=url], 146 | input[type=week], 147 | input[type=search], 148 | select, textarea{ 149 | box-shadow:none 150 | } 151 | input[type="submit" i], input[type="reset" i]{ 152 | 153 | } 154 | 155 | #optionsframework h4 { 156 | font-weight:300; 157 | font-size: 15px 158 | } 159 | #optionsframework { 160 | position:relative; 161 | z-index: 0; 162 | max-width:1000px; 163 | background:#FBFBFB; 164 | padding: 30px; 165 | margin: auto; 166 | box-shadow: none; 167 | border: none; 168 | border: 1px solid #fff; 169 | border-radius: 3px; 170 | } 171 | #optionsframework h3 { 172 | cursor: default; 173 | cursor: default; 174 | font-size: 20px; 175 | font-weight: 600; 176 | color: #3F607D; 177 | display: none; 178 | } 179 | #optionsframework p { 180 | margin-bottom:0; 181 | padding-bottom:10px; 182 | line-height: 1.4em; 183 | } 184 | #optionsframework .section { 185 | padding: 10px; 186 | margin-bottom: 20px; 187 | padding-bottom: 30px; 188 | border-bottom: 1px solid #E8E8E8; 189 | } 190 | #optionsframework .group { 191 | padding-bottom:40px; 192 | } 193 | #optionsframework .section .heading { 194 | padding:10px 0px; 195 | margin:0 0 15px; 196 | font-weight: 600; 197 | color: #455E8C; 198 | } 199 | #optionsframework .section .controls { 200 | float: left; 201 | min-width:350px; 202 | width: 54%; 203 | padding-right:2%; 204 | } 205 | #optionsframework .section .explain { 206 | max-width:38%; 207 | float: left; 208 | font-size: 12px; 209 | line-height:20px; 210 | color: #777; 211 | } 212 | #optionsframework .section-checkbox .controls { 213 | width: 98%; 214 | } 215 | #optionsframework .section-checkbox .explain { 216 | max-width:94%; 217 | } 218 | #optionsframework .of-input { 219 | width:100%; 220 | } 221 | #optionsframework .controls select, #optionsframework .controls textarea { 222 | margin-bottom:10px; 223 | width:100%; 224 | } 225 | #optionsframework .section-radio label, #optionsframework .section-multicheck label { 226 | float:left; 227 | max-width:90%; 228 | line-height: 16px; 229 | margin-bottom: 5px; 230 | } 231 | #optionsframework input.checkbox, #optionsframework input.of-radio { 232 | width: 15px; 233 | margin-top:2px; 234 | float:left; 235 | clear:both; 236 | border-radius: 50%; 237 | } 238 | #optionsframework .section-typography .controls { 239 | float:none; 240 | width:auto; 241 | } 242 | #optionsframework .section-typography .explain { 243 | float:none; 244 | width:auto; 245 | } 246 | #optionsframework .controls .of-typography-size { 247 | width:80px; 248 | float:left 249 | } 250 | #optionsframework .controls .of-typography-unit { 251 | width:50px; 252 | margin-left:5px; 253 | float:left 254 | } 255 | #optionsframework .controls .of-typography-face { 256 | width:100px; 257 | margin-left:5px; 258 | float:left 259 | } 260 | #optionsframework .controls .of-typography-style { 261 | width:80px; 262 | margin-left:5px; 263 | margin-right:5px; 264 | float:left 265 | } 266 | #optionsframework .of-background-properties { 267 | clear:both; 268 | margin-top: 18px; 269 | } 270 | #optionsframework .controls .of-background-repeat { 271 | width:125px; 272 | margin-right:5px; 273 | float:left 274 | } 275 | #optionsframework .controls .of-background-position { 276 | width:125px; 277 | margin-right:5px; 278 | float:left 279 | } 280 | #optionsframework .controls .of-background-attachment { 281 | width:125px; 282 | margin-right:5px; 283 | float:left 284 | } 285 | #optionsframework .section-background .wp-picker-container { 286 | margin-bottom:10px; 287 | } 288 | #optionsframework .controls .of-radio-img-img { 289 | border:3px solid #f9f9f9; 290 | margin:0 5px 10px 0; 291 | display:none; 292 | cursor:pointer; 293 | float:left; 294 | } 295 | #optionsframework .controls .of-radio-img-selected { 296 | border:3px solid #ccc 297 | } 298 | #optionsframework .controls .of-radio-img-img:hover { 299 | opacity:.8; 300 | } 301 | #optionsframework .controls .of-border-width { 302 | width:80px; 303 | float:left 304 | } 305 | #optionsframework .controls .of-border-style { 306 | width:120px; 307 | float:left 308 | } 309 | #optionsframework .hide { 310 | display:none; 311 | } 312 | #optionsframework .of-option-image { 313 | max-width:340px; 314 | margin:3px 0 18px 0; 315 | } 316 | #optionsframework .mini .controls select, #optionsframework .section .mini .controls { 317 | width: 140px; 318 | } 319 | #optionsframework .mini .controls input, #optionsframework .mini .controls { 320 | min-width:140px; 321 | width: 140px; 322 | } 323 | #optionsframework .mini .explain { 324 | max-width:74%; 325 | } 326 | 327 | /* Editor */ 328 | 329 | #optionsframework .section-editor .explain { 330 | max-width: 98%; 331 | float:none; 332 | margin-bottom:5px; 333 | } 334 | 335 | /* Image Uploader */ 336 | 337 | #optionsframework .controls input.upload { 338 | width:80%; 339 | box-shadow: none; 340 | } 341 | #optionsframework .controls input.upload_button { 342 | float:right; 343 | border-color:#BBBBBB; 344 | cursor:pointer; 345 | } 346 | #optionsframework .controls input.upload_button:hover { 347 | border-color:#666666; 348 | color:#000; 349 | } 350 | #optionsframework .screenshot { 351 | float:left; 352 | margin-left:1px; 353 | position:relative; 354 | width:150px; 355 | margin-top:20px; 356 | } 357 | #optionsframework .screenshot img { 358 | background:#FAFAFA; 359 | border-color:#ccc #eee #eee #ccc; 360 | border-style:solid; 361 | border-width:1px; 362 | float:left; 363 | max-width:334px; 364 | max-height: 130px; 365 | padding:4px; 366 | margin-bottom:10px; 367 | } 368 | #optionsframework .screenshot .remove-image { 369 | background:url("../images/ico-delete.png") no-repeat; 370 | border:medium none; 371 | bottom:4px; 372 | display:block; 373 | float:left; 374 | height:16px; 375 | padding:0; 376 | position:absolute; 377 | left:-4px; 378 | text-indent:-9999px; 379 | width:16px; 380 | } 381 | #optionsframework .screenshot .no_image .file_link { 382 | margin-left: 20px; 383 | } 384 | #optionsframework .screenshot .no_image .remove-button { 385 | bottom: 0px; 386 | } 387 | #optionsframework .reset-button { 388 | float: left; 389 | box-shadow: none; 390 | border: none; 391 | background: #374D6F; 392 | text-shadow: none; 393 | color:#fff; 394 | height: 40px; 395 | width: 100px; 396 | border-radius: 0px; 397 | cursor:pointer; 398 | } 399 | 400 | /* Bottom Section */ 401 | 402 | #optionsframework-submit { 403 | padding: 7px 10px; 404 | background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); 405 | } 406 | #optionsframework .button-primary { 407 | float: right; 408 | box-shadow: none; 409 | border: none; 410 | background: #FF6464; 411 | text-shadow: none; 412 | /* padding: 10px; */ 413 | height: 40px; 414 | width: 100px; 415 | border-radius: 0px; 416 | } 417 | #optionsframework .section:after { 418 | content: ""; 419 | display: table; 420 | } 421 | #optionsframework .section:after { 422 | clear: both; 423 | } 424 | 425 | input.of-radio-img-radio{display: none;} 426 | .of-radio-img-label{display: none;} 427 | .of-radio-color{ 428 | display: inline-block;width: 20px;height: 20px;margin: 0 5px 0 0; 429 | } 430 | #optionsframework .controls .of-radio-img-img { 431 | border:3px solid #f9f9f9; 432 | margin:0 5px 10px 0; 433 | /*display:none;*/ 434 | cursor:pointer; 435 | float:left; 436 | } 437 | #optionsframework .controls .of-radio-img-selected { 438 | border:3px solid #ccc 439 | } 440 | #optionsframework .controls .of-radio-img-img:hover { 441 | opacity:.8; 442 | } 443 | #optionsframework .controls .of-border-width { 444 | width:80px; 445 | float:left 446 | } 447 | #optionsframework .controls .of-border-style { 448 | width:120px; 449 | float:left 450 | } 451 | 452 | 453 | #optionsframework .section-color .controls, 454 | #optionsframework .section-colorradio .controls, 455 | #optionsframework .section-radio .controls{float: none;width: 100%;overflow: hidden;margin-bottom: 5px;} 456 | 457 | #optionsframework .section-color .explain, 458 | #optionsframework .section-colorradio .explain, 459 | #optionsframework .section-radio .explain{float: none;width: 100%;} 460 | -------------------------------------------------------------------------------- /inc/customizer.php: -------------------------------------------------------------------------------- 1 | get_setting( 'blogname' )->transport = 'postMessage'; 15 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 16 | $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 17 | } 18 | add_action( 'customize_register', 'akina_customize_register' ); 19 | 20 | /** 21 | * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 22 | */ 23 | function akina_customize_preview_js() { 24 | wp_enqueue_script( 'akina_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); 25 | } 26 | add_action( 'customize_preview_init', 'akina_customize_preview_js' ); 27 | -------------------------------------------------------------------------------- /inc/decorate.php: -------------------------------------------------------------------------------- 1 | 3 | 53 | ',c='
',b='
',g='';var d={options:{defaultColor:false,change:false,clear:false,hide:true,palettes:true},_create:function(){if(f.browser.msie&&parseInt(f.browser.version,10)<8){return}var h=this;var i=h.element;f.extend(h.options,i.data());h.initialValue=i.val();i.addClass("wp-color-picker").hide().wrap(b);h.wrap=i.parent();h.toggler=f(a).insertBefore(i).css({backgroundColor:h.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current);h.pickerContainer=f(c).insertAfter(i);h.button=f(g);if(h.options.defaultColor){h.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString)}else{h.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear)}i.wrap('').after(h.button);i.iris({target:h.pickerContainer,hide:true,width:255,mode:"hsv",palettes:h.options.palettes,change:function(j,k){h.toggler.css({backgroundColor:k.color.toString()});if(f.isFunction(h.options.change)){h.options.change.call(this,j,k)}}});i.val(h.initialValue);h._addListeners();if(!h.options.hide){h.toggler.click()}},_addListeners:function(){var h=this;h.toggler.click(function(i){i.stopPropagation();h.element.toggle().iris("toggle");h.button.toggleClass("hidden");h.toggler.toggleClass("wp-picker-open");if(h.toggler.hasClass("wp-picker-open")){f("body").on("click",{wrap:h.wrap,toggler:h.toggler},h._bodyListener)}else{f("body").off("click",h._bodyListener)}});h.element.change(function(j){var i=f(this),k=i.val();if(k===""||k==="#"){h.toggler.css("backgroundColor","");if(f.isFunction(h.options.clear)){h.options.clear.call(this,j)}}});h.toggler.on("keyup",function(i){if(i.keyCode===13||i.keyCode===32){i.preventDefault();h.toggler.trigger("click").next().focus()}});h.button.click(function(j){var i=f(this);if(i.hasClass("wp-picker-clear")){h.element.val("");h.toggler.css("backgroundColor","");if(f.isFunction(h.options.clear)){h.options.clear.call(this,j)}}else{if(i.hasClass("wp-picker-default")){h.element.val(h.options.defaultColor).change()}}})},_bodyListener:function(h){if(!h.data.wrap.find(h.target).length){h.data.toggler.click()}},color:function(h){if(h===e){return this.element.iris("option","color")}this.element.iris("option","color",h)},defaultColor:function(h){if(h===e){return this.options.defaultColor}this.options.defaultColor=h}};f.widget("wp.wpColorPicker",d)}(jQuery)); -------------------------------------------------------------------------------- /inc/js/media-uploader.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | 3 | var optionsframework_upload; 4 | var optionsframework_selector; 5 | 6 | function optionsframework_add_file(event, selector) { 7 | 8 | var upload = $(".uploaded-file"), frame; 9 | var $el = $(this); 10 | optionsframework_selector = selector; 11 | 12 | event.preventDefault(); 13 | 14 | // If the media frame already exists, reopen it. 15 | if ( optionsframework_upload ) { 16 | optionsframework_upload.open(); 17 | } else { 18 | // Create the media frame. 19 | optionsframework_upload = wp.media.frames.optionsframework_upload = wp.media({ 20 | // Set the title of the modal. 21 | title: $el.data('choose'), 22 | 23 | // Customize the submit button. 24 | button: { 25 | // Set the text of the button. 26 | text: $el.data('update'), 27 | // Tell the button not to close the modal, since we're 28 | // going to refresh the page when the image is selected. 29 | close: false 30 | } 31 | }); 32 | 33 | // When an image is selected, run a callback. 34 | optionsframework_upload.on( 'select', function() { 35 | // Grab the selected attachment. 36 | var attachment = optionsframework_upload.state().get('selection').first(); 37 | optionsframework_upload.close(); 38 | optionsframework_selector.find('.upload').val(attachment.attributes.url); 39 | if ( attachment.attributes.type == 'image' ) { 40 | optionsframework_selector.find('.screenshot').empty().hide().append('Remove').slideDown('fast'); 41 | } 42 | optionsframework_selector.find('.upload-button').unbind().addClass('remove-file').removeClass('upload-button').val(optionsframework_l10n.remove); 43 | optionsframework_selector.find('.of-background-properties').slideDown(); 44 | optionsframework_selector.find('.remove-image, .remove-file').on('click', function() { 45 | optionsframework_remove_file( $(this).parents('.section') ); 46 | }); 47 | }); 48 | 49 | } 50 | 51 | // Finally, open the modal. 52 | optionsframework_upload.open(); 53 | } 54 | 55 | function optionsframework_remove_file(selector) { 56 | selector.find('.remove-image').hide(); 57 | selector.find('.upload').val(''); 58 | selector.find('.of-background-properties').hide(); 59 | selector.find('.screenshot').slideUp(); 60 | selector.find('.remove-file').unbind().addClass('upload-button').removeClass('remove-file').val(optionsframework_l10n.upload); 61 | // We don't display the upload button if .upload-notice is present 62 | // This means the user doesn't have the WordPress 3.5 Media Library Support 63 | if ( $('.section-upload .upload-notice').length > 0 ) { 64 | $('.upload-button').remove(); 65 | } 66 | selector.find('.upload-button').on('click', function(event) { 67 | optionsframework_add_file(event, $(this).parents('.section')); 68 | }); 69 | } 70 | 71 | $('.remove-image, .remove-file').on('click', function() { 72 | optionsframework_remove_file( $(this).parents('.section') ); 73 | }); 74 | 75 | $('.upload-button').click( function( event ) { 76 | optionsframework_add_file(event, $(this).parents('.section')); 77 | }); 78 | 79 | }); -------------------------------------------------------------------------------- /inc/js/options-custom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Prints out the inline javascript needed for the colorpicker and choosing 3 | * the tabs in the panel. 4 | */ 5 | 6 | jQuery(document).ready(function($) { 7 | 8 | // Fade out the save message 9 | $('.fade').delay(1000).fadeOut(1000); 10 | 11 | $('.of-color').wpColorPicker(); 12 | 13 | // Switches option sections 14 | $('.group').hide(); 15 | var active_tab = ''; 16 | if (typeof(localStorage) != 'undefined' ) { 17 | active_tab = localStorage.getItem("active_tab"); 18 | } 19 | if (active_tab != '' && $(active_tab).length ) { 20 | $(active_tab).fadeIn(); 21 | } else { 22 | $('.group:first').fadeIn(); 23 | } 24 | $('.group .collapsed').each(function(){ 25 | $(this).find('input:checked').parent().parent().parent().nextAll().each( 26 | function(){ 27 | if ($(this).hasClass('last')) { 28 | $(this).removeClass('hidden'); 29 | return false; 30 | } 31 | $(this).filter('.hidden').removeClass('hidden'); 32 | }); 33 | }); 34 | if (active_tab != '' && $(active_tab + '-tab').length ) { 35 | $(active_tab + '-tab').addClass('nav-tab-active'); 36 | } 37 | else { 38 | $('.nav-tab-wrapper a:first').addClass('nav-tab-active'); 39 | } 40 | 41 | $('.nav-tab-wrapper a').click(function(evt) { 42 | $('.nav-tab-wrapper a').removeClass('nav-tab-active'); 43 | $(this).addClass('nav-tab-active').blur(); 44 | var clicked_group = $(this).attr('href'); 45 | if (typeof(localStorage) != 'undefined' ) { 46 | localStorage.setItem("active_tab", $(this).attr('href')); 47 | } 48 | $('.group').hide(); 49 | $(clicked_group).fadeIn(); 50 | evt.preventDefault(); 51 | 52 | // Editor Height (needs improvement) 53 | $('.wp-editor-wrap').each(function() { 54 | var editor_iframe = $(this).find('iframe'); 55 | if ( editor_iframe.height() < 30 ) { 56 | editor_iframe.css({'height':'auto'}); 57 | } 58 | }); 59 | 60 | }); 61 | 62 | $('.group .collapsed input:checkbox').click(unhideHidden); 63 | 64 | function unhideHidden(){ 65 | if ($(this).attr('checked')) { 66 | $(this).parent().parent().parent().nextAll().removeClass('hidden'); 67 | } 68 | else { 69 | $(this).parent().parent().parent().nextAll().each( 70 | function(){ 71 | if ($(this).filter('.last').length) { 72 | $(this).addClass('hidden'); 73 | return false; 74 | } 75 | $(this).addClass('hidden'); 76 | }); 77 | 78 | } 79 | } 80 | 81 | // Image Options 82 | $('.of-radio-img-img').click(function(){ 83 | $(this).parent().parent().find('.of-radio-img-img').removeClass('of-radio-img-selected'); 84 | $(this).addClass('of-radio-img-selected'); 85 | }); 86 | 87 | $('.of-radio-img-label').hide(); 88 | $('.of-radio-img-img').show(); 89 | $('.of-radio-img-radio').hide(); 90 | 91 | }); -------------------------------------------------------------------------------- /inc/login.css: -------------------------------------------------------------------------------- 1 | /* clear float */ 2 | .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 3 | .clearfix { display: block; } 4 | 5 | /* common */ 6 | html { overflow:hidden; background-color: #000;} 7 | body { background:none !important; overflow:hidden; position: relative;} 8 | 9 | #bg{ 10 | filter: blur(0px); 11 | } 12 | #bg img { opacity: 1 !important;; } 13 | 14 | .login #login_error, .login .message { 15 | position: absolute; 16 | top: -70px; 17 | } 18 | 19 | .user-pass-wrap { 20 | padding: 0px 35px; 21 | } 22 | 23 | /* login */ 24 | #login { 25 | font:14px/1.4 "Helvetica Neue","HelveticaNeue",Helvetica,Arial,sans-serif; 26 | position:absolute; 27 | background: rgba(255, 255, 255, 0.45); 28 | border-radius: 6px; 29 | top:35%; 30 | left:50%; 31 | width:380px; 32 | padding:0px !important; 33 | margin:-235px 0px 0px -190px !important; 34 | background-position: center 48%; 35 | } 36 | 37 | #login h1 a { 38 | font-family:"Microsoft Yahei"; 39 | font-weight:bold; 40 | text-indent:0px; 41 | font-size:0px; 42 | height:64px; 43 | width: 100%; 44 | line-height:88px; 45 | line-height:180%; 46 | text-align:center; color:#FFF; 47 | text-shadow:1px 1px 0px #000; 48 | margin-bottom:10px; 49 | margin-top: 25px; 50 | background-image:url(../images/login.png); 51 | background-position: center bottom !important; 52 | background-size: contain; 53 | padding-top: 20px; 54 | box-shadow: none; 55 | } 56 | 57 | input:-webkit-autofill {-webkit-box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0) inset;; 58 | color: #676767 !important} 59 | 60 | #login form { 61 | padding:10px 0px; 62 | background: none; 63 | box-shadow: none; 64 | margin-top: 10px; 65 | } 66 | 67 | #login form p { 68 | font-family:"Microsoft Yahei"; 69 | position:relative; 70 | padding:0px 35px; 71 | } 72 | 73 | #login a { 74 | color:#000 !important; 75 | font-family:"Microsoft Yahei"; 76 | } 77 | 78 | #login_error a { 79 | color:#000 !important; 80 | text-shadow:1px 1px 0px #FFF; 81 | } 82 | 83 | #login form label { 84 | color: #000000; 85 | } 86 | .login .password-input-wrapper{ 87 | width: 100%; 88 | } 89 | 90 | .login .button.button-secondary{ 91 | width: 10%; 92 | height: 50px; 93 | float: right; 94 | margin-top:10px; 95 | } 96 | .dashicons, .dashicons-before:before{ 97 | padding: 12px 0; 98 | } 99 | 100 | #login form .input { 101 | border:1px solid #EAEAEA; 102 | border-radius:0px; 103 | background:none; 104 | padding:5px 10px; 105 | color:#444; 106 | width:89%; 107 | font-weight:normal; 108 | font-size:14px; 109 | background:#FFF; 110 | font-family:"Microsoft Yahei"; 111 | box-shadow: 0 0 0px 1000px white inset; 112 | height: 50px; 113 | border-radius: 3px; 114 | margin-top: 10px; 115 | } 116 | 117 | #login form .input:active { 118 | box-shadow:0 0 0px 1000px white inset; 119 | color: #676767 !important; 120 | } 121 | 122 | #login form .input:focus { 123 | box-shadow:0 0 0px 1000px white inset; 124 | color: #676767 !important; 125 | } 126 | 127 | #login .form-send .bot { 128 | width:100%; 129 | border-bottom:1px solid #ccc; 130 | } 131 | 132 | #login form .forgetmenot { 133 | float:none; 134 | } 135 | 136 | #login form p.submit { 137 | padding:0px 35px !important; 138 | } 139 | 140 | #login .submit .button { 141 | width:100%; 142 | margin: 20px auto 40px; 143 | border:none; 144 | float:none; 145 | border-radius:30px; 146 | height:50px; 147 | font-size:14px; 148 | text-align:center; 149 | color:#FFF; 150 | background:#FF5656; 151 | font-weight:normal; 152 | cursor:pointer; 153 | box-shadow: none; 154 | text-shadow: none; 155 | letter-spacing:2px 156 | } 157 | 158 | .login #nav , #backtoblog { 159 | display:Block; 160 | font-size:14px; 161 | text-align:center; 162 | color:#FFF; 163 | } 164 | 165 | .login .ds-login{ 166 | margin-left: 38px; 167 | } 168 | 169 | .login form input[type=checkbox] { 170 | background: #FFFFFF; 171 | box-shadow: none; 172 | width:20px; 173 | height:20px; 174 | border-radius: 2px; 175 | } 176 | 177 | input[type=checkbox]:checked:before { 178 | content: "\f147"; 179 | margin: -2px 0 0 -2px; 180 | color: #FF5656; 181 | } 182 | 183 | /* loading */ 184 | .loading { position:absolute; top:0px; left:0px; width:100%; height:100%; z-index:99; overflow:hidden; background:#000; } 185 | .loading img { position:absolute; top:50%; left:50%; width:58px; height:10px; margin:-5px 0px 0px -29px; } -------------------------------------------------------------------------------- /inc/options-media-uploader.php: -------------------------------------------------------------------------------- 1 | ' . "\n"; 52 | if ( function_exists( 'wp_enqueue_media' ) ) { 53 | if ( ( $value == '' ) ) { 54 | $output .= '' . "\n"; 55 | } else { 56 | $output .= '' . "\n"; 57 | } 58 | } else { 59 | $output .= '

' . __( 'Upgrade your version of WordPress for full media support.', 'options_framework_theme' ) . '

'; 60 | } 61 | 62 | if ( $_desc != '' ) { 63 | $output .= '' . $_desc . '' . "\n"; 64 | } 65 | 66 | $output .= '
' . "\n"; 67 | 68 | if ( $value != '' ) { 69 | $remove = 'Remove'; 70 | $image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $value ); 71 | if ( $image ) { 72 | $output .= ''.$remove.''; 73 | } else { 74 | $parts = explode( "/", $value ); 75 | for( $i = 0; $i < sizeof( $parts ); ++$i ) { 76 | $title = $parts[$i]; 77 | } 78 | 79 | // No output preview if it's not an image. 80 | $output .= ''; 81 | 82 | // Standard generic output if it's not an image. 83 | $title = __( 'View File', 'options_framework_theme' ); 84 | $output .= ''; 85 | } 86 | } 87 | $output .= '
' . "\n"; 88 | return $output; 89 | } 90 | 91 | endif; 92 | 93 | /** 94 | * Enqueue scripts for file uploader 95 | */ 96 | 97 | if ( ! function_exists( 'optionsframework_media_scripts' ) ) : 98 | 99 | add_action( 'admin_enqueue_scripts', 'optionsframework_media_scripts' ); 100 | 101 | function optionsframework_media_scripts( $hook ) { 102 | 103 | $menu = optionsframework_menu_settings(); 104 | 105 | if ( 'appearance_page_' . $menu['menu_slug'] != $hook ) 106 | return; 107 | 108 | if ( function_exists( 'wp_enqueue_media' ) ) 109 | wp_enqueue_media(); 110 | wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ) ); 111 | wp_enqueue_script( 'of-media-uploader' ); 112 | wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array( 113 | 'upload' => __( '上传', 'options_framework_theme' ), 114 | 'remove' => __( '移除', 'options_framework_theme' ) 115 | ) ); 116 | } 117 | 118 | endif; 119 | -------------------------------------------------------------------------------- /inc/options-sanitize.php: -------------------------------------------------------------------------------- 1 | $value ) { 26 | $output[$key] = "0"; 27 | } 28 | foreach( $input as $key => $value ) { 29 | if ( array_key_exists( $key, $option['options'] ) && $value ) { 30 | $output[$key] = "1"; 31 | } 32 | } 33 | } 34 | return $output; 35 | } 36 | add_filter( 'of_sanitize_multicheck', 'of_sanitize_multicheck', 10, 2 ); 37 | add_filter( 'of_sanitize_color', 'of_sanitize_hex' ); 38 | function of_sanitize_upload( $input ) { 39 | $output = ''; 40 | $filetype = wp_check_filetype($input); 41 | if ( $filetype["ext"] ) { 42 | $output = $input; 43 | } 44 | return $output; 45 | } 46 | add_filter( 'of_sanitize_upload', 'of_sanitize_upload' ); 47 | function of_sanitize_editor($input) { 48 | if ( current_user_can( 'unfiltered_html' ) ) { 49 | $output = $input; 50 | } 51 | else { 52 | global $allowedtags; 53 | $output = wpautop(wp_kses( $input, $allowedtags)); 54 | } 55 | return $output; 56 | } 57 | add_filter( 'of_sanitize_editor', 'of_sanitize_editor' ); 58 | function of_sanitize_allowedtags($input) { 59 | global $allowedtags; 60 | $output = wpautop(wp_kses( $input, $allowedtags)); 61 | return $output; 62 | } 63 | function of_sanitize_allowedposttags($input) { 64 | global $allowedposttags; 65 | $output = wpautop(wp_kses( $input, $allowedposttags)); 66 | return $output; 67 | } 68 | 69 | add_filter( 'of_sanitize_info', 'of_sanitize_allowedposttags' ); 70 | function of_sanitize_enum( $input, $option ) { 71 | $output = ''; 72 | if ( array_key_exists( $input, $option['options'] ) ) { 73 | $output = $input; 74 | } 75 | return $output; 76 | } 77 | function of_sanitize_background( $input ) { 78 | $output = wp_parse_args( $input, array( 79 | 'color' => '', 80 | 'image' => '', 81 | 'repeat' => 'repeat', 82 | 'position' => 'top center', 83 | 'attachment' => 'scroll' 84 | ) ); 85 | 86 | $output['color'] = apply_filters( 'of_sanitize_hex', $input['color'] ); 87 | $output['image'] = apply_filters( 'of_sanitize_upload', $input['image'] ); 88 | $output['repeat'] = apply_filters( 'of_background_repeat', $input['repeat'] ); 89 | $output['position'] = apply_filters( 'of_background_position', $input['position'] ); 90 | $output['attachment'] = apply_filters( 'of_background_attachment', $input['attachment'] ); 91 | 92 | return $output; 93 | } 94 | add_filter( 'of_sanitize_background', 'of_sanitize_background' ); 95 | function of_sanitize_background_repeat( $value ) { 96 | $recognized = of_recognized_background_repeat(); 97 | if ( array_key_exists( $value, $recognized ) ) { 98 | return $value; 99 | } 100 | return apply_filters( 'of_default_background_repeat', current( $recognized ) ); 101 | } 102 | add_filter( 'of_background_repeat', 'of_sanitize_background_repeat' ); 103 | 104 | function of_sanitize_background_position( $value ) { 105 | $recognized = of_recognized_background_position(); 106 | if ( array_key_exists( $value, $recognized ) ) { 107 | return $value; 108 | } 109 | return apply_filters( 'of_default_background_position', current( $recognized ) ); 110 | } 111 | add_filter( 'of_background_position', 'of_sanitize_background_position' ); 112 | 113 | function of_sanitize_background_attachment( $value ) { 114 | $recognized = of_recognized_background_attachment(); 115 | if ( array_key_exists( $value, $recognized ) ) { 116 | return $value; 117 | } 118 | return apply_filters( 'of_default_background_attachment', current( $recognized ) ); 119 | } 120 | add_filter( 'of_background_attachment', 'of_sanitize_background_attachment' ); 121 | function of_sanitize_typography( $input, $option ) { 122 | 123 | $output = wp_parse_args( $input, array( 124 | 'size' => '', 125 | 'face' => '', 126 | 'style' => '', 127 | 'color' => '' 128 | ) ); 129 | 130 | if ( isset( $option['options']['faces'] ) && isset( $input['face'] ) ) { 131 | if ( !( array_key_exists( $input['face'], $option['options']['faces'] ) ) ) { 132 | $output['face'] = ''; 133 | } 134 | } 135 | else { 136 | $output['face'] = apply_filters( 'of_font_face', $output['face'] ); 137 | } 138 | 139 | $output['size'] = apply_filters( 'of_font_size', $output['size'] ); 140 | $output['style'] = apply_filters( 'of_font_style', $output['style'] ); 141 | $output['color'] = apply_filters( 'of_sanitize_color', $output['color'] ); 142 | return $output; 143 | } 144 | add_filter( 'of_sanitize_typography', 'of_sanitize_typography', 10, 2 ); 145 | function of_sanitize_font_size( $value ) { 146 | $recognized = of_recognized_font_sizes(); 147 | $value_check = preg_replace('/px/','', $value); 148 | if ( in_array( (int) $value_check, $recognized ) ) { 149 | return $value; 150 | } 151 | return apply_filters( 'of_default_font_size', $recognized ); 152 | } 153 | add_filter( 'of_font_size', 'of_sanitize_font_size' ); 154 | function of_sanitize_font_style( $value ) { 155 | $recognized = of_recognized_font_styles(); 156 | if ( array_key_exists( $value, $recognized ) ) { 157 | return $value; 158 | } 159 | return apply_filters( 'of_default_font_style', current( $recognized ) ); 160 | } 161 | add_filter( 'of_font_style', 'of_sanitize_font_style' ); 162 | function of_sanitize_font_face( $value ) { 163 | $recognized = of_recognized_font_faces(); 164 | if ( array_key_exists( $value, $recognized ) ) { 165 | return $value; 166 | } 167 | return apply_filters( 'of_default_font_face', current( $recognized ) ); 168 | } 169 | add_filter( 'of_font_face', 'of_sanitize_font_face' ); 170 | function of_recognized_background_repeat() { 171 | $default = array( 172 | 'no-repeat' =>'不重复填充', 173 | 'repeat-x' =>'水平重复填充', 174 | 'repeat-y' =>'垂直重复填充', 175 | 'repeat' =>'重复填充' 176 | ); 177 | return apply_filters( 'of_recognized_background_repeat', $default ); 178 | } 179 | function of_recognized_background_position() { 180 | $default = array( 181 | 'top left' =>'上左对齐', 182 | 'top center' =>'上中对齐', 183 | 'top right' =>'上右对齐', 184 | 'center left' =>'中左对齐', 185 | 'center center' =>'中中对齐', 186 | 'center right' =>'中右对齐', 187 | 'bottom left' =>'下左对齐', 188 | 'bottom center' =>'下中对齐', 189 | 'bottom right' =>'下右对齐' 190 | ); 191 | return apply_filters( 'of_recognized_background_position', $default ); 192 | } 193 | function of_recognized_background_attachment() { 194 | $default = array( 195 | 'scroll' =>'固定', 196 | 'fixed' => '滚动' 197 | ); 198 | return apply_filters( 'of_recognized_background_attachment', $default ); 199 | } 200 | function of_sanitize_hex( $hex, $default = '' ) { 201 | if ( of_validate_hex( $hex ) ) { 202 | return $hex; 203 | } 204 | return $default; 205 | } 206 | function of_recognized_font_sizes() { 207 | $sizes = range( 12,24,2); 208 | $sizes = apply_filters( 'of_recognized_font_sizes', $sizes ); 209 | $sizes = array_map( 'absint', $sizes ); 210 | return $sizes; 211 | } 212 | function of_recognized_font_faces() { 213 | $default = array( 214 | 'arial' => 'Arial', 215 | 'verdana' => 'Verdana, Geneva', 216 | 'trebuchet' => 'Trebuchet', 217 | 'georgia' => 'Georgia', 218 | 'times' => 'Times New Roman', 219 | 'tahoma' => 'Tahoma, Geneva', 220 | 'palatino' => 'Palatino', 221 | 'helvetica' => 'Helvetica*' 222 | ); 223 | return apply_filters( 'of_recognized_font_faces', $default ); 224 | } 225 | function of_recognized_font_styles() { 226 | $default = array( 227 | 'normal' => '普通', 228 | 'italic' => '斜体', 229 | 'bold' => '粗体', 230 | 'bold italic' => '斜体+粗体' 231 | ); 232 | return apply_filters( 'of_recognized_font_styles', $default ); 233 | } 234 | function of_validate_hex( $hex ) { 235 | $hex = trim( $hex ); 236 | if ( 0 === strpos( $hex, '#' ) ) { 237 | $hex = substr( $hex, 1 ); 238 | } 239 | elseif ( 0 === strpos( $hex, '%23' ) ) { 240 | $hex = substr( $hex, 3 ); 241 | } 242 | if ( 0 === preg_match( '/^[0-9a-fA-F]{6}$/', $hex ) ) { 243 | return false; 244 | } 245 | else { 246 | return true; 247 | } 248 | } -------------------------------------------------------------------------------- /inc/smiley.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
-------------------------------------------------------------------------------- /inc/template-tags.php: -------------------------------------------------------------------------------- 1 | %2$s'; 16 | if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { 17 | $time_string = ''; 18 | } 19 | 20 | $time_string = sprintf( $time_string, 21 | esc_attr( get_the_date( 'c' ) ), 22 | esc_html( get_the_date() ), 23 | esc_attr( get_the_modified_date( 'c' ) ), 24 | esc_html( get_the_modified_date() ) 25 | ); 26 | 27 | $posted_on = sprintf( 28 | esc_html_x( 'Posted on %s', 'post date', 'akina' ), 29 | '' . $time_string . '' 30 | ); 31 | 32 | $byline = sprintf( 33 | esc_html_x( 'by %s', 'post author', 'akina' ), 34 | '' . esc_html( get_the_author() ) . '' 35 | ); 36 | 37 | echo '' . $posted_on . ''; // WPCS: XSS OK. 38 | 39 | } 40 | endif; 41 | 42 | if ( ! function_exists( 'akina_entry_footer' ) ) : 43 | /** 44 | * Prints HTML with meta information for the categories, tags and comments. 45 | */ 46 | function akina_entry_footer() { 47 | // Hide category and tag text for pages. 48 | if ( 'post' === get_post_type() ) { 49 | /* translators: used between list items, there is a space after the comma */ 50 | $categories_list = get_the_category_list( esc_html__( ', ', 'akina' ) ); 51 | if ( $categories_list && akina_categorized_blog() ) { 52 | printf( '' . esc_html__( 'Posted in %1$s', 'akina' ) . '', $categories_list ); // WPCS: XSS OK. 53 | } 54 | 55 | /* translators: used between list items, there is a space after the comma */ 56 | $tags_list = get_the_tag_list( '', esc_html__( ', ', 'akina' ) ); 57 | if ( $tags_list ) { 58 | printf( '' . esc_html__( 'Tagged %1$s', 'akina' ) . '', $tags_list ); // WPCS: XSS OK. 59 | } 60 | } 61 | 62 | if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { 63 | echo ''; 64 | /* translators: %s: post title */ 65 | comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment on %s', 'akina' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) ); 66 | echo ''; 67 | } 68 | 69 | edit_post_link( 70 | sprintf( 71 | /* translators: %s: Name of current post */ 72 | esc_html__( 'Edit %s', 'akina' ), 73 | the_title( '"', '"', false ) 74 | ), 75 | '', 76 | '' 77 | ); 78 | } 79 | endif; 80 | 81 | /** 82 | * Returns true if a blog has more than 1 category. 83 | * 84 | * @return bool 85 | */ 86 | function akina_categorized_blog() { 87 | if ( false === ( $all_the_cool_cats = get_transient( 'akina_categories' ) ) ) { 88 | // Create an array of all the categories that are attached to posts. 89 | $all_the_cool_cats = get_categories( array( 90 | 'fields' => 'ids', 91 | 'hide_empty' => 1, 92 | // We only need to know if there is more than one category. 93 | 'number' => 2, 94 | ) ); 95 | 96 | // Count the number of categories that are attached to the posts. 97 | $all_the_cool_cats = count( $all_the_cool_cats ); 98 | 99 | set_transient( 'akina_categories', $all_the_cool_cats ); 100 | } 101 | 102 | if ( $all_the_cool_cats > 1 ) { 103 | // This blog has more than 1 category so akina_categorized_blog should return true. 104 | return true; 105 | } else { 106 | // This blog has only 1 category so akina_categorized_blog should return false. 107 | return false; 108 | } 109 | } 110 | 111 | /** 112 | * Flush out the transients used in akina_categorized_blog. 113 | */ 114 | function akina_category_transient_flusher() { 115 | if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { 116 | return; 117 | } 118 | // Like, beat it. Dig? 119 | delete_transient( 'akina_categories' ); 120 | } 121 | add_action( 'edit_category', 'akina_category_transient_flusher' ); 122 | add_action( 'save_post', 'akina_category_transient_flusher' ); 123 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 21 |
22 | 23 | 142 && !wp_is_mobile()){ ?> 24 | 25 |
26 |
27 | 28 | 29 |
30 | 31 |
32 | 33 | 34 | 39 | 40 |
41 |
42 |

Posts

43 | 47 |
48 |

49 |
50 | 51 | 62 | 63 |
64 | 65 | 66 |
style="-webkit-transition:s;transition: s;" style="visibility: hidden;" title="" >
67 | 68 | 71 | 72 |
73 | r || i.x < 0 ? -1 : 1, 33 | i.ya *= i.y > n || i.y < 0 ? -1 : 1, 34 | e.fillRect(i.x - 0.5, i.y - 0.5, 1, 1); 35 | for (v = 0; v < w.length; v++) { 36 | x = w[v]; 37 | if (i !== x && null !== x.x && null !== x.y) { 38 | B = i.x - x.x, 39 | z = i.y - x.y, 40 | y = B * B + z * z; 41 | y < x.max && (x === f && y >= x.max / 2 && (i.x -= 0.03 * B, i.y -= 0.03 * z), A = (x.max - y) / x.max, e.beginPath(), e.lineWidth = A / 2, e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")", e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke()) 42 | } 43 | } 44 | w.splice(w.indexOf(i), 1) 45 | }), 46 | m(b) 47 | } 48 | var u = document.createElement("canvas"), 49 | s = l(), 50 | c = "c_n" + s.l, 51 | e = u.getContext("2d"), 52 | r, 53 | n, 54 | m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || 55 | function(i) { 56 | window.setTimeout(i, 1000 / 45) 57 | }, 58 | a = Math.random, 59 | f = { 60 | x: null, 61 | y: null, 62 | max: 10000 63 | }; 64 | u.id = c; 65 | u.style.cssText = "position:fixed;top:0;left:0;z-index:" + s.z + ";opacity:" + s.o; 66 | j("body")[0].appendChild(u); 67 | k(), 68 | window.onresize = k; 69 | window.onmousemove = function(i) { 70 | i = i || window.event, 71 | f.x = i.clientX, 72 | f.y = i.clientY 73 | }, 74 | window.onmouseout = function() { 75 | f.x = null, 76 | f.y = null 77 | }; 78 | for (var t = [], p = 0; s.n > p; p++) { 79 | var h = a() * r, 80 | g = a() * n, 81 | q = 2 * a() - 1, 82 | d = 2 * a() - 1; 83 | t.push({ 84 | x: h, 85 | y: g, 86 | xa: q, 87 | ya: d, 88 | max: 6000 89 | }) 90 | } 91 | setTimeout(function() { 92 | b() 93 | }, 94 | 100) 95 | } (); 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /js/customizer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File customizer.js. 3 | * 4 | * Theme Customizer enhancements for a better user experience. 5 | * 6 | * Contains handlers to make Theme Customizer preview reload changes asynchronously. 7 | */ 8 | 9 | ( function( $ ) { 10 | 11 | // Site title and description. 12 | wp.customize( 'blogname', function( value ) { 13 | value.bind( function( to ) { 14 | $( '.site-title a' ).text( to ); 15 | } ); 16 | } ); 17 | wp.customize( 'blogdescription', function( value ) { 18 | value.bind( function( to ) { 19 | $( '.site-description' ).text( to ); 20 | } ); 21 | } ); 22 | 23 | // Header text color. 24 | wp.customize( 'header_textcolor', function( value ) { 25 | value.bind( function( to ) { 26 | if ( 'blank' === to ) { 27 | $( '.site-title a, .site-description' ).css( { 28 | 'clip': 'rect(1px, 1px, 1px, 1px)', 29 | 'position': 'absolute' 30 | } ); 31 | } else { 32 | $( '.site-title a, .site-description' ).css( { 33 | 'clip': 'auto', 34 | 'position': 'relative' 35 | } ); 36 | $( '.site-title a, .site-description' ).css( { 37 | 'color': to 38 | } ); 39 | } 40 | } ); 41 | } ); 42 | 43 | } )( jQuery ); 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /js/fish.js: -------------------------------------------------------------------------------- 1 | var RENDERER= { 2 | POINT_INTERVAL:5,FISH_COUNT:3,MAX_INTERVAL_COUNT:50,INIT_HEIGHT_RATE:0.5,THRESHOLD:50,init:function() { 3 | this.setParameters(); 4 | this.reconstructMethods(); 5 | this.setup(); 6 | this.bindEvent(); 7 | this.render() 8 | } 9 | ,setParameters:function() { 10 | this.$window=jQuery(window); 11 | this.$container=jQuery("#jsi-flying-fish-container"); 12 | this.$canvas=jQuery(""); 13 | this.context=this.$canvas.appendTo(this.$container).get(0).getContext("2d"); 14 | this.points=[]; 15 | this.fishes=[]; 16 | this.watchIds=[] 17 | } 18 | ,createSurfacePoints:function() { 19 | var count=Math.round(this.width/this.POINT_INTERVAL); 20 | this.pointInterval=this.width/(count-1); 21 | this.points.push(new SURFACE_POINT(this,0)); 22 | for(var i=1; 23 | i0) { 60 | clearTimeout(this.watchIds.pop()) 61 | } 62 | },jdugeToStopResize:function() { 63 | var width=this.$window.width(),height=this.$window.height(),stopped=(width==this.tmpWidth&&height==this.tmpHeight); 64 | this.tmpWidth=width; 65 | this.tmpHeight=height; 66 | if(stopped) { 67 | this.setup() 68 | } 69 | },bindEvent:function() { 70 | this.$window.on("resize",this.watchWindowSize); 71 | this.$container.on("mouseenter",this.startEpicenter); 72 | this.$container.on("mousemove",this.moveEpicenter); 73 | this.$container.on("click",this.reverseVertical) 74 | } 75 | ,getAxis:function(event) { 76 | var offset=this.$container.offset(); 77 | return { 78 | x:event.clientX-offset.left+this.$window.scrollLeft(),y:event.clientY-offset.top+this.$window.scrollTop() 79 | } 80 | },startEpicenter:function(event) { 81 | this.axis=this.getAxis(event) 82 | } 83 | ,moveEpicenter:function(event) { 84 | var axis=this.getAxis(event); 85 | if(!this.axis) { 86 | this.axis=axis 87 | } 88 | this.generateEpicenter(axis.x,axis.y,axis.y-this.axis.y); 89 | this.axis=axis},generateEpicenter:function(x,y,velocity) { 90 | if(ythis.height/2+this.THRESHOLD) { 91 | return 92 | } 93 | var index=Math.round(x/this.pointInterval); 94 | if(index<0||index>=this.points.length) { 95 | return 96 | } 97 | this.points[index].interfere(y,velocity)},reverseVertical:function() { 98 | this.reverse=!this.reverse; 99 | for(var i=0,count=this.fishes.length; 100 | i=0?-1:1)*Math.abs(velocity) 164 | } 165 | ,updateSelf:function() { 166 | this.fy+=this.SPRING_CONSTANT*(this.initHeight-this.height); 167 | this.fy*=this.SPRING_FRICTION; 168 | this.height+=this.fy 169 | } 170 | ,updateNeighbors:function() { 171 | if(this.previous) { 172 | this.force.previous=this.WAVE_SPREAD*(this.height-this.previous.height) 173 | } 174 | if(this.next) { 175 | this.force.next=this.WAVE_SPREAD*(this.height-this.next.height) 176 | } 177 | },render:function(context) { 178 | if(this.previous) { 179 | this.previous.height+=this.force.previous; 180 | this.previous.fy+=this.force.previous 181 | } 182 | if(this.next) { 183 | this.next.height+=this.force.next; 184 | this.next.fy+=this.force.next 185 | } 186 | context.lineTo(this.x,this.renderer.height-this.height)}}; 187 | var FISH=function(renderer) { 188 | this.renderer=renderer; 189 | this.init() 190 | } 191 | ;FISH.prototype= { 192 | GRAVITY:0.4,init:function() { 193 | this.direction=Math.random()<0.5; 194 | this.x=this.direction?(this.renderer.width+this.renderer.THRESHOLD):-this.renderer.THRESHOLD; 195 | this.previousY=this.y; 196 | this.vx=this.getRandomValue(4,10)*(this.direction?-1:1); 197 | if(this.renderer.reverse) { 198 | this.y=this.getRandomValue(this.renderer.height*1/10,this.renderer.height*4/10); 199 | this.vy=this.getRandomValue(2,5); 200 | this.ay=this.getRandomValue(0.05,0.2) 201 | } 202 | else { 203 | this.y=this.getRandomValue(this.renderer.height*6/10,this.renderer.height*9/10); 204 | this.vy=this.getRandomValue(-5,-2); 205 | this.ay=this.getRandomValue(-0.2,-0.05) 206 | } 207 | this.isOut=false; 208 | this.theta=0; 209 | this.phi=0},getRandomValue:function(min,max) { 210 | return min+(max-min)*Math.random() 211 | } 212 | ,reverseVertical:function() { 213 | this.isOut=!this.isOut; 214 | this.ay*=-1 215 | } 216 | ,controlStatus:function(context) { 217 | this.previousY=this.y; 218 | this.x+=this.vx; 219 | this.y+=this.vy; 220 | this.vy+=this.ay; 221 | if(this.renderer.reverse) { 222 | if(this.y>this.renderer.height*this.renderer.INIT_HEIGHT_RATE) { 223 | this.vy-=this.GRAVITY; 224 | this.isOut=true 225 | } 226 | else { 227 | if(this.isOut) { 228 | this.ay=this.getRandomValue(0.05,0.2) 229 | } 230 | this.isOut=false}}else { 231 | if(this.y0&&this.x>this.renderer.width+this.renderer.THRESHOLD||this.vx<0&&this.x<-this.renderer.THRESHOLD) { 247 | this.init() 248 | } 249 | },render:function(context) { 250 | context.save(); 251 | context.translate(this.x,this.y); 252 | context.rotate(Math.PI+Math.atan2(this.vy,this.vx)); 253 | context.scale(1,this.direction?1:-1); 254 | context.beginPath(); 255 | context.moveTo(-30,0); 256 | context.bezierCurveTo(-20,15,15,10,40,0); 257 | context.bezierCurveTo(15,-10,-20,-15,-30,0); 258 | context.fill(); 259 | context.save(); 260 | context.translate(40,0); 261 | context.scale(0.9+0.2*Math.sin(this.theta),1); 262 | context.beginPath(); 263 | context.moveTo(0,0); 264 | context.quadraticCurveTo(5,10,20,8); 265 | context.quadraticCurveTo(12,5,10,0); 266 | context.quadraticCurveTo(12,-5,20,-8); 267 | context.quadraticCurveTo(5,-10,0,0); 268 | context.fill(); 269 | context.restore(); 270 | context.save(); 271 | context.translate(-3,0); 272 | context.rotate((Math.PI/3+Math.PI/10*Math.sin(this.phi))*(this.renderer.reverse?-1:1)); 273 | context.beginPath(); 274 | if(this.renderer.reverse) { 275 | context.moveTo(5,0); 276 | context.bezierCurveTo(10,10,10,30,0,40); 277 | context.bezierCurveTo(-12,25,-8,10,0,0) 278 | } 279 | else { 280 | context.moveTo(-5,0); 281 | context.bezierCurveTo(-10,-10,-10,-30,0,-40); 282 | context.bezierCurveTo(12,-25,8,-10,0,0) 283 | } 284 | context.closePath(); 285 | context.fill(); 286 | context.restore(); 287 | context.restore(); 288 | this.controlStatus(context)}}; 289 | 290 | jQuery(document).ready(function(){RENDERER.init()}) -------------------------------------------------------------------------------- /js/input.min.js: -------------------------------------------------------------------------------- 1 | // 输入框特效 2 | const getCaretCoordinates=(()=>{const properties=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];const isFirefox=window.mozInnerScreenX!=null;return function(element,position,options){const debug=options?.debug||false;if(debug){const mirrorDiv=document.querySelector("#input-textarea-caret-position-mirror-div");mirrorDiv?.parentNode?.removeChild(mirrorDiv)}const div=document.createElement("div");div.id="input-textarea-caret-position-mirror-div";document.body.appendChild(div);const style=div.style;const computed=getComputedStyle(element);style.whiteSpace="pre-wrap";if(element.nodeName!=="INPUT")style.wordWrap="break-word";style.position="absolute";if(!debug)style.visibility="hidden";properties.forEach(prop=>style[prop]=computed[prop]);if(isFirefox&&element.scrollHeight>parseInt(computed.height)){style.overflowY="scroll"}else{style.overflow="hidden"}div.textContent=element.value.substring(0,position);if(element.nodeName==="INPUT"){div.textContent=div.textContent.replace(/\s/g,"\u00a0")}const span=document.createElement("span");span.textContent=element.value.substring(position)||".";div.appendChild(span);const coordinates={top:span.offsetTop+parseInt(computed.borderTopWidth),left:span.offsetLeft+parseInt(computed.borderLeftWidth)};if(!debug)document.body.removeChild(div);return coordinates}})(); 3 | //粒子系统核心逻辑 4 | const POWERMODE=(()=>{const canvas=document.createElement("canvas");const context=canvas.getContext("2d");let particles=new Array(500);let pointer=0;canvas.width=window.innerWidth;canvas.height=window.innerHeight;canvas.style.cssText="position:fixed;top:0;left:0;pointer-events:none;z-index:999999;will-change:contents";document.body.appendChild(canvas);let resizeTimeout;window.addEventListener("resize",()=>{clearTimeout(resizeTimeout);resizeTimeout=setTimeout(()=>{canvas.width=window.innerWidth;canvas.height=window.innerHeight},200)});const randomBetween=(min,max)=>Math.random()*(max-min)+min;const colorCache=new WeakMap();const getColor=element=>{if(!POWERMODE.colorful){if(!colorCache.has(element)){colorCache.set(element,getComputedStyle(element).color)}return colorCache.get(element)}const hue=Math.random()*360;return`hsla(${hue},100%,65%,1)`};const getCaret=()=>{const active=document.activeElement;if(!active)return{x:0,y:0,color:"transparent"};if(active.tagName==="TEXTAREA"||active.tagName==="INPUT"){const rect=active.getBoundingClientRect();const coords=getCaretCoordinates(active,active.selectionStart);return{x:coords.left+rect.left,y:coords.top+rect.top,color:getColor(active)}}const selection=window.getSelection();if(selection.rangeCount){const range=selection.getRangeAt(0);const rect=range.getBoundingClientRect();return{x:rect.left,y:rect.top,color:getColor(range.startContainer.nodeType===3?range.startContainer.parentNode:range.startContainer)}}return{x:0,y:0,color:"transparent"}};const createParticle=(x,y,color)=>({x:x+(Math.random()-0.5)*10,y:y+(Math.random()-0.5)*5,alpha:1,color:color,velocity:{x:(Math.random()-0.5)*3,y:-3.5+Math.random()*2}});const render=()=>{requestAnimationFrame(render);context.clearRect(0,0,canvas.width,canvas.height);particles.forEach((particle,index)=>{if(!particle||particle.alpha<=0.1)return;particle.velocity.y+=0.1;particle.x+=particle.velocity.x;particle.y+=particle.velocity.y;particle.alpha*=0.96;context.globalAlpha=particle.alpha;context.fillStyle=particle.color;context.fillRect(Math.round(particle.x-1.5),Math.round(particle.y-1.5),3,3);if(particle.alpha<=0.1)particles[index]=null})};requestAnimationFrame(render);return Object.assign(()=>{const caret=getCaret();let numParticles=5+Math.round(randomBetween(0,10));while(numParticles--){particles[pointer]=createParticle(caret.x,caret.y,caret.color);pointer=(pointer+1)%500}},{colorful:true})})(); -------------------------------------------------------------------------------- /js/login.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Resize Image 3 | */ 4 | function resizeImage(id) { 5 | jQuery('#' + id).css({ 6 | 'position': 'absolute', 7 | 'top': '0px', 8 | 'left': '0px', 9 | 'width': '100%', 10 | 'height': '100%', 11 | 'z-index': -1, 12 | 'overflow': 'hidden' 13 | }); 14 | var w = jQuery(window).width(), 15 | h = jQuery(window).height(), 16 | o = jQuery('#' + id).children('img'), 17 | iW = o.width(), 18 | iH = o.height(); 19 | o.css({ 20 | 'display': 'block', 21 | 'opacity': 0 22 | }); 23 | if (w > h) { 24 | if (iW > iH) { 25 | o.css({ 26 | 'width': w 27 | }); 28 | o.css({ 29 | 'height': Math.round((iH / iW) * w) 30 | }); 31 | var newIh = Math.round((iH / iW) * w); 32 | if (newIh < h) { 33 | o.css({ 34 | 'height': h 35 | }); 36 | o.css({ 37 | 'width': Math.round((iW / iH) * h) 38 | }) 39 | } 40 | } else { 41 | o.css({ 42 | 'height': h 43 | }); 44 | o.css({ 45 | 'width': Math.round((iW / iH) * h) 46 | }) 47 | } 48 | } else { 49 | o.css({ 50 | 'height': h 51 | }); 52 | o.css({ 53 | 'width': Math.round((iW / iH) * h) 54 | }) 55 | } 56 | var newIW = o.width(), 57 | newIH = o.height(); 58 | if (newIW > w) { 59 | var l = (newIW - w) / 2; 60 | o.css('margin-left', -l) 61 | } else { 62 | o.css('margin-left', 0) 63 | } 64 | if (newIH > h) { 65 | var t = (newIH - h) / 2; 66 | o.css('margin-top', -t) 67 | } else { 68 | o.css('margin-top', 0) 69 | } 70 | o.css({ 71 | 'opacity': '1' 72 | }) 73 | } -------------------------------------------------------------------------------- /js/nprogress.js: -------------------------------------------------------------------------------- 1 | /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress 2 | * @license MIT */ 3 | 4 | ;(function(root, factory) { 5 | 6 | if (typeof define === 'function' && define.amd) { 7 | define(factory); 8 | } else if (typeof exports === 'object') { 9 | module.exports = factory(); 10 | } else { 11 | root.NProgress = factory(); 12 | } 13 | 14 | })(this, function() { 15 | var NProgress = {}; 16 | 17 | NProgress.version = '0.2.0'; 18 | 19 | var Settings = NProgress.settings = { 20 | minimum: 0.08, 21 | easing: 'linear', 22 | positionUsing: '', 23 | speed: 200, 24 | trickle: true, 25 | trickleSpeed: 200, 26 | showSpinner: true, 27 | barSelector: '[role="bar"]', 28 | spinnerSelector: '[role="spinner"]', 29 | parent: 'body', 30 | template: '
' 31 | }; 32 | 33 | /** 34 | * Updates configuration. 35 | * 36 | * NProgress.configure({ 37 | * minimum: 0.1 38 | * }); 39 | */ 40 | NProgress.configure = function(options) { 41 | var key, value; 42 | for (key in options) { 43 | value = options[key]; 44 | if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value; 45 | } 46 | 47 | return this; 48 | }; 49 | 50 | /** 51 | * Last number. 52 | */ 53 | 54 | NProgress.status = null; 55 | 56 | /** 57 | * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`. 58 | * 59 | * NProgress.set(0.4); 60 | * NProgress.set(1.0); 61 | */ 62 | 63 | NProgress.set = function(n) { 64 | var started = NProgress.isStarted(); 65 | 66 | n = clamp(n, Settings.minimum, 1); 67 | NProgress.status = (n === 1 ? null : n); 68 | 69 | var progress = NProgress.render(!started), 70 | bar = progress.querySelector(Settings.barSelector), 71 | speed = Settings.speed, 72 | ease = Settings.easing; 73 | 74 | progress.offsetWidth; /* Repaint */ 75 | 76 | queue(function(next) { 77 | // Set positionUsing if it hasn't already been set 78 | if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS(); 79 | 80 | // Add transition 81 | css(bar, barPositionCSS(n, speed, ease)); 82 | 83 | if (n === 1) { 84 | // Fade out 85 | css(progress, { 86 | transition: 'none', 87 | opacity: 1 88 | }); 89 | progress.offsetWidth; /* Repaint */ 90 | 91 | setTimeout(function() { 92 | css(progress, { 93 | transition: 'all ' + speed + 'ms linear', 94 | opacity: 0 95 | }); 96 | setTimeout(function() { 97 | NProgress.remove(); 98 | next(); 99 | }, speed); 100 | }, speed); 101 | } else { 102 | setTimeout(next, speed); 103 | } 104 | }); 105 | 106 | return this; 107 | }; 108 | 109 | NProgress.isStarted = function() { 110 | return typeof NProgress.status === 'number'; 111 | }; 112 | 113 | /** 114 | * Shows the progress bar. 115 | * This is the same as setting the status to 0%, except that it doesn't go backwards. 116 | * 117 | * NProgress.start(); 118 | * 119 | */ 120 | NProgress.start = function() { 121 | if (!NProgress.status) NProgress.set(0); 122 | 123 | var work = function() { 124 | setTimeout(function() { 125 | if (!NProgress.status) return; 126 | NProgress.trickle(); 127 | work(); 128 | }, Settings.trickleSpeed); 129 | }; 130 | 131 | if (Settings.trickle) work(); 132 | 133 | return this; 134 | }; 135 | 136 | /** 137 | * Hides the progress bar. 138 | * This is the *sort of* the same as setting the status to 100%, with the 139 | * difference being `done()` makes some placebo effect of some realistic motion. 140 | * 141 | * NProgress.done(); 142 | * 143 | * If `true` is passed, it will show the progress bar even if its hidden. 144 | * 145 | * NProgress.done(true); 146 | */ 147 | 148 | NProgress.done = function(force) { 149 | if (!force && !NProgress.status) return this; 150 | 151 | return NProgress.inc(0.3 + 0.5 * Math.random()).set(1); 152 | }; 153 | 154 | /** 155 | * Increments by a random amount. 156 | */ 157 | 158 | NProgress.inc = function(amount) { 159 | var n = NProgress.status; 160 | 161 | if (!n) { 162 | return NProgress.start(); 163 | } else if(n > 1) { 164 | return; 165 | } else { 166 | if (typeof amount !== 'number') { 167 | if (n >= 0 && n < 0.2) { amount = 0.1; } 168 | else if (n >= 0.2 && n < 0.5) { amount = 0.04; } 169 | else if (n >= 0.5 && n < 0.8) { amount = 0.02; } 170 | else if (n >= 0.8 && n < 0.99) { amount = 0.005; } 171 | else { amount = 0; } 172 | } 173 | 174 | n = clamp(n + amount, 0, 0.994); 175 | return NProgress.set(n); 176 | } 177 | }; 178 | 179 | NProgress.trickle = function() { 180 | return NProgress.inc(); 181 | }; 182 | 183 | /** 184 | * Waits for all supplied jQuery promises and 185 | * increases the progress as the promises resolve. 186 | * 187 | * @param $promise jQUery Promise 188 | */ 189 | (function() { 190 | var initial = 0, current = 0; 191 | 192 | NProgress.promise = function($promise) { 193 | if (!$promise || $promise.state() === "resolved") { 194 | return this; 195 | } 196 | 197 | if (current === 0) { 198 | NProgress.start(); 199 | } 200 | 201 | initial++; 202 | current++; 203 | 204 | $promise.always(function() { 205 | current--; 206 | if (current === 0) { 207 | initial = 0; 208 | NProgress.done(); 209 | } else { 210 | NProgress.set((initial - current) / initial); 211 | } 212 | }); 213 | 214 | return this; 215 | }; 216 | 217 | })(); 218 | 219 | /** 220 | * (Internal) renders the progress bar markup based on the `template` 221 | * setting. 222 | */ 223 | 224 | NProgress.render = function(fromStart) { 225 | if (NProgress.isRendered()) return document.getElementById('nprogress'); 226 | 227 | addClass(document.documentElement, 'nprogress-busy'); 228 | 229 | var progress = document.createElement('div'); 230 | progress.id = 'nprogress'; 231 | progress.innerHTML = Settings.template; 232 | 233 | var bar = progress.querySelector(Settings.barSelector), 234 | perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0), 235 | parent = document.querySelector(Settings.parent), 236 | spinner; 237 | 238 | css(bar, { 239 | transition: 'all 0 linear', 240 | transform: 'translate3d(' + perc + '%,0,0)' 241 | }); 242 | 243 | if (!Settings.showSpinner) { 244 | spinner = progress.querySelector(Settings.spinnerSelector); 245 | spinner && removeElement(spinner); 246 | } 247 | 248 | if (parent != document.body) { 249 | addClass(parent, 'nprogress-custom-parent'); 250 | } 251 | 252 | parent.appendChild(progress); 253 | return progress; 254 | }; 255 | 256 | /** 257 | * Removes the element. Opposite of render(). 258 | */ 259 | 260 | NProgress.remove = function() { 261 | removeClass(document.documentElement, 'nprogress-busy'); 262 | removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent'); 263 | var progress = document.getElementById('nprogress'); 264 | progress && removeElement(progress); 265 | }; 266 | 267 | /** 268 | * Checks if the progress bar is rendered. 269 | */ 270 | 271 | NProgress.isRendered = function() { 272 | return !!document.getElementById('nprogress'); 273 | }; 274 | 275 | /** 276 | * Determine which positioning CSS rule to use. 277 | */ 278 | 279 | NProgress.getPositioningCSS = function() { 280 | // Sniff on document.body.style 281 | var bodyStyle = document.body.style; 282 | 283 | // Sniff prefixes 284 | var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' : 285 | ('MozTransform' in bodyStyle) ? 'Moz' : 286 | ('msTransform' in bodyStyle) ? 'ms' : 287 | ('OTransform' in bodyStyle) ? 'O' : ''; 288 | 289 | if (vendorPrefix + 'Perspective' in bodyStyle) { 290 | // Modern browsers with 3D support, e.g. Webkit, IE10 291 | return 'translate3d'; 292 | } else if (vendorPrefix + 'Transform' in bodyStyle) { 293 | // Browsers without 3D support, e.g. IE9 294 | return 'translate'; 295 | } else { 296 | // Browsers without translate() support, e.g. IE7-8 297 | return 'margin'; 298 | } 299 | }; 300 | 301 | /** 302 | * Helpers 303 | */ 304 | 305 | function clamp(n, min, max) { 306 | if (n < min) return min; 307 | if (n > max) return max; 308 | return n; 309 | } 310 | 311 | /** 312 | * (Internal) converts a percentage (`0..1`) to a bar translateX 313 | * percentage (`-100%..0%`). 314 | */ 315 | 316 | function toBarPerc(n) { 317 | return (-1 + n) * 100; 318 | } 319 | 320 | 321 | /** 322 | * (Internal) returns the correct CSS for changing the bar's 323 | * position given an n percentage, and speed and ease from Settings 324 | */ 325 | 326 | function barPositionCSS(n, speed, ease) { 327 | var barCSS; 328 | 329 | if (Settings.positionUsing === 'translate3d') { 330 | barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' }; 331 | } else if (Settings.positionUsing === 'translate') { 332 | barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' }; 333 | } else { 334 | barCSS = { 'margin-left': toBarPerc(n)+'%' }; 335 | } 336 | 337 | barCSS.transition = 'all '+speed+'ms '+ease; 338 | 339 | return barCSS; 340 | } 341 | 342 | /** 343 | * (Internal) Queues a function to be executed. 344 | */ 345 | 346 | var queue = (function() { 347 | var pending = []; 348 | 349 | function next() { 350 | var fn = pending.shift(); 351 | if (fn) { 352 | fn(next); 353 | } 354 | } 355 | 356 | return function(fn) { 357 | pending.push(fn); 358 | if (pending.length == 1) next(); 359 | }; 360 | })(); 361 | 362 | /** 363 | * (Internal) Applies css properties to an element, similar to the jQuery 364 | * css method. 365 | * 366 | * While this helper does assist with vendor prefixed property names, it 367 | * does not perform any manipulation of values prior to setting styles. 368 | */ 369 | 370 | var css = (function() { 371 | var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ], 372 | cssProps = {}; 373 | 374 | function camelCase(string) { 375 | return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) { 376 | return letter.toUpperCase(); 377 | }); 378 | } 379 | 380 | function getVendorProp(name) { 381 | var style = document.body.style; 382 | if (name in style) return name; 383 | 384 | var i = cssPrefixes.length, 385 | capName = name.charAt(0).toUpperCase() + name.slice(1), 386 | vendorName; 387 | while (i--) { 388 | vendorName = cssPrefixes[i] + capName; 389 | if (vendorName in style) return vendorName; 390 | } 391 | 392 | return name; 393 | } 394 | 395 | function getStyleProp(name) { 396 | name = camelCase(name); 397 | return cssProps[name] || (cssProps[name] = getVendorProp(name)); 398 | } 399 | 400 | function applyCss(element, prop, value) { 401 | prop = getStyleProp(prop); 402 | element.style[prop] = value; 403 | } 404 | 405 | return function(element, properties) { 406 | var args = arguments, 407 | prop, 408 | value; 409 | 410 | if (args.length == 2) { 411 | for (prop in properties) { 412 | value = properties[prop]; 413 | if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value); 414 | } 415 | } else { 416 | applyCss(element, args[1], args[2]); 417 | } 418 | } 419 | })(); 420 | 421 | /** 422 | * (Internal) Determines if an element or space separated list of class names contains a class name. 423 | */ 424 | 425 | function hasClass(element, name) { 426 | var list = typeof element == 'string' ? element : classList(element); 427 | return list.indexOf(' ' + name + ' ') >= 0; 428 | } 429 | 430 | /** 431 | * (Internal) Adds a class to an element. 432 | */ 433 | 434 | function addClass(element, name) { 435 | var oldList = classList(element), 436 | newList = oldList + name; 437 | 438 | if (hasClass(oldList, name)) return; 439 | 440 | // Trim the opening space. 441 | element.className = newList.substring(1); 442 | } 443 | 444 | /** 445 | * (Internal) Removes a class from an element. 446 | */ 447 | 448 | function removeClass(element, name) { 449 | var oldList = classList(element), 450 | newList; 451 | 452 | if (!hasClass(element, name)) return; 453 | 454 | // Replace the class name. 455 | newList = oldList.replace(' ' + name + ' ', ' '); 456 | 457 | // Trim the opening and closing spaces. 458 | element.className = newList.substring(1, newList.length - 1); 459 | } 460 | 461 | /** 462 | * (Internal) Gets a space separated list of the class names on the element. 463 | * The list is wrapped with a single space on each end to facilitate finding 464 | * matches within the list. 465 | */ 466 | 467 | function classList(element) { 468 | return (' ' + (element && element.className || '') + ' ').replace(/\s+/gi, ' '); 469 | } 470 | 471 | /** 472 | * (Internal) Removes an element from the DOM. 473 | */ 474 | 475 | function removeElement(element) { 476 | element && element.parentNode && element.parentNode.removeChild(element); 477 | } 478 | 479 | return NProgress; 480 | }); 481 | -------------------------------------------------------------------------------- /layouts/authorprofile.php: -------------------------------------------------------------------------------- 1 | 8 |
9 | 20 |
21 |

22 |
23 | 24 | -------------------------------------------------------------------------------- /layouts/feature.php: -------------------------------------------------------------------------------- 1 | 8 |
9 | 10 |

11 |
12 |
  • 13 |
    14 |
  • 15 |
  • 16 |
    17 |
  • 18 |
  • 19 |
    20 |
  • 21 |
    22 |
    -------------------------------------------------------------------------------- /layouts/imgbox.php: -------------------------------------------------------------------------------- 1 | 7 |
    8 | 9 |
    10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
    22 | 23 | 24 |
    25 | 26 |
    <?php bloginfo('name');?>
    27 | 28 |
    29 | 30 |

    31 |
    32 | 33 |
  • 34 |
    35 | 微信公众号 36 |
    37 |
  • 38 | 39 | 40 |
  • 41 | 42 | 43 |
  • 44 | 45 | 46 |
  • 47 | 48 | 49 |
  • 50 | 51 | 52 |
  • 53 | 54 | 55 |
  • 56 | 57 | 58 |
  • 59 | 60 | 61 |
  • 62 | 63 | 64 |
  • 65 | 66 | 67 |
  • 68 | 69 | 70 |
  • 71 | 72 | 73 |
    74 |
    75 | 76 | 右键下载背景图 77 |
    78 | 79 | 80 | 9 |
    10 | 上一篇文章

    %title


    ') ?> 12 |
    13 | 下一篇文章

    %title


    ') ?> 15 |
    16 |
    17 | -------------------------------------------------------------------------------- /layouts/sharelike.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 |
    12 | 13 | 14 | 19 | 20 |
    21 | 22 | 23 |
    24 | 37 | 38 |
    39 |
    40 |
    41 | 扫描二唯码在微信中打开 42 |
    43 |
    44 |
    45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /page-archive.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 |
    > 14 | 15 |
    16 | 17 |

    18 | 19 |
    20 | have_posts() ) : $the_query->the_post(); 26 | $year_tmp = get_the_time('Y'); 27 | $mon_tmp = get_the_time('n'); 28 | $y=$year; $m=$mon; 29 | if ($mon != $mon_tmp && $mon > 0) $output .= '
    '; 30 | if ($year != $year_tmp) { // 输出年份 31 | $year = $year_tmp; 32 | $all[$year] = array(); 33 | } 34 | if ($mon != $mon_tmp) { // 输出月份 35 | $mon = $mon_tmp; 36 | array_push($all[$year], $mon); 37 | $output .= "

    $year-$mon

    "; 38 | } 39 | $output .= '
    '; 40 | endwhile; 41 | wp_reset_postdata(); 42 | $output .= '
    '; 43 | echo $output; 44 | ?> 45 |
    46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /page-links.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 |
    > 16 | 17 | 20 |
    21 | 22 | 23 | 24 | 25 | 26 | 27 | 16 | 17 |
    18 |
    19 | 20 | 28 | 29 | 30 | 31 |
    32 |
    33 | 34 | 11 | 12 |
    13 |
    14 | 15 | 17 | 18 | 21 | 22 | 38 | 46 | 50 | 51 |
    52 |
    53 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 11 |
    12 |
    13 | 20 |
    21 |
    22 | 25 | -------------------------------------------------------------------------------- /tpl/content-category.php: -------------------------------------------------------------------------------- 1 | ID), 'large'); 12 | $post_img = $large_image_url[0]; 13 | } 14 | 15 | ?> 16 |
    17 |
    18 |
    19 |
    20 | 21 | 22 | 23 | 24 | 25 |
    26 | 27 |
    28 |

    29 |

    post_content))), 0, 80,"...");?>

    30 |
    31 |
    32 | 33 |
    34 |
    35 | 36 |
    37 |
    38 | 39 |
    40 |
    41 |
    42 | 43 |
    44 |
    45 | 46 |
    47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /tpl/content-image.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 |
    14 |
    15 | 16 |
    17 | 18 |
    19 | 20 |
    21 |

    22 |
    23 | 24 | 25 | 26 | post_date_gmt));//the_time('Y-m-d');?> 27 |
    28 |

    post_content))), 0, 150,"...");?>

    29 |
    30 |
    31 | 32 |
    33 |
    34 |
    35 | 36 |
    37 |
    38 | 热度 39 |
    40 |
    41 |
    42 |
    43 |
    44 |
    45 | 46 | -------------------------------------------------------------------------------- /tpl/content-none.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 | 16 | 17 |
    18 | 20 | 21 |

    点击这里开始.', 'akina' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?>

    22 | 23 | 24 |
    25 |

    26 |
    27 |
      28 | get_results("SELECT ID,post_title FROM $wpdb->posts where post_status='publish' and post_type='post' ORDER BY ID DESC LIMIT 0 , 20"); 30 | foreach ($result as $post) { 31 | setup_postdata($post); 32 | $postid = $post->ID; 33 | $title = $post->post_title; 34 | ?> 35 |
    • 36 | 37 |
    38 |
    39 |
    40 | 41 | 42 | 43 |

    44 | 47 |
    48 |
    49 | -------------------------------------------------------------------------------- /tpl/content-page.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    > 13 | 14 |
    15 | ', '' ); ?> 16 | 17 |
    18 | 19 |
    20 | '', 26 | ) ); 27 | ?> 28 |
    29 | 30 |
    31 | "', '"', false ) 37 | ), 38 | '', 39 | '' 40 | ); 41 | ?> 42 |
    43 |
    44 | -------------------------------------------------------------------------------- /tpl/content-search.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    > 13 |
    14 | ', esc_url( get_permalink() ) ), '' ); ?> 15 | 16 | 17 | 20 | 21 |
    22 | 23 |
    24 | 25 |
    26 | 27 |
    28 | 29 |
    30 |
    31 | -------------------------------------------------------------------------------- /tpl/content-single.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    > 13 | 14 |
    15 |

    16 |

    post_date_gmt)); ?>   次阅读

    17 |
    18 |
    19 | 20 |
    21 | 22 | '', 26 | ) ); 27 | ?> 28 |
    29 | 30 | 31 | 38 |
    39 | -------------------------------------------------------------------------------- /tpl/content-status.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 |
    14 |
    15 | 16 | 17 | 18 |
    19 |
    20 |

    post_content))), 0, 1000 ,"...");?>

    21 |
    22 | 23 | 24 | 25 | post_date_gmt));//the_time('Y-m-d');?> 26 |
    27 |
    28 |
    29 |
    30 |
    31 | 32 |
    33 |
    34 | 热度 35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 | 42 | -------------------------------------------------------------------------------- /tpl/content-thumb.php: -------------------------------------------------------------------------------- 1 | ID), 'large'); 14 | $post_img = $large_image_url[0]; 15 | }else{ 16 | if ( !empty( get_post_thumb( ) ) ) { 17 | $post_img = get_post_thumb( 'false' ); 18 | } else { 19 | $post_img = 'https://cbu01.alicdn.com/img/ibank/2017/918/632/7933236819_1641696839.jpg'; 20 | } 21 | } 22 | $the_cat = get_the_category(); 23 | ?> 24 |
    25 |
    26 | 27 | 28 | 29 | 30 | 31 |

    32 | 33 |

    34 | 36 |
    37 |
    38 |

    39 | 40 |
    41 | <?php the_title();?> 42 |
    43 | 44 |
    45 |
    46 |
    47 |

    post_content))), 0, 280," ...");?>

    48 |
    49 | 66 |
    67 |
    68 |
    69 | 11 |
    12 |
    13 |
    14 | 15 |
    16 | 17 | 18 |
    19 |
    20 |
    21 | 22 |
    23 |

    24 |
    25 | 26 | 27 | 28 | post_date_gmt)); ?> 29 |
    30 |

    post_content))), 0, 150,"...");?>

    31 |
    32 |
    33 | 34 |
    35 |
    36 |
    37 | 38 |
    39 |
    40 | 热度 41 |
    42 |
    43 |
    44 |
    45 |
    46 |
    -------------------------------------------------------------------------------- /tpl/single-image.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    > 13 | 14 |
    15 | 16 |
    17 |

    18 | 19 |

    post_date_gmt)); ?>   次阅读

    20 |
    21 |
    22 |
    23 | 24 | 25 |
    26 | 27 | '', 31 | ) ); 32 | ?> 33 |
    34 | 35 |
    36 | 39 | 40 |
    41 |
    42 | -------------------------------------------------------------------------------- /user/page-login.php: -------------------------------------------------------------------------------- 1 | 8 |
    9 |
    10 | 11 | 23 | 24 |
    25 |
    26 | 28 | -------------------------------------------------------------------------------- /user/page-register.php: -------------------------------------------------------------------------------- 1 | 错误:请输入用户名。
    '; 15 | } elseif ( ! validate_username( $sanitized_user_login ) ) { 16 | $error .= '错误:此用户名包含无效字符,请输入有效的用户名。
    '; 17 | $sanitized_user_login = ''; 18 | } elseif ( username_exists( $sanitized_user_login ) ) { 19 | $error .= '错误:该用户名已被注册。
    '; 20 | } 21 | 22 | // Check the e-mail address 23 | if ( $user_email == '' ) { 24 | $error .= '错误:请填写电子邮件地址。
    '; 25 | } elseif ( ! is_email( $user_email ) ) { 26 | $error .= '错误:电子邮件地址不正确。
    '; 27 | $user_email = ''; 28 | } elseif ( email_exists( $user_email ) ) { 29 | $error .= '错误:该电子邮件地址已经被注册。
    '; 30 | } 31 | 32 | // Check the password 33 | if(strlen($_POST['user_pass']) < 6){ 34 | $error .= '错误:密码长度至少6位。
    '; 35 | }elseif($_POST['user_pass'] != $_POST['user_pass2']){ 36 | $error .= '错误:两次输入的密码不一致。
    '; 37 | } 38 | 39 | // verification 40 | if(strlen($_POST['verification']) > 0 ){ 41 | $error .= '错误:请拖动滑块验证身份
    '; 42 | } 43 | 44 | if($error == '') { 45 | $user_id = wp_create_user( $sanitized_user_login, $_POST['user_pass'], $user_email ); 46 | if ( !$user_id ) { 47 | $error .= sprintf( '错误:无法完成注册请求... 请联系管理员
    ', get_option( 'admin_email' ) ); 48 | }else if (!is_user_logged_in()) { 49 | $user = get_userdatabylogin($sanitized_user_login); 50 | $user_id = $user->ID; 51 | // 自动登录 52 | wp_set_current_user($user_id, $user_login); 53 | wp_set_auth_cookie($user_id); 54 | do_action('wp_login', $user_login); 55 | } 56 | } 57 | } 58 | ?> 59 |
    60 |
    61 | 62 | 63 |
    64 |
    65 |

    New Account

    66 |
    67 |
    " method="post"> 68 |

    69 |

    70 |

    71 |

    72 |
    73 |
    74 |
    75 | »拖动滑块验证 76 |
    77 | 78 |
    79 | 80 | '.$error.'

    '; } ?> 81 | 82 |
    83 |
    84 | 87 | 88 | 89 | 90 |

    暂未开放注册。

    91 | 92 |
    93 |
    94 | 156 | 157 | 160 | 196 | -------------------------------------------------------------------------------- /user/statics.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    > 15 | 16 |
    17 |
    18 |
    19 | 20 | 21 |
    22 | 23 |
    24 |
    25 | 26 |
    27 | 28 | 29 | 30 | 31 |
    32 | 33 | 34 | -------------------------------------------------------------------------------- /user/verification.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jquery plugin -- jquery.slideunlock.js 3 | * www.sucaijiayuan.com 4 | * created: March 27, 2016 5 | */ 6 | 7 | ;(function ($,window,document,undefined) { 8 | function SliderUnlock(elm, options, success){ 9 | var me = this; 10 | var $elm = me.checkElm(elm) ? $(elm) : $; 11 | success = me.checkFn(success) ? success : function(){}; 12 | 13 | var opts = { 14 | successLabelTip: "Successfully Verified", 15 | duration: 200, 16 | swipestart: false, 17 | min: 0, 18 | max: $elm.width(), 19 | index: 0, 20 | IsOk: false, 21 | lableIndex: 0 22 | }; 23 | 24 | opts = $.extend(opts, options||{}); 25 | 26 | //$elm 27 | me.elm = $elm; 28 | //opts 29 | me.opts = opts; 30 | //是否开始滑动 31 | me.swipestart = opts.swipestart; 32 | //最小值 33 | me.min = opts.min; 34 | //最大值 35 | me.max = opts.max; 36 | //当前滑动条所处的位置 37 | me.index = opts.index; 38 | //是否滑动成功 39 | me.isOk = opts.isOk; 40 | //滑块宽度 41 | me.labelWidth = me.elm.find('#label').width(); 42 | //滑块背景 43 | me.sliderBg = me.elm.find('#slider_bg'); 44 | //鼠标在滑动按钮的位置 45 | me.lableIndex = opts.lableIndex; 46 | //success 47 | me.success = success; 48 | } 49 | 50 | SliderUnlock.prototype.init = function () { 51 | var me = this; 52 | 53 | me.updateView(); 54 | me.elm.find("#label").on("mousedown", function (event) { 55 | var e = event || window.event; 56 | me.lableIndex = e.clientX - this.offsetLeft; 57 | me.handerIn(); 58 | }).on("mousemove", function (event) { 59 | me.handerMove(event); 60 | }).on("mouseup", function (event) { 61 | me.handerOut(); 62 | }).on("mouseout", function (event) { 63 | me.handerOut(); 64 | }).on("touchstart", function (event) { 65 | var e = event || window.event; 66 | me.lableIndex = e.originalEvent.touches[0].pageX - this.offsetLeft; 67 | me.handerIn(); 68 | }).on("touchmove", function (event) { 69 | me.handerMove(event, "mobile"); 70 | }).on("touchend", function (event) { 71 | me.handerOut(); 72 | }); 73 | }; 74 | 75 | /** 76 | * 鼠标/手指接触滑动按钮 77 | */ 78 | SliderUnlock.prototype.handerIn = function () { 79 | var me = this; 80 | me.swipestart = true; 81 | 82 | var myDate = new Date(); 83 | var H = myDate.getHours();//获取小时 84 | var M = myDate.getMinutes(); //获取分钟 85 | var S = myDate.getSeconds();//获取秒 86 | var MS = myDate.getMilliseconds();//获取毫秒 87 | var milliSeconds = H * 3600 * 1000 + M * 60 * 1000 + S * 1000 + MS; 88 | 89 | startTime = milliSeconds; 90 | 91 | 92 | me.min = 0; 93 | me.max = me.elm.width(); 94 | }; 95 | 96 | /** 97 | * 鼠标/手指移出 98 | */ 99 | SliderUnlock.prototype.handerOut = function () { 100 | var me = this; 101 | //停止 102 | me.swipestart = false; 103 | 104 | weizhi = me.labelWidth; 105 | 106 | //me.move(); 107 | if (me.index < me.max) { 108 | me.reset(); 109 | } 110 | }; 111 | 112 | /** 113 | * 鼠标/手指移动 114 | * @param event 115 | * @param type 116 | */ 117 | SliderUnlock.prototype.handerMove = function (event, type) { 118 | var me = this; 119 | if (me.swipestart) { 120 | event.preventDefault(); 121 | event = event || window.event; 122 | if (type == "mobile") { 123 | me.index = event.originalEvent.touches[0].pageX - me.lableIndex; 124 | } else { 125 | me.index = event.clientX - me.lableIndex; 126 | } 127 | me.move(); 128 | } 129 | }; 130 | 131 | /** 132 | * 鼠标/手指移动过程 133 | */ 134 | SliderUnlock.prototype.move = function () { 135 | var me = this; 136 | if ((me.index + me.labelWidth) >= me.max) { 137 | me.index = me.max - me.labelWidth -2; 138 | //停止 139 | me.swipestart = false; 140 | //解锁 141 | me.isOk = true; 142 | } 143 | if (me.index < 0) { 144 | me.index = me.min; 145 | //未解锁 146 | me.isOk = false; 147 | } 148 | if (me.index+me.labelWidth+2 == me.max && me.max > 0 && me.isOk) { 149 | //解锁默认操作 150 | $('#label').unbind().next('#labelTip'). 151 | text(me.opts.successLabelTip).css({'color': '#fff'}); 152 | 153 | me.success(); 154 | } 155 | me.updateView(); 156 | }; 157 | 158 | 159 | /** 160 | * 更新视图 161 | */ 162 | SliderUnlock.prototype.updateView = function () { 163 | var me = this; 164 | 165 | me.sliderBg.css('width', me.index); 166 | me.elm.find("#label").css("left", me.index + "px") 167 | }; 168 | 169 | /** 170 | * 重置slide的起点 171 | */ 172 | SliderUnlock.prototype.reset = function () { 173 | var me = this; 174 | 175 | startTime = 0; 176 | 177 | me.index = 0; 178 | me.sliderBg .animate({'width':0},me.opts.duration); 179 | me.elm.find("#label").animate({left: me.index}, me.opts.duration) 180 | .next("#lableTip").animate({opacity: 1}, me.opts.duration); 181 | me.updateView(); 182 | }; 183 | 184 | /** 185 | * 检测元素是否存在 186 | * @param elm 187 | * @returns {boolean} 188 | */ 189 | SliderUnlock.prototype.checkElm = function (elm) { 190 | if($(elm).length > 0){ 191 | return true; 192 | }else{ 193 | throw "this element does not exist."; 194 | } 195 | }; 196 | 197 | /** 198 | * 检测传入参数是否是function 199 | * @param fn 200 | * @returns {boolean} 201 | */ 202 | SliderUnlock.prototype.checkFn = function (fn) { 203 | if(typeof fn === "function"){ 204 | return true; 205 | }else{ 206 | throw "the param is not a function."; 207 | } 208 | }; 209 | 210 | 211 | window['SliderUnlock'] = SliderUnlock; 212 | })(jQuery, window, document); --------------------------------------------------------------------------------