├── img ├── dpic.jpg ├── admin.jpg ├── beian.png ├── def_index.jpg └── social-icons │ ├── rss.svg │ ├── email.svg │ ├── tel.svg │ ├── telegram.svg │ ├── facebook.svg │ ├── instagram.svg │ ├── twitter.svg │ ├── douban.svg │ ├── behance.svg │ ├── steam.svg │ ├── qq.svg │ ├── zhihu.svg │ ├── dribbble.svg │ ├── whatsapp.svg │ ├── coolapk.svg │ ├── bilibili.svg │ ├── neteasemusic.svg │ ├── personalpage.svg │ ├── weibo.svg │ ├── wechat.svg │ └── github.svg ├── screenshot.png ├── js ├── bt_icon │ ├── ad.png │ ├── fold.png │ ├── list.png │ ├── post.png │ ├── table.png │ ├── github.png │ ├── warning.png │ └── progress.png ├── better_comment.js ├── search.js ├── sc1.js └── admin_tag.js ├── languages ├── en_US.mo ├── tr_TR.mo ├── zh_HK.mo └── zh_TW.mo ├── fonts ├── Montserrat-Light.eot ├── Montserrat-Light.woff ├── Montserrat-Light.woff2 ├── Montserrat-Regular.eot ├── Montserrat-Regular.woff ├── Montserrat-Regular.woff2 ├── Montserrat-SemiBold.eot ├── Montserrat-SemiBold.woff └── Montserrat-SemiBold.woff2 ├── gutenberg-src ├── src │ ├── mdx │ │ ├── style.scss │ │ ├── editor.scss │ │ └── languages │ │ │ ├── template.pot │ │ │ ├── zh_HK.po │ │ │ ├── zh_TW.po │ │ │ ├── en_US.po │ │ │ └── tr_TR.po │ ├── common.scss │ ├── blocks.js │ └── init.php ├── .eslintignore ├── .gitignore ├── README.md ├── .editorconfig ├── plugin.php └── package.json ├── includes ├── cdn_version.php ├── admin_init_ver.php ├── admin_init_fn.php ├── admin.css ├── searchform.php ├── main_loop.php ├── admin_functions.css ├── author_card.php ├── share_oversea.php ├── toggleposts.php ├── default_value.php └── same_posts.php ├── mdui └── icons │ └── material-icons │ ├── MaterialIcons-Regular.woff │ ├── material_2_icon_font.woff │ ├── material_2_icon_font.woff2 │ └── MaterialIcons-Regular.woff2 ├── plugin-update-checker ├── Puc │ ├── v4 │ │ └── Factory.php │ └── v4p9 │ │ ├── DebugBar │ │ ├── ThemePanel.php │ │ ├── PluginPanel.php │ │ └── PluginExtension.php │ │ ├── Vcs │ │ ├── BaseChecker.php │ │ ├── Reference.php │ │ └── ThemeUpdateChecker.php │ │ ├── Update.php │ │ ├── Autoloader.php │ │ ├── Theme │ │ ├── Package.php │ │ ├── Update.php │ │ └── UpdateChecker.php │ │ ├── Utils.php │ │ ├── OAuthSignature.php │ │ ├── InstalledPackage.php │ │ ├── Metadata.php │ │ └── StateStore.php ├── plugin-update-checker.php ├── vendor │ └── Parsedown.php ├── composer.json ├── license.txt ├── load-v4p9.php ├── css │ └── puc-debug-bar.css └── js │ └── debug-bar.js ├── .gitignore ├── .editorconfig ├── src ├── tools │ ├── debounce.js │ ├── betterFetch.js │ ├── opacity.js │ ├── fade.js │ ├── ele.js │ └── scrollTo.js ├── login.js └── search.js ├── postcss.config.js ├── searchform.php ├── babel.config.json ├── template-parts ├── content-5-status.php ├── content-first-5-status.php ├── content-1-status.php ├── content-2-status.php ├── content-3-status.php ├── content-first-1-status.php ├── content-first-2-status.php ├── content-first-3-status.php ├── content-4-status.php ├── content-first-4-status.php ├── content-4.php ├── content-first-4.php ├── content-2.php ├── content-first-2.php ├── content-first-5.php └── content-5.php ├── blocks └── languages │ ├── mdx-en_US-mdx_block_js.json │ ├── mdx-zh_HK-mdx_block_js.json │ ├── mdx-zh_TW-mdx_block_js.json │ └── mdx-tr_TR-mdx_block_js.json ├── package.json ├── css ├── flickity.min.css └── oled.css ├── ajax-comment ├── main.php └── app.js ├── README ├── zh_CN.md └── tr_TR.md ├── webpack.config.js ├── comments.php ├── 404.php └── README.md /img/dpic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/img/dpic.jpg -------------------------------------------------------------------------------- /img/admin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/img/admin.jpg -------------------------------------------------------------------------------- /img/beian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/img/beian.png -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/screenshot.png -------------------------------------------------------------------------------- /img/def_index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/img/def_index.jpg -------------------------------------------------------------------------------- /js/bt_icon/ad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/js/bt_icon/ad.png -------------------------------------------------------------------------------- /js/bt_icon/fold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/js/bt_icon/fold.png -------------------------------------------------------------------------------- /js/bt_icon/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/js/bt_icon/list.png -------------------------------------------------------------------------------- /js/bt_icon/post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/js/bt_icon/post.png -------------------------------------------------------------------------------- /js/bt_icon/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/js/bt_icon/table.png -------------------------------------------------------------------------------- /languages/en_US.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/languages/en_US.mo -------------------------------------------------------------------------------- /languages/tr_TR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/languages/tr_TR.mo -------------------------------------------------------------------------------- /languages/zh_HK.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/languages/zh_HK.mo -------------------------------------------------------------------------------- /languages/zh_TW.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/languages/zh_TW.mo -------------------------------------------------------------------------------- /js/bt_icon/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/js/bt_icon/github.png -------------------------------------------------------------------------------- /js/bt_icon/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/js/bt_icon/warning.png -------------------------------------------------------------------------------- /js/bt_icon/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/js/bt_icon/progress.png -------------------------------------------------------------------------------- /fonts/Montserrat-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-Light.eot -------------------------------------------------------------------------------- /fonts/Montserrat-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-Light.woff -------------------------------------------------------------------------------- /fonts/Montserrat-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-Light.woff2 -------------------------------------------------------------------------------- /fonts/Montserrat-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-Regular.eot -------------------------------------------------------------------------------- /fonts/Montserrat-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-Regular.woff -------------------------------------------------------------------------------- /fonts/Montserrat-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-Regular.woff2 -------------------------------------------------------------------------------- /fonts/Montserrat-SemiBold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-SemiBold.eot -------------------------------------------------------------------------------- /fonts/Montserrat-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-SemiBold.woff -------------------------------------------------------------------------------- /gutenberg-src/src/mdx/style.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * #.# Styles 3 | * 4 | * CSS for both Frontend+Backend. 5 | */ 6 | -------------------------------------------------------------------------------- /fonts/Montserrat-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/fonts/Montserrat-SemiBold.woff2 -------------------------------------------------------------------------------- /includes/cdn_version.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mdui/icons/material-icons/MaterialIcons-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/mdui/icons/material-icons/MaterialIcons-Regular.woff -------------------------------------------------------------------------------- /mdui/icons/material-icons/material_2_icon_font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/mdui/icons/material-icons/material_2_icon_font.woff -------------------------------------------------------------------------------- /mdui/icons/material-icons/material_2_icon_font.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/mdui/icons/material-icons/material_2_icon_font.woff2 -------------------------------------------------------------------------------- /mdui/icons/material-icons/MaterialIcons-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChrisKimZHT/mdx/master/mdui/icons/material-icons/MaterialIcons-Regular.woff2 -------------------------------------------------------------------------------- /gutenberg-src/.eslintignore: -------------------------------------------------------------------------------- 1 | **/*.min.js 2 | **/*.build.js 3 | **/node_modules/** 4 | **/vendor/** 5 | build 6 | coverage 7 | cypress 8 | node_modules 9 | vendor 10 | -------------------------------------------------------------------------------- /gutenberg-src/src/mdx/editor.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * #.# Editor Styles 3 | * 4 | * CSS for just Backend enqueued after style.scss 5 | * which makes it higher in priority. 6 | */ 7 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4/Factory.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gutenberg-src/README.md: -------------------------------------------------------------------------------- 1 | # MDx Blocks 2 | 3 | > Gutenberg blocks for MDx theme 4 | 5 | MDx主题内置的Gutenberg区块源码 6 | 7 | 运行`npm run start`会监听src文件夹的任何修改操作并实时生成开发环境的代码 8 | 9 | 运行`npm run build`会生成用于生产环境的代码 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .history 2 | 3 | .DS_Store 4 | 5 | *.log 6 | 7 | _config.yml 8 | 9 | node_modules 10 | 11 | .idea 12 | 13 | .directory 14 | 15 | *.map 16 | 17 | .vscode 18 | 19 | dist 20 | 21 | yarn.lock 22 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | 5 | indent_style = space 6 | 7 | indent_size = 4 8 | 9 | end_of_line = lf 10 | 11 | charset = utf-8 12 | 13 | trim_trailing_whitespace = false 14 | 15 | insert_final_newline = false -------------------------------------------------------------------------------- /src/tools/debounce.js: -------------------------------------------------------------------------------- 1 | export default (fn, time) => { 2 | let timer = null; 3 | return function() { 4 | if (timer) { 5 | clearTimeout(timer); 6 | } 7 | timer = setTimeout(fn, time); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = ({ env }) => ({ 2 | plugins: [ 3 | require('autoprefixer'), 4 | require('cssnano')({ 5 | preset: 'default', 6 | }), 7 | require("postcss-inline-svg"), 8 | require("postcss-import") 9 | ] 10 | }) -------------------------------------------------------------------------------- /gutenberg-src/src/common.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * #.# Common SCSS 3 | * 4 | * Can include things like variables and mixins 5 | * that are used across the project. 6 | */ 7 | 8 | // Colors. 9 | $black: rgb(41, 41, 41); 10 | $white: #f4f4f4; 11 | $gray: #dedede; 12 | $green: #bada55; 13 | $red: orangered; 14 | -------------------------------------------------------------------------------- /plugin-update-checker/plugin-update-checker.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugin-update-checker/vendor/Parsedown.php: -------------------------------------------------------------------------------- 1 | =') ) { 5 | require __DIR__ . '/ParsedownModern.php'; 6 | } else { 7 | require __DIR__ . '/ParsedownLegacy.php'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /includes/admin_init_fn.php: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /img/social-icons/email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gutenberg-src/src/blocks.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable quotes */ 2 | /** 3 | * Gutenberg Blocks 4 | * 5 | * All blocks related JavaScript files should be imported here. 6 | * You can create a new block folder in this dir and include code 7 | * for that block here as well. 8 | * 9 | * All blocks should be included here since this is the file that 10 | * Webpack is compiling as the input file. 11 | */ 12 | 13 | import "./mdx/mdx"; 14 | -------------------------------------------------------------------------------- /img/social-icons/tel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/social-icons/telegram.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /searchform.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 | 6 |
-------------------------------------------------------------------------------- /img/social-icons/facebook.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "edge": "18", 8 | "firefox": "78", 9 | "chrome": "74", 10 | "safari": "13" 11 | }, 12 | "corejs": "3", 13 | "useBuiltIns": "usage" 14 | } 15 | ] 16 | ], 17 | "plugins": ["@babel/plugin-transform-runtime"] 18 | } -------------------------------------------------------------------------------- /src/tools/betterFetch.js: -------------------------------------------------------------------------------- 1 | export default async (url, option = {}) => { 2 | let response = await fetch(url, option); 3 | if (response.ok && response.status === 200) { 4 | if (response.headers.get('Content-Type').indexOf('/json') !== -1) { 5 | return response.json(); 6 | } else if (response.headers.get('Content-Type').indexOf('image/') !== -1) { 7 | return response.blob(); 8 | } else { 9 | return response.text(); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /gutenberg-src/.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # https://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = space 15 | indent_size = 4 16 | 17 | [*.yml] 18 | indent_style = space 19 | indent_size = 2 20 | 21 | [*.md] 22 | trim_trailing_whitespace = false 23 | -------------------------------------------------------------------------------- /gutenberg-src/plugin.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /includes/admin.css: -------------------------------------------------------------------------------- 1 | #wpcontent { 2 | background: #23282d; 3 | min-height: 100vh; 4 | } 5 | .wrap { 6 | color: white!important; 7 | } 8 | .wrap a { 9 | color: #00b9eb!important; 10 | } 11 | .wrap div.notice { 12 | color: #444; 13 | } 14 | .wrap > h1, .wrap > h2 { 15 | color: white!important; 16 | } 17 | .mdx-admin-img { 18 | width: 100%; 19 | text-align: center; 20 | } 21 | .mdx-admin-img > img { 22 | width: 100%; 23 | max-width: 800px; 24 | display: inline-block; 25 | } 26 | ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu>li.current>a.current:after { 27 | border-right-color: #23282d; 28 | } -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/DebugBar/ThemePanel.php: -------------------------------------------------------------------------------- 1 | row('Theme directory', htmlentities($this->updateChecker->directoryName)); 13 | parent::displayConfigHeader(); 14 | } 15 | 16 | protected function getUpdateFields() { 17 | return array_merge(parent::getUpdateFields(), array('details_url')); 18 | } 19 | } 20 | 21 | endif; 22 | -------------------------------------------------------------------------------- /template-parts/content-5-status.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
post_content));?>
5 |
6 |

7 | 8 |

9 |
-------------------------------------------------------------------------------- /template-parts/content-first-5-status.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
post_content));?>
5 |
6 |

7 | 8 |

9 |
-------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Vcs/BaseChecker.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /includes/searchform.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/social-icons/douban.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/social-icons/behance.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugin-update-checker/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yahnis-elsts/plugin-update-checker", 3 | "type": "library", 4 | "description": "A custom update checker for WordPress plugins and themes. Useful if you can't host your plugin in the official WP repository but still want it to support automatic updates.", 5 | "keywords": ["wordpress", "plugin updates", "automatic updates", "theme updates"], 6 | "homepage": "https://github.com/YahnisElsts/plugin-update-checker/", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Yahnis Elsts", 11 | "email": "whiteshadow@w-shadow.com", 12 | "homepage": "http://w-shadow.com/", 13 | "role": "Developer" 14 | } 15 | ], 16 | "require": { 17 | "php": ">=5.2.0", 18 | "ext-json": "*" 19 | }, 20 | "autoload": { 21 | "files": ["load-v4p9.php"] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /includes/main_loop.php: -------------------------------------------------------------------------------- 1 | '.htmlspecialchars_decode(mdx_get_option('mdx_ad')).''; 12 | } 13 | }else{ 14 | get_template_part('template-parts/content-'.$style, get_post_format()); 15 | } 16 | ?> -------------------------------------------------------------------------------- /template-parts/content-1-status.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | post_content));?> 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /template-parts/content-2-status.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | post_content));?> 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /template-parts/content-3-status.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | post_content));?> 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /includes/admin_functions.css: -------------------------------------------------------------------------------- 1 | .nav-tab:focus { 2 | box-shadow: none; 3 | } 4 | tbody.mdx-admin-section { 5 | display: none; 6 | } 7 | tbody.mdx-admin-section.mdx-admin-section-active{ 8 | display: table-row-group; 9 | } 10 | p.submit { 11 | position: fixed; 12 | bottom: 0; 13 | right: 0; 14 | width: 100%; 15 | text-align: right; 16 | padding: 16px 20px 40px 0!important; 17 | margin: 0; 18 | background: #f9f9f9; 19 | z-index: 0; 20 | border-top: 1px solid #ccc!important; 21 | } 22 | .form-table { 23 | margin-bottom: 60px; 24 | } 25 | #wpfooter { 26 | position: fixed; 27 | } 28 | @media (max-width: 782px){ 29 | p.submit { 30 | padding: 12px 15px 12px 0!important; 31 | } 32 | p.submit #submit { 33 | margin: 0; 34 | } 35 | .form-table { 36 | margin-bottom: 5px; 37 | } 38 | } -------------------------------------------------------------------------------- /template-parts/content-first-1-status.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | post_content));?> 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /template-parts/content-first-2-status.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | post_content));?> 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /template-parts/content-first-3-status.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | post_content));?> 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /img/social-icons/steam.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Update.php: -------------------------------------------------------------------------------- 1 | slug = $this->slug; 27 | $update->new_version = $this->version; 28 | $update->package = $this->download_url; 29 | 30 | return $update; 31 | } 32 | } 33 | 34 | endif; 35 | -------------------------------------------------------------------------------- /template-parts/content-4-status.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | post_content));?> 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /includes/author_card.php: -------------------------------------------------------------------------------- 1 |

-------------------------------------------------------------------------------- /template-parts/content-first-4-status.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | post_content));?> 8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /img/social-icons/qq.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/tools/opacity.js: -------------------------------------------------------------------------------- 1 | export default class Opacity { 2 | constructor(dom, to, duration) { 3 | this.dom = dom; 4 | if (this.dom === null) { 5 | return; 6 | } 7 | this.from = parseFloat(window.getComputedStyle(this.dom, null).getPropertyValue('opacity')); 8 | this.to = to; 9 | this.duration = duration; 10 | this.startTime = -1; 11 | 12 | this.start(); 13 | } 14 | start() { 15 | if (this.startTime < 0) { 16 | this.startTime = Date.now(); 17 | } 18 | const currentTime = Date.now() - this.startTime; 19 | 20 | if (this.dom === null) { 21 | return; 22 | } 23 | 24 | if (currentTime >= this.duration) { 25 | this.dom.style.opacity = this.to; 26 | return; 27 | } 28 | this.dom.style.opacity = `${this.from + (this.to - this.from) * (currentTime / this.duration)}`; 29 | 30 | requestAnimationFrame(this.start.bind(this)); 31 | } 32 | } -------------------------------------------------------------------------------- /gutenberg-src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-custom-block-cgb-guten-block", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "cgb-scripts start", 7 | "build": "cgb-scripts build", 8 | "eject": "cgb-scripts eject" 9 | }, 10 | "dependencies": { 11 | "@emotion/core": "^10.1.1", 12 | "@wordpress/a11y": "^2.5.0", 13 | "@wordpress/blob": "^2.5.0", 14 | "@wordpress/block-editor": "^3.0.0", 15 | "@wordpress/components": "^8.1.0", 16 | "@wordpress/core-data": "^2.5.0", 17 | "cgb-scripts": "1.15.0", 18 | "emoji-js": "^3.4.1", 19 | "eslint-plugin-html": "^6.0.0", 20 | "eslint-plugin-jest": "^22.15.1", 21 | "eslint-plugin-jsx-a11y": "^6.2.3", 22 | "eslint-plugin-react": "^7.14.3", 23 | "eslint-plugin-wordpress": "^0.1.0", 24 | "marked": "^0.7.0", 25 | "prismjs": "^1.21.0", 26 | "react-autosize-textarea": "^7.0.0", 27 | "traverse": "^0.6.6", 28 | "turndown": "^5.0.3", 29 | "turndown-plugin-gfm": "^1.0.2" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /img/social-icons/zhihu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugin-update-checker/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Jānis Elsts 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /src/tools/fade.js: -------------------------------------------------------------------------------- 1 | export default (doms, direction, duration) => { 2 | for (let i = 0; i < doms.length; i++) { 3 | let dom = doms[i]; 4 | if (direction === 'in') { 5 | dom.style.opacity = '0'; 6 | dom.style.display = 'block'; 7 | dom.style.transition = `opacity ${duration / 1000}s`; 8 | setTimeout(() => { 9 | dom.style.opacity = '1'; 10 | }, 0); 11 | setTimeout(() => { 12 | dom.style.display = 'block'; 13 | dom.style.transition = ''; 14 | dom.style.opacity = '1'; 15 | }, duration); 16 | } else { 17 | dom.style.opacity = '1'; 18 | dom.style.display = 'block'; 19 | dom.style.transition = `opacity ${duration / 1000}s`; 20 | dom.style.opacity = '0'; 21 | setTimeout(() => { 22 | dom.style.display = 'none'; 23 | dom.style.transition = ''; 24 | dom.style.opacity = '0'; 25 | }, duration); 26 | } 27 | }; 28 | } -------------------------------------------------------------------------------- /blocks/languages/mdx-en_US-mdx_block_js.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.4.0","source":"mdx.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"MDx \u6298\u53e0\u5185\u5bb9":["MDx Collapsible Block"],"\u6298\u53e0\u5185\u5bb9":["Collapsed content"],"\u88ab\u6298\u53e0\u5185\u5bb9":["Collapsed content"],"\u6807\u9898":["Title"],"\u9ed8\u8ba4\u6253\u5f00":["Expand by default"],"MDx \u8b66\u544a\u5185\u5bb9":["MDx Warning Block"],"\u8b66\u544a\u5185\u5bb9":["Warning content"],"\u8b66\u544a":["Warning"],"MDx \u8fdb\u5ea6\u6307\u793a\u5668":["MDx progress indicator"],"\u8fdb\u5ea6\u6307\u793a\u5668":["Progress indicator"],"\u8fdb\u5ea6 (0-100)":["Progress (0-100)"],"MDx Github \u4fe1\u606f\u5361":["MDx GitHub Info Card"],"\u4f5c\u8005\u7528\u6237\u540d":["Author"],"\u4ed3\u5e93\u540d":["Repository"],"API \u7f51\u5173":["API Gateway"],"MDx \u6587\u7ae0\u4fe1\u606f\u5361":["MDx Posts Info Card"],"\u6587\u7ae0\u4fe1\u606f\u5361":["Posts Info Card"],"URL":["URL"],"MDx \u5e7f\u544a":["MDx Ads"],"\u5e7f\u544a":["Ad"]}}} -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/DebugBar/PluginPanel.php: -------------------------------------------------------------------------------- 1 | row('Plugin file', htmlentities($this->updateChecker->pluginFile)); 13 | parent::displayConfigHeader(); 14 | } 15 | 16 | protected function getMetadataButton() { 17 | $requestInfoButton = ''; 18 | if ( function_exists('get_submit_button') ) { 19 | $requestInfoButton = get_submit_button( 20 | 'Request Info', 21 | 'secondary', 22 | 'puc-request-info-button', 23 | false, 24 | array('id' => $this->updateChecker->getUniqueName('request-info-button')) 25 | ); 26 | } 27 | return $requestInfoButton; 28 | } 29 | 30 | protected function getUpdateFields() { 31 | return array_merge( 32 | parent::getUpdateFields(), 33 | array('homepage', 'upgrade_notice', 'tested',) 34 | ); 35 | } 36 | } 37 | 38 | endif; 39 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/DebugBar/PluginExtension.php: -------------------------------------------------------------------------------- 1 | updateChecker->getUniqueName('uid') ) { 19 | return; 20 | } 21 | $this->preAjaxRequest(); 22 | $info = $this->updateChecker->requestInfo(); 23 | if ( $info !== null ) { 24 | echo 'Successfully retrieved plugin info from the metadata URL:'; 25 | echo '
', htmlentities(print_r($info, true)), '
'; 26 | } else { 27 | echo 'Failed to retrieve plugin info from the metadata URL.'; 28 | } 29 | exit; 30 | } 31 | } 32 | 33 | endif; 34 | -------------------------------------------------------------------------------- /plugin-update-checker/load-v4p9.php: -------------------------------------------------------------------------------- 1 | 'Puc_v4p9_Plugin_UpdateChecker', 12 | 'Theme_UpdateChecker' => 'Puc_v4p9_Theme_UpdateChecker', 13 | 14 | 'Vcs_PluginUpdateChecker' => 'Puc_v4p9_Vcs_PluginUpdateChecker', 15 | 'Vcs_ThemeUpdateChecker' => 'Puc_v4p9_Vcs_ThemeUpdateChecker', 16 | 17 | 'GitHubApi' => 'Puc_v4p9_Vcs_GitHubApi', 18 | 'BitBucketApi' => 'Puc_v4p9_Vcs_BitBucketApi', 19 | 'GitLabApi' => 'Puc_v4p9_Vcs_GitLabApi', 20 | ) 21 | as $pucGeneralClass => $pucVersionedClass 22 | ) { 23 | Puc_v4_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.9'); 24 | //Also add it to the minor-version factory in case the major-version factory 25 | //was already defined by another, older version of the update checker. 26 | Puc_v4p9_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.9'); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /img/social-icons/dribbble.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mdx", 3 | "version": "2.0.4", 4 | "description": "", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1", 7 | "build": "webpack" 8 | }, 9 | "author": "", 10 | "license": "GPL-3.0", 11 | "devDependencies": { 12 | "@babel/core": "^7.14.2", 13 | "@babel/plugin-transform-runtime": "^7.14.2", 14 | "@babel/preset-env": "^7.14.2", 15 | "@babel/runtime-corejs3": "^7.14.0", 16 | "autoprefixer": "^10.2.5", 17 | "babel-loader": "^8.2.2", 18 | "cache-loader": "^4.1.0", 19 | "css-loader": "^5.2.4", 20 | "cssnano": "^5.0.2", 21 | "file-loader": "^6.2.0", 22 | "less-loader": "^7.3.0", 23 | "mini-css-extract-plugin": "^1.6.0", 24 | "postcss": "^8.2.15", 25 | "postcss-import": "^14.0.2", 26 | "postcss-inline-svg": "^5.0.0", 27 | "postcss-loader": "^4.3.0", 28 | "style-loader": "^2.0.0", 29 | "webpack": "^4.46.0", 30 | "webpack-cli": "^4.7.0" 31 | }, 32 | "dependencies": { 33 | "@babel/runtime": "^7.14.0", 34 | "core-js": "^3.12.1", 35 | "html2canvas": "1.0.0-alpha.11" 36 | }, 37 | "browserslist": [ 38 | "> 1% in CN", 39 | "last 2 versions", 40 | "Firefox ESR", 41 | "not dead", 42 | "not ie 11" 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /img/social-icons/whatsapp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /blocks/languages/mdx-zh_HK-mdx_block_js.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.4.0","source":"mdx.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"MDx \u647a\u758a\u5185\u5bb9":["MDx \u647a\u758a\u5167\u5bb9"],"\u647a\u758a\u5185\u5bb9":["\u647a\u758a\u5167\u5bb9"],"\u88ab\u647a\u758a\u5185\u5bb9":["\u88ab\u647a\u758a\u5167\u5bb9"],"\u6807\u9898":["\u6a19\u984c"],"\u9ed8\u8ba4\u6253\u5f00":["\u9ed8\u8a8d\u6253\u958b"],"MDx \u8b66\u544a\u5185\u5bb9":["MDx \u8b66\u544a\u5167\u5bb9"],"\u8b66\u544a\u5185\u5bb9":["\u8b66\u544a\u5167\u5bb9"],"\u8b66\u544a":["\u8b66\u544a"],"MDx \u8fdb\u5ea6\u6307\u793a\u5668":["\u9032\u5ea6\u6307\u793a\u5668"],"\u8fdb\u5ea6\u6307\u793a\u5668":["\u9032\u5ea6\u6307\u793a\u5668"],"\u8fdb\u5ea6 (0-100)":["\u9032\u5ea6 (0-100)"],"MDx Github \u4fe1\u606f\u5361":["MDx Github \u4fe1\u606f\u5361"],"\u4f5c\u8005\u7528\u6237\u540d":["\u4f5c\u8005\u7528\u6236\u540d"],"\u4ed3\u5e93\u540d":["\u5009\u5eab\u540d"],"API \u7f51\u5173":["API \u7db2\u95dc"],"MDx \u6587\u7ae0\u4fe1\u606f\u5361":["MDx \u6587\u7ae0\u4fe1\u606f\u5361"],"\u6587\u7ae0\u4fe1\u606f\u5361":["\u6587\u7ae0\u4fe1\u606f\u5361"],"URL":["URL"],"MDx \u5e7f\u544a":["MDx \u5ee3\u544a"],"\u5e7f\u544a":["\u5ee3\u544a"]}}} -------------------------------------------------------------------------------- /blocks/languages/mdx-zh_TW-mdx_block_js.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"YEAR-MO-DA HO:MI+ZONE","generator":"WP-CLI\/2.4.0","source":"mdx.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"MDx \u647a\u758a\u5185\u5bb9":["MDx \u647a\u758a\u5167\u5bb9"],"\u647a\u758a\u5185\u5bb9":["\u647a\u758a\u5167\u5bb9"],"\u88ab\u647a\u758a\u5185\u5bb9":["\u88ab\u647a\u758a\u5167\u5bb9"],"\u6807\u9898":["\u6a19\u984c"],"\u9ed8\u8ba4\u6253\u5f00":["\u9810\u8a2d\u6253\u958b"],"MDx \u8b66\u544a\u5185\u5bb9":["MDx \u8b66\u544a\u5167\u5bb9"],"\u8b66\u544a\u5185\u5bb9":["\u8b66\u544a\u5167\u5bb9"],"\u8b66\u544a":["\u8b66\u544a"],"MDx \u8fdb\u5ea6\u6307\u793a\u5668":["\u9032\u5ea6\u6307\u793a\u5668"],"\u8fdb\u5ea6\u6307\u793a\u5668":["\u9032\u5ea6\u6307\u793a\u5668"],"\u8fdb\u5ea6 (0-100)":["\u9032\u5ea6 (0-100)"],"MDx Github \u4fe1\u606f\u5361":["MDx Github \u4fe1\u606f\u5361"],"\u4f5c\u8005\u7528\u6237\u540d":["\u4f5c\u8005\u7528\u6236\u540d"],"\u4ed3\u5e93\u540d":["\u5009\u5eab\u540d"],"API \u7f51\u5173":["API \u7db2\u95dc"],"MDx \u6587\u7ae0\u4fe1\u606f\u5361":["MDx \u6587\u7ae0\u4fe1\u606f\u5361"],"\u6587\u7ae0\u4fe1\u606f\u5361":["\u6587\u7ae0\u4fe1\u606f\u5361"],"URL":["URL"],"MDx \u5e7f\u544a":["MDx \u5ee3\u544a"],"\u5e7f\u544a":["\u5ee3\u544a"]}}} -------------------------------------------------------------------------------- /blocks/languages/mdx-tr_TR-mdx_block_js.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2021-01-16 17:17+0300","generator":"WP-CLI\/2.4.0","source":"mdx.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"tr_TR","plural-forms":"nplurals=2; plural=(n != 1);"},"MDx \u6298\u53e0\u5185\u5bb9":["MDx Daralt\u0131lm\u0131\u015f \u0130\u00e7erik"],"\u6298\u53e0\u5185\u5bb9":["\u0130\u00e7eri\u011fi Daralt"],"\u88ab\u6298\u53e0\u5185\u5bb9":["Daralt\u0131lm\u0131\u015f \u0130\u00e7erik"],"\u6807\u9898":["Ba\u015fl\u0131k"],"\u9ed8\u8ba4\u6253\u5f00":["Varsay\u0131lan olarak a\u00e7"],"MDx \u8b66\u544a\u5185\u5bb9":["MDx Uyar\u0131 \u0130\u00e7eri\u011fi"],"\u8b66\u544a\u5185\u5bb9":["Uyar\u0131 \u0130\u00e7eri\u011fi"],"\u8b66\u544a":["Uyar\u0131"],"MDx \u8fdb\u5ea6\u6307\u793a\u5668":["MDx \u0130lerleme G\u00f6stergesi"],"\u8fdb\u5ea6\u6307\u793a\u5668":["\u0130lerleme G\u00f6stergesi"],"\u8fdb\u5ea6 (0-100)":["\u0130lerleme (0-100)"],"MDx Github \u4fe1\u606f\u5361":["MDx GitHub Bilgi Kart\u0131"],"\u4f5c\u8005\u7528\u6237\u540d":["Yazar Kullan\u0131c\u0131 Ad\u0131"],"\u4ed3\u5e93\u540d":["Depo Ad\u0131"],"API \u7f51\u5173":["API Ge\u00e7idi"],"MDx \u6587\u7ae0\u4fe1\u606f\u5361":["MDx Makale Bilgi Kart\u0131"],"\u6587\u7ae0\u4fe1\u606f\u5361":["Makale Bilgi Kart\u0131"],"URL":["URL"],"MDx \u5e7f\u544a":["MDx Reklam"],"\u5e7f\u544a":["Reklam"]}}} -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Vcs/Reference.php: -------------------------------------------------------------------------------- 1 | properties = $properties; 21 | } 22 | 23 | /** 24 | * @param string $name 25 | * @return mixed|null 26 | */ 27 | public function __get($name) { 28 | return array_key_exists($name, $this->properties) ? $this->properties[$name] : null; 29 | } 30 | 31 | /** 32 | * @param string $name 33 | * @param mixed $value 34 | */ 35 | public function __set($name, $value) { 36 | $this->properties[$name] = $value; 37 | } 38 | 39 | /** 40 | * @param string $name 41 | * @return bool 42 | */ 43 | public function __isset($name) { 44 | return isset($this->properties[$name]); 45 | } 46 | 47 | } 48 | 49 | endif; 50 | -------------------------------------------------------------------------------- /img/social-icons/coolapk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugin-update-checker/css/puc-debug-bar.css: -------------------------------------------------------------------------------- 1 | .puc-debug-bar-panel-v4 pre { 2 | margin-top: 0; 3 | } 4 | 5 | /* Style the debug data table to match "widefat" table style used by WordPress. */ 6 | table.puc-debug-data { 7 | width: 100%; 8 | clear: both; 9 | margin: 0; 10 | 11 | border-spacing: 0; 12 | background-color: #f9f9f9; 13 | 14 | border-radius: 3px; 15 | border: 1px solid #dfdfdf; 16 | border-collapse: separate; 17 | } 18 | 19 | table.puc-debug-data * { 20 | word-wrap: break-word; 21 | } 22 | 23 | table.puc-debug-data th { 24 | width: 11em; 25 | padding: 7px 7px 8px; 26 | text-align: left; 27 | 28 | font-family: "Georgia", "Times New Roman", "Bitstream Charter", "Times", serif; 29 | font-weight: 400; 30 | font-size: 14px; 31 | line-height: 1.3em; 32 | text-shadow: rgba(255, 255, 255, 0.804) 0 1px 0; 33 | } 34 | 35 | table.puc-debug-data td, table.puc-debug-data th { 36 | border-width: 1px 0; 37 | border-style: solid; 38 | 39 | border-top-color: #fff; 40 | border-bottom-color: #dfdfdf; 41 | 42 | text-transform: none; 43 | } 44 | 45 | table.puc-debug-data td { 46 | color: #555; 47 | font-size: 12px; 48 | padding: 4px 7px 2px; 49 | vertical-align: top; 50 | } 51 | 52 | .puc-ajax-response { 53 | border: 1px solid #dfdfdf; 54 | border-radius: 3px; 55 | padding: 0.5em; 56 | margin: 5px 0; 57 | background-color: white; 58 | } 59 | 60 | .puc-ajax-nonce { 61 | display: none; 62 | } 63 | 64 | .puc-ajax-response dt { 65 | margin: 0; 66 | } 67 | 68 | .puc-ajax-response dd { 69 | margin: 0 0 1em; 70 | } 71 | -------------------------------------------------------------------------------- /img/social-icons/bilibili.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/social-icons/neteasemusic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/social-icons/personalpage.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/tools/ele.js: -------------------------------------------------------------------------------- 1 | export default (selector, callback = null, returnType = 'single') => { 2 | if (typeof selector === "object") { 3 | return selector; 4 | } else if (typeof selector !== "string") { 5 | return document.createElement("div"); 6 | } 7 | 8 | let elems = null; 9 | let idSelector = false; 10 | if (!selector.match(/[ <>:~+^=]/)) { 11 | if (selector[0] === '#') { 12 | elems = document.getElementById(selector.slice(1)); 13 | idSelector = true; 14 | } else if (selector[0] === '.') { 15 | elems = document.getElementsByClassName(selector.slice(1)); 16 | } else { 17 | if (!selector.match(/[ .<>:~+^=#]/)) { 18 | elems = document.getElementsByTagName(selector); 19 | } else { 20 | elems = document.querySelectorAll(selector); 21 | } 22 | } 23 | } else { 24 | elems = document.querySelectorAll(selector); 25 | } 26 | 27 | if (elems === null || elems.length === 0) { 28 | return document.createElement("div"); 29 | } 30 | 31 | if (callback !== null) { 32 | if (!idSelector) { 33 | elems = [...elems]; 34 | Array.prototype.map.call(elems, (e) => { callback(e); return e }); 35 | } else { 36 | callback(elems); 37 | } 38 | } 39 | 40 | if (returnType == 'single') { 41 | if (!idSelector) { 42 | return elems[0]; 43 | } else { 44 | return elems; 45 | } 46 | } else { 47 | if (!idSelector) { 48 | return elems; 49 | } else { 50 | return [elems]; 51 | } 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /gutenberg-src/src/mdx/languages/template.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "Last-Translator: FULL NAME \n" 6 | "Language-Team: LANGUAGE \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "POT-Creation-Date: 2021-01-14T14:14:25+08:00\n" 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 | "X-Generator: WP-CLI 2.4.0\n" 13 | "X-Domain: mdx\n" 14 | 15 | #: mdx.js:9 16 | msgid "MDx 折叠内容" 17 | msgstr "" 18 | 19 | #: mdx.js:12 20 | #: mdx.js:44 21 | msgid "折叠内容" 22 | msgstr "" 23 | 24 | #: mdx.js:16 25 | msgid "被折叠内容" 26 | msgstr "" 27 | 28 | #: mdx.js:37 29 | #: mdx.js:111 30 | msgid "标题" 31 | msgstr "" 32 | 33 | #: mdx.js:51 34 | msgid "默认打开" 35 | msgstr "" 36 | 37 | #: mdx.js:87 38 | msgid "MDx 警告内容" 39 | msgstr "" 40 | 41 | #: mdx.js:90 42 | #: mdx.js:118 43 | msgid "警告内容" 44 | msgstr "" 45 | 46 | #: mdx.js:94 47 | msgid "警告" 48 | msgstr "" 49 | 50 | #: mdx.js:144 51 | msgid "MDx 进度指示器" 52 | msgstr "" 53 | 54 | #: mdx.js:147 55 | msgid "进度指示器" 56 | msgstr "" 57 | 58 | #: mdx.js:157 59 | msgid "进度 (0-100)" 60 | msgstr "" 61 | 62 | #: mdx.js:179 63 | msgid "MDx Github 信息卡" 64 | msgstr "" 65 | 66 | #: mdx.js:239 67 | msgid "作者用户名" 68 | msgstr "" 69 | 70 | #: mdx.js:250 71 | msgid "仓库名" 72 | msgstr "" 73 | 74 | #: mdx.js:262 75 | msgid "API 网关" 76 | msgstr "" 77 | 78 | #: mdx.js:303 79 | msgid "MDx 文章信息卡" 80 | msgstr "" 81 | 82 | #: mdx.js:306 83 | #: mdx.js:330 84 | msgid "文章信息卡" 85 | msgstr "" 86 | 87 | #: mdx.js:333 88 | msgid "URL" 89 | msgstr "" 90 | 91 | #: mdx.js:362 92 | msgid "MDx 广告" 93 | msgstr "" 94 | 95 | #: mdx.js:365 96 | msgid "广告" 97 | msgstr "" 98 | -------------------------------------------------------------------------------- /css/flickity.min.css: -------------------------------------------------------------------------------- 1 | /*! Flickity v2.2.2 2 | https://flickity.metafizzy.co 3 | */ 4 | .flickity-enabled{position:relative}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;height:100%}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-button{position:absolute;background:hsla(0,0%,100%,.75);border:none;color:#333}.flickity-button:hover{background:#fff;cursor:pointer}.flickity-button:focus{outline:none;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:.6}.flickity-button:disabled{opacity:.3;cursor:auto;pointer-events:none}.flickity-button-icon{fill:currentColor}.flickity-prev-next-button{top:50%;width:44px;height:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button .flickity-button-icon{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-page-dots{position:absolute;width:100%;bottom:-25px;padding:0;margin:0;list-style:none;text-align:center;line-height:1}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;background:#333;border-radius:50%;opacity:.25;cursor:pointer}.flickity-page-dots .dot.is-selected{opacity:1} -------------------------------------------------------------------------------- /img/social-icons/weibo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugin-update-checker/js/debug-bar.js: -------------------------------------------------------------------------------- 1 | jQuery(function($) { 2 | 3 | function runAjaxAction(button, action) { 4 | button = $(button); 5 | var panel = button.closest('.puc-debug-bar-panel-v4'); 6 | var responseBox = button.closest('td').find('.puc-ajax-response'); 7 | 8 | responseBox.text('Processing...').show(); 9 | $.post( 10 | ajaxurl, 11 | { 12 | action : action, 13 | uid : panel.data('uid'), 14 | _wpnonce: panel.data('nonce') 15 | }, 16 | function(data) { 17 | responseBox.html(data); 18 | }, 19 | 'html' 20 | ); 21 | } 22 | 23 | $('.puc-debug-bar-panel-v4 input[name="puc-check-now-button"]').click(function() { 24 | runAjaxAction(this, 'puc_v4_debug_check_now'); 25 | return false; 26 | }); 27 | 28 | $('.puc-debug-bar-panel-v4 input[name="puc-request-info-button"]').click(function() { 29 | runAjaxAction(this, 'puc_v4_debug_request_info'); 30 | return false; 31 | }); 32 | 33 | 34 | // Debug Bar uses the panel class name as part of its link and container IDs. This means we can 35 | // end up with multiple identical IDs if more than one plugin uses the update checker library. 36 | // Fix it by replacing the class name with the plugin slug. 37 | var panels = $('#debug-menu-targets').find('.puc-debug-bar-panel-v4'); 38 | panels.each(function() { 39 | var panel = $(this); 40 | var uid = panel.data('uid'); 41 | var target = panel.closest('.debug-menu-target'); 42 | 43 | //Change the panel wrapper ID. 44 | target.attr('id', 'debug-menu-target-puc-' + uid); 45 | 46 | //Change the menu link ID as well and point it at the new target ID. 47 | $('#debug-bar-menu').find('.puc-debug-menu-link-' + uid) 48 | .closest('.debug-menu-link') 49 | .attr('id', 'debug-menu-link-puc-' + uid) 50 | .attr('href', '#' + target.attr('id')); 51 | }); 52 | }); -------------------------------------------------------------------------------- /gutenberg-src/src/mdx/languages/zh_HK.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "Last-Translator: FULL NAME \n" 6 | "Language-Team: LANGUAGE \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "POT-Creation-Date: 2021-01-14T14:14:25+08:00\n" 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 | "X-Generator: WP-CLI 2.4.0\n" 13 | "X-Domain: mdx\n" 14 | 15 | #: mdx.js:9 16 | msgid "MDx 摺疊内容" 17 | msgstr "MDx 摺疊內容" 18 | 19 | #: mdx.js:12 20 | #: mdx.js:44 21 | msgid "摺疊内容" 22 | msgstr "摺疊內容" 23 | 24 | #: mdx.js:16 25 | msgid "被摺疊内容" 26 | msgstr "被摺疊內容" 27 | 28 | #: mdx.js:37 29 | #: mdx.js:111 30 | msgid "标题" 31 | msgstr "標題" 32 | 33 | #: mdx.js:51 34 | msgid "默认打开" 35 | msgstr "默認打開" 36 | 37 | #: mdx.js:87 38 | msgid "MDx 警告内容" 39 | msgstr "MDx 警告內容" 40 | 41 | #: mdx.js:90 42 | #: mdx.js:118 43 | msgid "警告内容" 44 | msgstr "警告內容" 45 | 46 | #: mdx.js:94 47 | msgid "警告" 48 | msgstr "警告" 49 | 50 | #: mdx.js:144 51 | msgid "MDx 进度指示器" 52 | msgstr "進度指示器" 53 | 54 | #: mdx.js:147 55 | msgid "进度指示器" 56 | msgstr "進度指示器" 57 | 58 | #: mdx.js:157 59 | msgid "进度 (0-100)" 60 | msgstr "進度 (0-100)" 61 | 62 | #: mdx.js:179 63 | msgid "MDx Github 信息卡" 64 | msgstr "MDx Github 信息卡" 65 | 66 | #: mdx.js:239 67 | msgid "作者用户名" 68 | msgstr "作者用戶名" 69 | 70 | #: mdx.js:250 71 | msgid "仓库名" 72 | msgstr "倉庫名" 73 | 74 | #: mdx.js:262 75 | msgid "API 网关" 76 | msgstr "API 網關" 77 | 78 | #: mdx.js:303 79 | msgid "MDx 文章信息卡" 80 | msgstr "MDx 文章信息卡" 81 | 82 | #: mdx.js:306 83 | #: mdx.js:330 84 | msgid "文章信息卡" 85 | msgstr "文章信息卡" 86 | 87 | #: mdx.js:333 88 | msgid "URL" 89 | msgstr "URL" 90 | 91 | #: mdx.js:362 92 | msgid "MDx 广告" 93 | msgstr "MDx 廣告" 94 | 95 | #: mdx.js:365 96 | msgid "广告" 97 | msgstr "廣告" 98 | -------------------------------------------------------------------------------- /gutenberg-src/src/mdx/languages/zh_TW.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "Last-Translator: FULL NAME \n" 6 | "Language-Team: LANGUAGE \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "POT-Creation-Date: 2021-01-14T14:14:25+08:00\n" 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 | "X-Generator: WP-CLI 2.4.0\n" 13 | "X-Domain: mdx\n" 14 | 15 | #: mdx.js:9 16 | msgid "MDx 摺疊内容" 17 | msgstr "MDx 摺疊內容" 18 | 19 | #: mdx.js:12 20 | #: mdx.js:44 21 | msgid "摺疊内容" 22 | msgstr "摺疊內容" 23 | 24 | #: mdx.js:16 25 | msgid "被摺疊内容" 26 | msgstr "被摺疊內容" 27 | 28 | #: mdx.js:37 29 | #: mdx.js:111 30 | msgid "标题" 31 | msgstr "標題" 32 | 33 | #: mdx.js:51 34 | msgid "默认打开" 35 | msgstr "預設打開" 36 | 37 | #: mdx.js:87 38 | msgid "MDx 警告内容" 39 | msgstr "MDx 警告內容" 40 | 41 | #: mdx.js:90 42 | #: mdx.js:118 43 | msgid "警告内容" 44 | msgstr "警告內容" 45 | 46 | #: mdx.js:94 47 | msgid "警告" 48 | msgstr "警告" 49 | 50 | #: mdx.js:144 51 | msgid "MDx 进度指示器" 52 | msgstr "進度指示器" 53 | 54 | #: mdx.js:147 55 | msgid "进度指示器" 56 | msgstr "進度指示器" 57 | 58 | #: mdx.js:157 59 | msgid "进度 (0-100)" 60 | msgstr "進度 (0-100)" 61 | 62 | #: mdx.js:179 63 | msgid "MDx Github 信息卡" 64 | msgstr "MDx Github 信息卡" 65 | 66 | #: mdx.js:239 67 | msgid "作者用户名" 68 | msgstr "作者用戶名" 69 | 70 | #: mdx.js:250 71 | msgid "仓库名" 72 | msgstr "倉庫名" 73 | 74 | #: mdx.js:262 75 | msgid "API 网关" 76 | msgstr "API 網關" 77 | 78 | #: mdx.js:303 79 | msgid "MDx 文章信息卡" 80 | msgstr "MDx 文章信息卡" 81 | 82 | #: mdx.js:306 83 | #: mdx.js:330 84 | msgid "文章信息卡" 85 | msgstr "文章信息卡" 86 | 87 | #: mdx.js:333 88 | msgid "URL" 89 | msgstr "URL" 90 | 91 | #: mdx.js:362 92 | msgid "MDx 广告" 93 | msgstr "MDx 廣告" 94 | 95 | #: mdx.js:365 96 | msgid "广告" 97 | msgstr "廣告" 98 | -------------------------------------------------------------------------------- /img/social-icons/wechat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ajax-comment/main.php: -------------------------------------------------------------------------------- 1 | get_error_data(); 22 | if ( ! empty( $data ) ) { 23 | fa_ajax_comment_err($comment->get_error_message()); 24 | } else { 25 | exit; 26 | } 27 | } 28 | $user = wp_get_current_user(); 29 | do_action('set_comment_cookies', $comment, $user); 30 | setcookie("mdx_recently_commented", "true", time()+900); 31 | $GLOBALS['comment'] = $comment; 32 | ?> 33 |
  • 34 |
    35 |
    36 |
    37 |
    38 |
  • 39 | = this.duration) { 37 | if (this.dom === 'document') { 38 | document.documentElement.scrollTop = document.body.scrollTop = this.destination; 39 | } else { 40 | this.dom.scrollTop = this.destination; 41 | } 42 | return; 43 | } 44 | if (this.dom === 'document') { 45 | document.documentElement.scrollTop = document.body.scrollTop = this.from + (this.destination - this.from) * (Math.pow((currentTime / this.duration - 1), 3) + 1); 46 | } else { 47 | this.dom.scrollTop = this.from + (this.destination - this.from) * (Math.pow((currentTime / this.duration - 1), 3) + 1); 48 | } 49 | 50 | requestAnimationFrame(this.doScroll.bind(this)); 51 | } 52 | } -------------------------------------------------------------------------------- /template-parts/content-4.php: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 30 | -------------------------------------------------------------------------------- /template-parts/content-first-4.php: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 30 | -------------------------------------------------------------------------------- /gutenberg-src/src/mdx/languages/en_US.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "Last-Translator: FULL NAME \n" 6 | "Language-Team: LANGUAGE \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "POT-Creation-Date: 2021-01-14T14:14:25+08:00\n" 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 | "X-Generator: WP-CLI 2.4.0\n" 13 | "X-Domain: mdx\n" 14 | 15 | #: mdx.js:9 16 | msgid "MDx 折叠内容" 17 | msgstr "MDx Collapsible Block" 18 | 19 | #: mdx.js:12 20 | #: mdx.js:44 21 | msgid "折叠内容" 22 | msgstr "Collapsed content" 23 | 24 | #: mdx.js:16 25 | msgid "被折叠内容" 26 | msgstr "Collapsed content" 27 | 28 | #: mdx.js:37 29 | #: mdx.js:111 30 | msgid "标题" 31 | msgstr "Title" 32 | 33 | #: mdx.js:51 34 | msgid "默认打开" 35 | msgstr "Expand by default" 36 | 37 | #: mdx.js:87 38 | msgid "MDx 警告内容" 39 | msgstr "MDx Warning Block" 40 | 41 | #: mdx.js:90 42 | #: mdx.js:118 43 | msgid "警告内容" 44 | msgstr "Warning content" 45 | 46 | #: mdx.js:94 47 | msgid "警告" 48 | msgstr "Warning" 49 | 50 | #: mdx.js:144 51 | msgid "MDx 进度指示器" 52 | msgstr "MDx progress indicator" 53 | 54 | #: mdx.js:147 55 | msgid "进度指示器" 56 | msgstr "Progress indicator" 57 | 58 | #: mdx.js:157 59 | msgid "进度 (0-100)" 60 | msgstr "Progress (0-100)" 61 | 62 | #: mdx.js:179 63 | msgid "MDx Github 信息卡" 64 | msgstr "MDx GitHub Info Card" 65 | 66 | #: mdx.js:239 67 | msgid "作者用户名" 68 | msgstr "Author" 69 | 70 | #: mdx.js:250 71 | msgid "仓库名" 72 | msgstr "Repository" 73 | 74 | #: mdx.js:262 75 | msgid "API 网关" 76 | msgstr "API Gateway" 77 | 78 | #: mdx.js:303 79 | msgid "MDx 文章信息卡" 80 | msgstr "MDx Posts Info Card" 81 | 82 | #: mdx.js:306 83 | #: mdx.js:330 84 | msgid "文章信息卡" 85 | msgstr "Posts Info Card" 86 | 87 | #: mdx.js:333 88 | msgid "URL" 89 | msgstr "URL" 90 | 91 | #: mdx.js:362 92 | msgid "MDx 广告" 93 | msgstr "MDx Ads" 94 | 95 | #: mdx.js:365 96 | msgid "广告" 97 | msgstr "Ad" 98 | -------------------------------------------------------------------------------- /img/social-icons/github.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Autoloader.php: -------------------------------------------------------------------------------- 1 | rootDir = dirname(__FILE__) . '/'; 14 | $nameParts = explode('_', __CLASS__, 3); 15 | $this->prefix = $nameParts[0] . '_' . $nameParts[1] . '_'; 16 | 17 | $this->libraryDir = $this->rootDir . '../..'; 18 | if ( !self::isPhar() ) { 19 | $this->libraryDir = realpath($this->libraryDir); 20 | } 21 | $this->libraryDir = $this->libraryDir . '/'; 22 | 23 | $this->staticMap = array( 24 | 'PucReadmeParser' => 'vendor/PucReadmeParser.php', 25 | 'Parsedown' => 'vendor/Parsedown.php', 26 | 'Puc_v4_Factory' => 'Puc/v4/Factory.php', 27 | ); 28 | 29 | spl_autoload_register(array($this, 'autoload')); 30 | } 31 | 32 | /** 33 | * Determine if this file is running as part of a Phar archive. 34 | * 35 | * @return bool 36 | */ 37 | private static function isPhar() { 38 | //Check if the current file path starts with "phar://". 39 | static $pharProtocol = 'phar://'; 40 | return (substr(__FILE__, 0, strlen($pharProtocol)) === $pharProtocol); 41 | } 42 | 43 | public function autoload($className) { 44 | if ( isset($this->staticMap[$className]) && file_exists($this->libraryDir . $this->staticMap[$className]) ) { 45 | /** @noinspection PhpIncludeInspection */ 46 | include ($this->libraryDir . $this->staticMap[$className]); 47 | return; 48 | } 49 | 50 | if (strpos($className, $this->prefix) === 0) { 51 | $path = substr($className, strlen($this->prefix)); 52 | $path = str_replace('_', '/', $path); 53 | $path = $this->rootDir . $path . '.php'; 54 | 55 | if (file_exists($path)) { 56 | /** @noinspection PhpIncludeInspection */ 57 | include $path; 58 | } 59 | } 60 | } 61 | } 62 | 63 | endif; 64 | -------------------------------------------------------------------------------- /gutenberg-src/src/mdx/languages/tr_TR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "Last-Translator: HASAN CAN \n" 6 | "Language-Team: CAN GROUP \n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "POT-Creation-Date: 2021-01-14T14:14:25+08:00\n" 11 | "PO-Revision-Date: 2021-01-16 17:17+0300\n" 12 | "X-Generator: Poedit 2.4.2\n" 13 | "X-Domain: mdx\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: tr_TR\n" 17 | 18 | #: mdx.js:9 19 | msgid "MDx 折叠内容" 20 | msgstr "MDx Daraltılmış İçerik" 21 | 22 | #: mdx.js:12 mdx.js:44 23 | msgid "折叠内容" 24 | msgstr "İçeriği Daralt" 25 | 26 | #: mdx.js:16 27 | msgid "被折叠内容" 28 | msgstr "Daraltılmış İçerik" 29 | 30 | #: mdx.js:37 mdx.js:111 31 | msgid "标题" 32 | msgstr "Başlık" 33 | 34 | #: mdx.js:51 35 | msgid "默认打开" 36 | msgstr "Varsayılan olarak aç" 37 | 38 | #: mdx.js:87 39 | msgid "MDx 警告内容" 40 | msgstr "MDx Uyarı İçeriği" 41 | 42 | #: mdx.js:90 mdx.js:118 43 | msgid "警告内容" 44 | msgstr "Uyarı İçeriği" 45 | 46 | #: mdx.js:94 47 | msgid "警告" 48 | msgstr "Uyarı" 49 | 50 | #: mdx.js:144 51 | msgid "MDx 进度指示器" 52 | msgstr "MDx İlerleme Göstergesi" 53 | 54 | #: mdx.js:147 55 | msgid "进度指示器" 56 | msgstr "İlerleme Göstergesi" 57 | 58 | #: mdx.js:157 59 | msgid "进度 (0-100)" 60 | msgstr "İlerleme (0-100)" 61 | 62 | #: mdx.js:179 63 | msgid "MDx Github 信息卡" 64 | msgstr "MDx GitHub Bilgi Kartı" 65 | 66 | #: mdx.js:239 67 | msgid "作者用户名" 68 | msgstr "Yazar Kullanıcı Adı" 69 | 70 | #: mdx.js:250 71 | msgid "仓库名" 72 | msgstr "Depo Adı" 73 | 74 | #: mdx.js:262 75 | msgid "API 网关" 76 | msgstr "API Geçidi" 77 | 78 | #: mdx.js:303 79 | msgid "MDx 文章信息卡" 80 | msgstr "MDx Makale Bilgi Kartı" 81 | 82 | #: mdx.js:306 mdx.js:330 83 | msgid "文章信息卡" 84 | msgstr "Makale Bilgi Kartı" 85 | 86 | #: mdx.js:333 87 | msgid "URL" 88 | msgstr "URL" 89 | 90 | #: mdx.js:362 91 | msgid "MDx 广告" 92 | msgstr "MDx Reklam" 93 | 94 | #: mdx.js:365 95 | msgid "广告" 96 | msgstr "Reklam" 97 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Theme/Package.php: -------------------------------------------------------------------------------- 1 | stylesheet = $stylesheet; 17 | $this->theme = wp_get_theme($this->stylesheet); 18 | 19 | parent::__construct($updateChecker); 20 | } 21 | 22 | public function getInstalledVersion() { 23 | return $this->theme->get('Version'); 24 | } 25 | 26 | public function getAbsoluteDirectoryPath() { 27 | if ( method_exists($this->theme, 'get_stylesheet_directory') ) { 28 | return $this->theme->get_stylesheet_directory(); //Available since WP 3.4. 29 | } 30 | return get_theme_root($this->stylesheet) . '/' . $this->stylesheet; 31 | } 32 | 33 | /** 34 | * Get the value of a specific plugin or theme header. 35 | * 36 | * @param string $headerName 37 | * @param string $defaultValue 38 | * @return string Either the value of the header, or $defaultValue if the header doesn't exist or is empty. 39 | */ 40 | public function getHeaderValue($headerName, $defaultValue = '') { 41 | $value = $this->theme->get($headerName); 42 | if ( ($headerName === false) || ($headerName === '') ) { 43 | return $defaultValue; 44 | } 45 | return $value; 46 | } 47 | 48 | protected function getHeaderNames() { 49 | return array( 50 | 'Name' => 'Theme Name', 51 | 'ThemeURI' => 'Theme URI', 52 | 'Description' => 'Description', 53 | 'Author' => 'Author', 54 | 'AuthorURI' => 'Author URI', 55 | 'Version' => 'Version', 56 | 'Template' => 'Template', 57 | 'Status' => 'Status', 58 | 'Tags' => 'Tags', 59 | 'TextDomain' => 'Text Domain', 60 | 'DomainPath' => 'Domain Path', 61 | ); 62 | } 63 | } 64 | 65 | endif; 66 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Utils.php: -------------------------------------------------------------------------------- 1 | $node) ) { 26 | $currentValue = $currentValue->$node; 27 | } else { 28 | return $default; 29 | } 30 | } 31 | 32 | return $currentValue; 33 | } 34 | 35 | /** 36 | * Get the first array element that is not empty. 37 | * 38 | * @param array $values 39 | * @param mixed|null $default Returns this value if there are no non-empty elements. 40 | * @return mixed|null 41 | */ 42 | public static function findNotEmpty($values, $default = null) { 43 | if ( empty($values) ) { 44 | return $default; 45 | } 46 | 47 | foreach ($values as $value) { 48 | if ( !empty($value) ) { 49 | return $value; 50 | } 51 | } 52 | 53 | return $default; 54 | } 55 | 56 | /** 57 | * Check if the input string starts with the specified prefix. 58 | * 59 | * @param string $input 60 | * @param string $prefix 61 | * @return bool 62 | */ 63 | public static function startsWith($input, $prefix) { 64 | $length = strlen($prefix); 65 | return (substr($input, 0, $length) === $prefix); 66 | } 67 | } 68 | 69 | endif; 70 | -------------------------------------------------------------------------------- /includes/share_oversea.php: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 |
  • 4 |
  • 5 | 6 |
  • 7 |
  • 8 | 9 |
  • -------------------------------------------------------------------------------- /js/better_comment.js: -------------------------------------------------------------------------------- 1 | window.addComment=function(s){var u,f,v,y=s.document,p={commentReplyClass:"comment-reply-link",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=s.MutationObserver||s.WebKitMutationObserver||s.MozMutationObserver,i="querySelector"in y&&"addEventListener"in s,n=!!y.documentElement.dataset;function t(){r(),function(){if(!e)return;new e(d).observe(y.body,{childList:!0,subtree:!0})}()}function r(e){if(i&&(u=I(p.cancelReplyId),f=I(p.commentFormId),u)){u.addEventListener("click",a);var t=function(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return f.removeEventListener("keydown",t),e.preventDefault(),f.submit.click(),!1};f&&f.addEventListener("keydown",t);for(var n,r=function(e){var t,n=p.commentReplyClass;e&&e.childNodes||(e=y);t=y.getElementsByClassName?e.getElementsByClassName(n):e.querySelectorAll("."+n);return t}(e),d=0,o=r.length;d $this->slug, 19 | 'new_version' => $this->version, 20 | 'url' => $this->details_url, 21 | ); 22 | 23 | if ( !empty($this->download_url) ) { 24 | $update['package'] = $this->download_url; 25 | } 26 | 27 | return $update; 28 | } 29 | 30 | /** 31 | * Create a new instance of Theme_Update from its JSON-encoded representation. 32 | * 33 | * @param string $json Valid JSON string representing a theme information object. 34 | * @return self New instance of ThemeUpdate, or NULL on error. 35 | */ 36 | public static function fromJson($json) { 37 | $instance = new self(); 38 | if ( !parent::createFromJson($json, $instance) ) { 39 | return null; 40 | } 41 | return $instance; 42 | } 43 | 44 | /** 45 | * Create a new instance by copying the necessary fields from another object. 46 | * 47 | * @param StdClass|Puc_v4p9_Theme_Update $object The source object. 48 | * @return Puc_v4p9_Theme_Update The new copy. 49 | */ 50 | public static function fromObject($object) { 51 | $update = new self(); 52 | $update->copyFields($object, $update); 53 | return $update; 54 | } 55 | 56 | /** 57 | * Basic validation. 58 | * 59 | * @param StdClass $apiResponse 60 | * @return bool|WP_Error 61 | */ 62 | protected function validateMetadata($apiResponse) { 63 | $required = array('version', 'details_url'); 64 | foreach($required as $key) { 65 | if ( !isset($apiResponse->$key) || empty($apiResponse->$key) ) { 66 | return new WP_Error( 67 | 'tuc-invalid-metadata', 68 | sprintf('The theme metadata is missing the required "%s" key.', $key) 69 | ); 70 | } 71 | } 72 | return true; 73 | } 74 | 75 | protected function getFieldNames() { 76 | return array_merge(parent::getFieldNames(), self::$extraFields); 77 | } 78 | 79 | protected function getPrefixedFilter($tag) { 80 | return parent::getPrefixedFilter($tag) . '_theme'; 81 | } 82 | } 83 | 84 | endif; 85 | -------------------------------------------------------------------------------- /template-parts/content-2.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    4 |

    5 |
    6 | 32 |    33 | ID);}else if($mdx_more_1=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_1=='time'){the_time('Y-m-d');}?> 34 | ID);}else if($mdx_more_2=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_2=='time'){the_time('Y-m-d');}?> 35 | ID);}else if($mdx_more_3=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_3=='time'){the_time('Y-m-d');}?> 36 | 37 | 38 |
    39 |
    40 | -------------------------------------------------------------------------------- /template-parts/content-first-2.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    4 |

    5 |
    6 | 32 |    33 | ID);}else if($mdx_more_1=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_1=='time'){the_time('Y-m-d');}?> 34 | ID);}else if($mdx_more_2=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_2=='time'){the_time('Y-m-d');}?> 35 | ID);}else if($mdx_more_3=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_3=='time'){the_time('Y-m-d');}?> 36 | 37 | 38 |
    39 |
    40 | -------------------------------------------------------------------------------- /includes/toggleposts.php: -------------------------------------------------------------------------------- 1 | 5 | 25 | 26 | 40 | 41 | 54 | -------------------------------------------------------------------------------- /src/login.js: -------------------------------------------------------------------------------- 1 | import ele from './tools/ele.js'; 2 | 3 | __webpack_public_path__ = window.mdxPublicPath; 4 | 5 | window.addEventListener('DOMContentLoaded', () => { 6 | ele("#loginform, #login_error, .message, #lostpasswordform, #registerform", (e) => { e.classList.add("mdui-card") }); 7 | ele("#user_login").classList.add("mdui-textfield-input"); 8 | if (ele("#loginform", null, "array").length > 0) { 9 | ele("#loginform").getElementsByTagName("p")[0].classList.add("mdui-textfield"); 10 | for (let e of ele("#loginform").getElementsByTagName("p")[0].getElementsByTagName("label")) { 11 | e.classList.add("mdui-textfield-label"); 12 | } 13 | } 14 | if (ele("#lostpasswordform", null, "array").length > 0) { 15 | ele("#lostpasswordform").getElementsByTagName("p")[0].classList.add("mdui-textfield"); 16 | for (let e of ele("#lostpasswordform").getElementsByTagName("p")[0].getElementsByTagName("label")) { 17 | e.classList.add("mdui-textfield-label"); 18 | } 19 | } 20 | if (ele("#registerform", null, "array").length > 0) { 21 | ele("#registerform").getElementsByTagName("p")[0].classList.add("mdui-textfield"); 22 | for (let e of ele("#registerform").getElementsByTagName("p")[0].getElementsByTagName("label")) { 23 | e.classList.add("mdui-textfield-label"); 24 | } 25 | ele("#registerform").getElementsByTagName("p")[1].classList.add("mdui-textfield"); 26 | for (let e of ele("#registerform").getElementsByTagName("p")[1].querySelectorAll("input#user_email")) { 27 | e.classList.add("mdui-textfield-input"); 28 | } 29 | for (let e of ele("#registerform").getElementsByTagName("p")[1].getElementsByTagName("label")) { 30 | e.classList.add("mdui-textfield-label"); 31 | } 32 | } 33 | ele("#user_pass, #authcode", (e) => { e.classList.add("mdui-textfield-input") }); 34 | if (ele("form[name='loginform']", null, "array").length > 0) { 35 | for (let e of ele("form[name='loginform']").getElementsByClassName("user-pass-wrap")) { 36 | e.appendChild(ele("#user_pass")); 37 | e.classList.add("mdui-textfield"); 38 | for (let el of e.getElementsByTagName("label")) { 39 | el.classList.add("mdui-textfield-label") 40 | } 41 | } 42 | } 43 | if (ele("form[name='loginform'] #rememberme", null, "array").length > 0) { 44 | ele("form[name='loginform'] #rememberme").insertAdjacentHTML('afterend', ''); 45 | } 46 | if (ele(".forgetmenot", null, "array").length > 0) { 47 | ele(".mdui-checkbox-icon").insertAdjacentHTML('afterend', `${ele(".forgetmenot").getElementsByTagName("label")[0].innerText}`); 48 | } 49 | ele(".forgetmenot", (e) => { 50 | e.removeChild(e.getElementsByTagName("label")[0]); 51 | e.insertAdjacentHTML('afterend', ``); 52 | e.parentNode.removeChild(e); 53 | }) 54 | ele(".mdui-checkbox", (e) => { e.classList.add("forgetmenot") }); 55 | ele("#wp-submit, #submit", (e) => { e.classList.add("mdui-btn", "mdui-btn-raised") }); 56 | mdui.mutation(); 57 | }) -------------------------------------------------------------------------------- /README/zh_CN.md: -------------------------------------------------------------------------------- 1 |
    Language: English | Chinese | Turkish
    2 | 3 |
    4 | 5 |

    6 | MDx 7 |

    8 | 9 |

    MDx

    10 | 11 | > 轻于形,悦于心 12 | 13 |

    14 | Version 15 | Author 16 | WordPress 17 | Download 18 | License 19 | 20 |

    21 | 22 | 23 | ## 目录 24 | 25 | - [目录](#%e7%9b%ae%e5%bd%95) 26 | - [介绍](#%e4%bb%8b%e7%bb%8d) 27 | - [演示](#%e6%bc%94%e7%a4%ba) 28 | - [下载](#%e4%b8%8b%e8%bd%bd) 29 | - [国际化](#%e5%9b%bd%e9%99%85%e5%8c%96) 30 | - [文档](#%e6%96%87%e6%a1%a3) 31 | - [许可证](#%e8%ae%b8%e5%8f%af%e8%af%81) 32 | - [渲染](#%e6%b8%b2%e6%9f%93) 33 | 34 | 35 | ## 介绍 36 | 37 | MDx,一款轻快、优雅且强大的 Material Design 风格 WordPress 主题。 38 | 39 | 特性: 40 | 41 | - 完全的 Material Design 风格,每一个像素都赏心悦目,还有可选的 Material Design 2 风格 42 | - 4 种首页样式,5 种文章列表样式,3 种页脚样式 & 4 种文章页样式随意切换 43 | - 20 种主题颜色 & 16 种强调色随心搭配 44 | - 不仅有夜间模式和黑暗主题,更有专为 OLED 屏幕优化的样式可选 45 | - SEO 友好,支持 Facebook / Twitter 结构化卡片分享 46 | - 优雅轻量,Pagespeed 99% & YSlow score 98%(基于最小安装测试) 47 | - 无 jQuery 依赖 48 | - 一键生成分享图片,分享文章更美观 49 | - 内置文章目录功能 50 | - 内置简单的图片灯箱 51 | - 内置 7 种短代码,与主题样式完美契合 52 | - 多语言支持(简体中文、正体中文(台湾)、繁体中文(香港)、土耳其语及英语) 53 | - ✨ 交互式搜索,搜索栏会随用户输入实时反馈搜索结果 54 | - ✨ 不仅可以生成当前页面二维码,方便地转移到其他设备上阅读,还可以在转移时同步阅读进度 55 | 56 | ## 演示 57 | 58 | - [MDx Blog](https://mdxblog.flyhigher.top) 59 | - [无垠](https://flyhigher.top) 60 | 61 | 62 | ## 下载 63 | 64 | 你可以前往 [这里](https://mdx.flyhigher.top) 下载 MDx。 65 | 66 | 你也可以前往 [Releases](https://github.com/yrccondor/mdx/releases) 页下载 MDx。**请不要为了下载而 `clone` 这个仓库。** 67 | 68 | 69 | ## 国际化 70 | 71 | MDx 支持多语言,默认语言为简体中文。 72 | 73 | 支持的语言如下: 74 | 75 | - 简体中文 76 | - 土耳其语(感谢 [Hasan CAN](https://github.com/Sn0bzy)) 77 | - 英语(感谢 [Ye Shu](https://github.com/yechs)) 78 | - 正体中文(台湾) (感谢 [AngelKitty](https://github.com/AngelKitty)) 79 | - 繁体中文(香港) 80 | 81 | > 非常欢迎你帮助我们将 MDx 翻译至其他语言! 82 | 83 | 84 | ## 文档 85 | 86 | [MDx 主题文档](https://doc.flyhigher.top/mdx/) 87 | 88 | 89 | ## 许可证 90 | 91 | License 92 | 93 | 根据 GPL V3.0 许可证开源。 94 | 95 | 96 | ## 渲染 97 | 98 | ![](https://acdn.flyhigher.top/wp-content/uploads/2017/11/det.jpg) -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/OAuthSignature.php: -------------------------------------------------------------------------------- 1 | consumerKey = $consumerKey; 14 | $this->consumerSecret = $consumerSecret; 15 | } 16 | 17 | /** 18 | * Sign a URL using OAuth 1.0. 19 | * 20 | * @param string $url The URL to be signed. It may contain query parameters. 21 | * @param string $method HTTP method such as "GET", "POST" and so on. 22 | * @return string The signed URL. 23 | */ 24 | public function sign($url, $method = 'GET') { 25 | $parameters = array(); 26 | 27 | //Parse query parameters. 28 | $query = parse_url($url, PHP_URL_QUERY); 29 | if ( !empty($query) ) { 30 | parse_str($query, $parsedParams); 31 | if ( is_array($parameters) ) { 32 | $parameters = $parsedParams; 33 | } 34 | //Remove the query string from the URL. We'll replace it later. 35 | $url = substr($url, 0, strpos($url, '?')); 36 | } 37 | 38 | $parameters = array_merge( 39 | $parameters, 40 | array( 41 | 'oauth_consumer_key' => $this->consumerKey, 42 | 'oauth_nonce' => $this->nonce(), 43 | 'oauth_signature_method' => 'HMAC-SHA1', 44 | 'oauth_timestamp' => time(), 45 | 'oauth_version' => '1.0', 46 | ) 47 | ); 48 | unset($parameters['oauth_signature']); 49 | 50 | //Parameters must be sorted alphabetically before signing. 51 | ksort($parameters); 52 | 53 | //The most complicated part of the request - generating the signature. 54 | //The string to sign contains the HTTP method, the URL path, and all of 55 | //our query parameters. Everything is URL encoded. Then we concatenate 56 | //them with ampersands into a single string to hash. 57 | $encodedVerb = urlencode($method); 58 | $encodedUrl = urlencode($url); 59 | $encodedParams = urlencode(http_build_query($parameters, '', '&')); 60 | 61 | $stringToSign = $encodedVerb . '&' . $encodedUrl . '&' . $encodedParams; 62 | 63 | //Since we only have one OAuth token (the consumer secret) we only have 64 | //to use it as our HMAC key. However, we still have to append an & to it 65 | //as if we were using it with additional tokens. 66 | $secret = urlencode($this->consumerSecret) . '&'; 67 | 68 | //The signature is a hash of the consumer key and the base string. Note 69 | //that we have to get the raw output from hash_hmac and base64 encode 70 | //the binary data result. 71 | $parameters['oauth_signature'] = base64_encode(hash_hmac('sha1', $stringToSign, $secret, true)); 72 | 73 | return ($url . '?' . http_build_query($parameters)); 74 | } 75 | 76 | /** 77 | * Generate a random nonce. 78 | * 79 | * @return string 80 | */ 81 | private function nonce() { 82 | $mt = microtime(); 83 | 84 | $rand = null; 85 | if ( is_callable('random_bytes') ) { 86 | try { 87 | $rand = random_bytes(16); 88 | } catch (Exception $ex) { 89 | //Fall back to mt_rand (below). 90 | } 91 | } 92 | if ( $rand === null ) { 93 | $rand = mt_rand(); 94 | } 95 | 96 | return md5($mt . '_' . $rand); 97 | } 98 | } 99 | 100 | endif; 101 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/InstalledPackage.php: -------------------------------------------------------------------------------- 1 | updateChecker = $updateChecker; 18 | } 19 | 20 | /** 21 | * Get the currently installed version of the plugin or theme. 22 | * 23 | * @return string|null Version number. 24 | */ 25 | abstract public function getInstalledVersion(); 26 | 27 | /** 28 | * Get the full path of the plugin or theme directory (without a trailing slash). 29 | * 30 | * @return string 31 | */ 32 | abstract public function getAbsoluteDirectoryPath(); 33 | 34 | /** 35 | * Check whether a regular file exists in the package's directory. 36 | * 37 | * @param string $relativeFileName File name relative to the package directory. 38 | * @return bool 39 | */ 40 | public function fileExists($relativeFileName) { 41 | return is_file( 42 | $this->getAbsoluteDirectoryPath() 43 | . DIRECTORY_SEPARATOR 44 | . ltrim($relativeFileName, '/\\') 45 | ); 46 | } 47 | 48 | /* ------------------------------------------------------------------- 49 | * File header parsing 50 | * ------------------------------------------------------------------- 51 | */ 52 | 53 | /** 54 | * Parse plugin or theme metadata from the header comment. 55 | * 56 | * This is basically a simplified version of the get_file_data() function from /wp-includes/functions.php. 57 | * It's intended as a utility for subclasses that detect updates by parsing files in a VCS. 58 | * 59 | * @param string|null $content File contents. 60 | * @return string[] 61 | */ 62 | public function getFileHeader($content) { 63 | $content = (string)$content; 64 | 65 | //WordPress only looks at the first 8 KiB of the file, so we do the same. 66 | $content = substr($content, 0, 8192); 67 | //Normalize line endings. 68 | $content = str_replace("\r", "\n", $content); 69 | 70 | $headers = $this->getHeaderNames(); 71 | $results = array(); 72 | foreach ($headers as $field => $name) { 73 | $success = preg_match('/^[ \t\/*#@]*' . preg_quote($name, '/') . ':(.*)$/mi', $content, $matches); 74 | 75 | if ( ($success === 1) && $matches[1] ) { 76 | $value = $matches[1]; 77 | if ( function_exists('_cleanup_header_comment') ) { 78 | $value = _cleanup_header_comment($value); 79 | } 80 | $results[$field] = $value; 81 | } else { 82 | $results[$field] = ''; 83 | } 84 | } 85 | 86 | return $results; 87 | } 88 | 89 | /** 90 | * @return array Format: ['HeaderKey' => 'Header Name'] 91 | */ 92 | abstract protected function getHeaderNames(); 93 | 94 | /** 95 | * Get the value of a specific plugin or theme header. 96 | * 97 | * @param string $headerName 98 | * @return string Either the value of the header, or an empty string if the header doesn't exist. 99 | */ 100 | abstract public function getHeaderValue($headerName); 101 | 102 | } 103 | endif; 104 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const webpack = require('webpack'); 3 | const MiniCssExtractPlugin = require('mini-css-extract-plugin'); 4 | 5 | const mdxVersion = '2.0.4'; 6 | 7 | module.exports = { 8 | entry: { 9 | js: './src/js.js', 10 | post: './src/post.js', 11 | page: './src/page.js', 12 | search: './src/search.js', 13 | ac: './src/ac.js', 14 | toc: './src/toc.js', 15 | login: './src/login.js' 16 | }, 17 | output: { 18 | filename: '[name].js', 19 | path: path.resolve(__dirname, 'js'), 20 | chunkFilename: '[name].js' 21 | }, 22 | optimization: { 23 | splitChunks: { 24 | cacheGroups: { 25 | common: { 26 | name: 'common', 27 | chunks (chunk) { 28 | return chunk.name !== 'login'; 29 | }, 30 | minSize: 10, 31 | minChunks: 2 32 | } 33 | } 34 | } 35 | }, 36 | // devtool: 'source-map', 37 | mode: 'production', 38 | module: { 39 | rules: [ 40 | { 41 | test: /\.(less|css)$/, 42 | use: [ 43 | 'cache-loader', 44 | MiniCssExtractPlugin.loader, 45 | { 46 | loader: 'css-loader', 47 | options: { 48 | importLoaders: 2 49 | } 50 | }, 51 | 'postcss-loader', 52 | 'less-loader' 53 | ], 54 | }, 55 | { 56 | test: /\.js$/, 57 | use: [ 58 | 'cache-loader', 59 | 'babel-loader' 60 | ], 61 | exclude: /(node_modules|bower_components)/ 62 | }, 63 | { 64 | test: /\.(png|svg|jpg|gif)$/, 65 | use: [ 66 | { 67 | loader: 'file-loader', 68 | options: { 69 | outputPath: '../img/social-icons', 70 | publicPath: './img/social-icons', 71 | name: '[name].[ext]', 72 | } 73 | } 74 | ] 75 | }, 76 | { 77 | test: /\.(woff|woff2|eot|ttf|otf)$/, 78 | use: [ 79 | { 80 | loader: 'file-loader', 81 | options: { 82 | outputPath: '../fonts/', 83 | name: '[name].[ext]', 84 | } 85 | } 86 | ] 87 | } 88 | ] 89 | }, 90 | plugins: [ 91 | new MiniCssExtractPlugin({ 92 | filename: '../style.css' 93 | }), 94 | new webpack.BannerPlugin({ 95 | banner: `/* 96 | Theme Name: MDx 97 | Theme URI: https://flyhigher.top/develop/788.html 98 | Description: MDx - Material Design 风格的 WordPress 主题 99 | Version: ${mdxVersion} 100 | Author: AxtonYao 101 | Author URI: https://flyhigher.top 102 | Tags: Material Design, Personal Blog, Simple Theme 103 | Text Domain: mdx 104 | Domain Path: /languages 105 | */`, 106 | test: /\.css$/, 107 | raw: true 108 | }) 109 | ] 110 | }; -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | '.alu_get_wpsmiliestrans().''; 13 | $mdx_emj_cla = ' mdx-emj-inp'; 14 | $mdx_emj_ele = ''; 15 | }else{ 16 | $mdx_alu = ''; 17 | $mdx_emj_cla = ''; 18 | $mdx_emj_ele = ''; 19 | }?> 20 | '', 24 | 'label_submit'=>isset($submit_text) ? esc_attr($submit_text) : __('发射', 'mdx'), 25 | 'comment_notes_after'=>'', 26 | 'id_form'=>'commentform', 27 | 'cancel_reply_link'=>__('取消回复', 'mdx'), 28 | 'comment_field'=>'
    textsms
    '.$mdx_emj_ele.$mdx_alu, 29 | 'fields'=>apply_filters('comment_form_default_fields', array( 30 | 'author'=>'
    account_circle
    ', 31 | 32 | 'email'=>'
    email
    ', 33 | 34 | 'url'=>'
    ', 35 | ))); 36 | comment_form($defaults); 37 | 38 | endif;?> 39 | 40 | 41 |
    42 | 43 |
      44 | 45 |
    46 | 47 | 48 | 51 | 52 |
    53 |
    54 | 55 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 2 | mdui-theme-primary- mdui-theme-accent- mdui-theme-layout-dark mdx-always-dark mdx-md2-font mdx-reduce-motion"> 3 | 4 | 10 | 11 |
    12 | 404 13 |
    14 |
    15 |
    16 | 17 | 18 |
    19 |
    20 | 21 | -------------------------------------------------------------------------------- /js/search.js: -------------------------------------------------------------------------------- 1 | !function(e){function t(t){for(var r,o,a=t[0],l=t[1],c=t[2],d=0,p=[];d{!function(e,t){sessionStorage.getItem("rtsk_"+e)||(sessionStorage.length>=100?(sessionStorage.removeItem(sessionStorage.key(0)),sessionStorage.setItem("rtsk_"+e,t)):sessionStorage.setItem("rtsk_"+e,t))}(s,JSON.stringify(e)),h(e,!1),a=!1}).catch(()=>{mdui.snackbar({message:snackMuti,timeout:3e3,position:"top"}),sessionStorage.setItem("rts_wra","false"),a=!1})),o=s):""==s&&(Object(i.a)(".OutOfsearchBox").innerHTML=p?`
    ${tipMutiOff}
    `:'
    ',o=s)),d||(u=window.requestAnimationFrame(f))}function h(e,t){let n=e;t&&(n=JSON.parse(e)),Object(i.a)(".OutOfsearchBox").innerHTML='
    ';let r=Object(i.a)(".seainput").value;if("Axton"!==r&&"axton"!==r&&"无垠"!==r&&"flyhigher"!==r&&"Flyhigher"!==r||n.unshift({title:{rendered:"无垠"},date:"Forever",link:"https://flyhigher.top",excerpt:{rendered:"飞翔的天空无限大"}}),n.length>0){let e="";for(let t=0;t

    ${r}

    ${n[t].excerpt.rendered.replace(" […]","…").replace("

    ","").replace("

    ","")}

       ${i.substring(0,10)}${moreMuti}`}Object(i.a)(".OutOfsearchBox").innerHTML+=e}10==n.length&&(Object(i.a)(".OutOfsearchBox").innerHTML+=`
    ${tipMuti}
    `)}Object(i.a)(".seainput").addEventListener("focus",(function(){"false"==sessionStorage.getItem("rts_wra")&&mdui.snackbar({message:snackMuti,timeout:3e3,position:"top"}),d=!1,window.requestAnimationFrame(f)})),Object(i.a)(".seainput").addEventListener("blur",(function(){d=!0,window.cancelAnimationFrame(u)}))}}); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
    Language: English | Chinese | Turkish
    2 | 3 |
    4 | 5 |

    6 | MDx 7 |

    8 | 9 |

    MDx

    10 | 11 | > Looks light, power inside. 12 | 13 |

    14 | Version 15 | Author 16 | WordPress 17 | Download 18 | License 19 | 20 |

    21 | 22 | 23 | ## Contents 24 | 25 | - [Contents](#contents) 26 | - [Introduction](#introduction) 27 | - [Demo](#demo) 28 | - [Download](#download) 29 | - [Internationalization](#internationalization) 30 | - [Docs](#docs) 31 | - [License](#license) 32 | - [Render](#render) 33 | 34 | 35 | ## Introduction 36 | 37 | MDx: a light, elegent and powerful WordPress theme with Material Design. 38 | 39 | Key features: 40 | 41 | - Completely designed in Material Design with optional Material Design 2 style 42 | - 4 index styles, 5 post list styles, 3 footer styles & 4 page styles 43 | - 20 theme colors & 16 accent colors 44 | - Night mode and Always-Dark mode with optional OLED optimization 45 | - SEO friendly, easily share on Facebook / Twitter 46 | - Fast and light, Pagespeed score 99% & YSlow score 98% (Based on minimized installation) 47 | - No jQuery dependency 48 | - Share your work with the beautiful share card 49 | - Built-in TOC 50 | - Built-in image light box 51 | - 7 built-in shortcodes 52 | - Multi-language support (Simplified Chinese, Traditional Chinese(Taiwan), Traditional Chinese(Hong Kong), Turkish & English) 53 | - ✨ Interactive search 54 | - ✨ Easily continue reading cross-platformly 55 | 56 | 57 | ## Demo 58 | 59 | - [MDx Blog](https://mdxblog.flyhigher.top) 60 | - [Flyhigher](https://flyhigher.top) 61 | 62 | 63 | ## Download 64 | 65 | You can download MDx [HERE](https://mdx.flyhigher.top). 66 | 67 | You can also download MDx from [Releases](https://github.com/yrccondor/mdx/releases). **DO NOT `clone` this repository just for downloading.** 68 | 69 | 70 | ## Internationalization 71 | 72 | MDx supports multi-language. Default language is simplified Chinese. 73 | 74 | Supported language(s): 75 | 76 | - Chinese (Simplified) 77 | - Turkish (Thanks [Hasan CAN](https://github.com/Sn0bzy)) 78 | - English (Thanks [Ye Shu](https://github.com/yechs)) 79 | - Traditional Chinese(Taiwan) (Thanks [AngelKitty](https://github.com/AngelKitty)) 80 | - Traditional Chinese(Hong Kong) 81 | 82 | > You can help us to translate MDx into other languages! 83 | 84 | 85 | ## Docs 86 | 87 | [MDx Docs](https://doc.flyhigher.top/mdx/) 88 | 89 | > English Docs are being translated. 90 | 91 | 92 | ## License 93 | 94 | License 95 | 96 | Open sourced under the GPL v3.0 license. 97 | 98 | 99 | ## Render 100 | 101 | ![](https://acdn.flyhigher.top/wp-content/uploads/2017/11/det.jpg) -------------------------------------------------------------------------------- /README/tr_TR.md: -------------------------------------------------------------------------------- 1 |
    Language: English | Chinese | Turkish
    2 | 3 |
    4 | 5 |

    6 | MDx 7 |

    8 | 9 |

    MDx

    10 | 11 | > Basit görünüşlü, güçlü. 12 | 13 |

    14 | Version 15 | Author 16 | WordPress 17 | Download 18 | License 19 | 20 |

    21 | 22 | 23 | ## İçerikler 24 | 25 | - [İçerikler](#i̇çerikler) 26 | - [Tanıtım](#tanıtım) 27 | - [Demo](#demo) 28 | - [İndir](#i̇ndir) 29 | - [Globalleştirme](#globalleştirme) 30 | - [Dökümanlar](#dökümanlar) 31 | - [Lisans](#lisans) 32 | - [Çıktı](#çıktı) 33 | 34 | 35 | ## Tanıtım 36 | 37 | MDx: hafif, zarif ve güçlü Materyal Tasarım ile donatılmış WordPress teması. 38 | 39 | Öne Çıkan ÖZellikler: 40 | 41 | - Tamamen Materyal Tasarım ile tasarlandı, isteğe bağlı Materyal Tasarım 2 kullanılabilir. 42 | - 4 anasayfa stili, 5 gönderi stili, 3 footer stili & 4 sayfa stili 43 | - 20 tema rengi & 16 vurgu rengi 44 | - Gece modu ve daima koyu mod özellikleri isteğe bağlı ayarlanabilir 45 | - SEO dostu, Facebook ve Twitter'da kolay paylaşım 46 | - Hızlı ve hafif, Pagespeed puanı 99% & YSlow puanı 98% (Küçültülmüş kurulumla test edildi) 47 | - jQuery bağımlılığı yok 48 | - İşinizi güzel paylaşım kartları ile paylaşma 49 | - Yerleşik TOC 50 | - Yerleşik lightbox 51 | - 7 adet yerleşik kısakod 52 | - Çoklu dil desteği (Basitleştirilmiş Çince, Geleneksel Çince(Tayvan), Geleneksel Çince(Hong Kong), Türkçe & İngilizce) 53 | - ✨ İnteraktif arama 54 | - ✨ Çarpraz platformlarda kolayca okumaya devam etme 55 | 56 | 57 | ## Demo 58 | 59 | - [MDx Blog](https://mdxblog.flyhigher.top) 60 | - [Flyhigher - Çince Demo](https://flyhigher.top) 61 | - [Hasan Can - Türkçe Demo](https://hasan.im) 62 | 63 | 64 | ## İndir 65 | 66 | MDx'i [buradan](https://mdx.flyhigher.top) indirebilirsiniz. 67 | 68 | Dilerseniz MDx'i [sürümler](https://github.com/yrccondor/mdx/releases)den indirebilirsiniz. **Bu depoyu yalnızca indirmek için `klonlamayın`** 69 | 70 | 71 | ## Globalleştirme 72 | 73 | MDx çoklu dil desteklemektedir. Varsayılan dil Çince(Basitleştirilmiş)'dir. 74 | 75 | Desteklenen dil(ler): 76 | 77 | - Çince (Basitleştirilmiş) 78 | - Türkçe ([Hasan CAN](https://github.com/Sn0bzy) tarafından) 79 | - İngilizce ([Ye Shu](https://github.com/yechs) tarafından) 80 | - Geleneksel Çince(Tayvan) ([AngelKitty](https://github.com/AngelKitty) tarafından) 81 | - Geleneksel Çince(Hong Kong) 82 | 83 | > MDx'i diğer dillere çevirmemize yardımcı olabilirsiniz! 84 | 85 | 86 | ## Dökümanlar 87 | 88 | [MDx Dökümanları (Çince)](https://doc.flyhigher.top/mdx/) 89 | 90 | > İngilizce ve Türkçe dökümanlar oluşturuluyor. 91 | 92 | 93 | ## Lisans 94 | 95 | Lisans 96 | 97 | GPL 3.0 altında açık kaynak olarak lisanslanmıştır. 98 | 99 | 100 | ## Çıktı 101 | 102 | ![](https://acdn.flyhigher.top/wp-content/uploads/2017/11/det.jpg) 103 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Metadata.php: -------------------------------------------------------------------------------- 1 | validateMetadata($apiResponse); 40 | if ( is_wp_error($valid) ){ 41 | do_action('puc_api_error', $valid); 42 | trigger_error($valid->get_error_message(), E_USER_NOTICE); 43 | return false; 44 | } 45 | 46 | foreach(get_object_vars($apiResponse) as $key => $value){ 47 | $target->$key = $value; 48 | } 49 | 50 | return true; 51 | } 52 | 53 | /** 54 | * No validation by default! Subclasses should check that the required fields are present. 55 | * 56 | * @param StdClass $apiResponse 57 | * @return bool|WP_Error 58 | */ 59 | protected function validateMetadata(/** @noinspection PhpUnusedParameterInspection */ $apiResponse) { 60 | return true; 61 | } 62 | 63 | /** 64 | * Create a new instance by copying the necessary fields from another object. 65 | * 66 | * @abstract 67 | * @param StdClass|self $object The source object. 68 | * @return self The new copy. 69 | */ 70 | public static function fromObject(/** @noinspection PhpUnusedParameterInspection */ $object) { 71 | throw new LogicException('The ' . __METHOD__ . ' method must be implemented by subclasses'); 72 | } 73 | 74 | /** 75 | * Create an instance of StdClass that can later be converted back to an 76 | * update or info container. Useful for serialization and caching, as it 77 | * avoids the "incomplete object" problem if the cached value is loaded 78 | * before this class. 79 | * 80 | * @return StdClass 81 | */ 82 | public function toStdClass() { 83 | $object = new stdClass(); 84 | $this->copyFields($this, $object); 85 | return $object; 86 | } 87 | 88 | /** 89 | * Transform the metadata into the format used by WordPress core. 90 | * 91 | * @return object 92 | */ 93 | abstract public function toWpFormat(); 94 | 95 | /** 96 | * Copy known fields from one object to another. 97 | * 98 | * @param StdClass|self $from 99 | * @param StdClass|self $to 100 | */ 101 | protected function copyFields($from, $to) { 102 | $fields = $this->getFieldNames(); 103 | 104 | if ( property_exists($from, 'slug') && !empty($from->slug) ) { 105 | //Let plugins add extra fields without having to create subclasses. 106 | $fields = apply_filters($this->getPrefixedFilter('retain_fields') . '-' . $from->slug, $fields); 107 | } 108 | 109 | foreach ($fields as $field) { 110 | if ( property_exists($from, $field) ) { 111 | $to->$field = $from->$field; 112 | } 113 | } 114 | } 115 | 116 | /** 117 | * @return string[] 118 | */ 119 | protected function getFieldNames() { 120 | return array(); 121 | } 122 | 123 | /** 124 | * @param string $tag 125 | * @return string 126 | */ 127 | protected function getPrefixedFilter($tag) { 128 | return 'puc_' . $tag; 129 | } 130 | } 131 | 132 | endif; 133 | -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Vcs/ThemeUpdateChecker.php: -------------------------------------------------------------------------------- 1 | api = $api; 27 | $this->api->setHttpFilterName($this->getUniqueName('request_update_options')); 28 | 29 | parent::__construct($api->getRepositoryUrl(), $stylesheet, $customSlug, $checkPeriod, $optionName); 30 | 31 | $this->api->setSlug($this->slug); 32 | } 33 | 34 | public function requestUpdate() { 35 | $api = $this->api; 36 | $api->setLocalDirectory($this->package->getAbsoluteDirectoryPath()); 37 | 38 | $update = new Puc_v4p9_Theme_Update(); 39 | $update->slug = $this->slug; 40 | 41 | //Figure out which reference (tag or branch) we'll use to get the latest version of the theme. 42 | $updateSource = $api->chooseReference($this->branch); 43 | if ( $updateSource ) { 44 | $ref = $updateSource->name; 45 | $update->download_url = $updateSource->downloadUrl; 46 | } else { 47 | do_action( 48 | 'puc_api_error', 49 | new WP_Error( 50 | 'puc-no-update-source', 51 | 'Could not retrieve version information from the repository. ' 52 | . 'This usually means that the update checker either can\'t connect ' 53 | . 'to the repository or it\'s configured incorrectly.' 54 | ), 55 | null, null, $this->slug 56 | ); 57 | $ref = $this->branch; 58 | } 59 | 60 | //Get headers from the main stylesheet in this branch/tag. Its "Version" header and other metadata 61 | //are what the WordPress install will actually see after upgrading, so they take precedence over releases/tags. 62 | $remoteHeader = $this->package->getFileHeader($api->getRemoteFile('style.css', $ref)); 63 | $update->version = Puc_v4p9_Utils::findNotEmpty(array( 64 | $remoteHeader['Version'], 65 | Puc_v4p9_Utils::get($updateSource, 'version'), 66 | )); 67 | 68 | //The details URL defaults to the Theme URI header or the repository URL. 69 | $update->details_url = Puc_v4p9_Utils::findNotEmpty(array( 70 | $remoteHeader['ThemeURI'], 71 | $this->package->getHeaderValue('ThemeURI'), 72 | $this->metadataUrl, 73 | )); 74 | 75 | if ( empty($update->version) ) { 76 | //It looks like we didn't find a valid update after all. 77 | $update = null; 78 | } 79 | 80 | $update = $this->filterUpdateResult($update); 81 | return $update; 82 | } 83 | 84 | //FIXME: This is duplicated code. Both theme and plugin subclasses that use VCS share these methods. 85 | 86 | public function setBranch($branch) { 87 | $this->branch = $branch; 88 | return $this; 89 | } 90 | 91 | public function setAuthentication($credentials) { 92 | $this->api->setAuthentication($credentials); 93 | return $this; 94 | } 95 | 96 | public function getVcsApi() { 97 | return $this->api; 98 | } 99 | 100 | public function getUpdate() { 101 | $update = parent::getUpdate(); 102 | 103 | if ( isset($update) && !empty($update->download_url) ) { 104 | $update->download_url = $this->api->signDownloadUrl($update->download_url); 105 | } 106 | 107 | return $update; 108 | } 109 | 110 | public function onDisplayConfiguration($panel) { 111 | parent::onDisplayConfiguration($panel); 112 | $panel->row('Branch', $this->branch); 113 | $panel->row('Authentication enabled', $this->api->isAuthenticationEnabled() ? 'Yes' : 'No'); 114 | $panel->row('API client', get_class($this->api)); 115 | } 116 | } 117 | 118 | endif; 119 | -------------------------------------------------------------------------------- /includes/default_value.php: -------------------------------------------------------------------------------- 1 | 'normal', 4 | 'mdx_night_style' => 'true', 5 | 'mdx_auto_night_style' => 'system', 6 | 'mdx_notice' => '', 7 | 'mdx_open_side' => 'true', 8 | 'mdx_widget' => 'false', 9 | 'mdx_cookie' => '', 10 | 'mdx_allow_scale' => 'true', 11 | 'mdx_reduce_motion' => 'true', 12 | 'mdx_img_box' => 'true', 13 | 'mdx_img_box_show_alt' => 'true', 14 | 'mdx_img_box_opacity' => 'false', 15 | "mdx_readmore" => __('去围观','mdx'), 16 | "mdx_post_money" => '', 17 | 'mdx_read_pro' => 'true', 18 | 'mdx_pro_save' => 'true', 19 | 'mdx_auto_scroll' => 'false', 20 | 'mdx_click_status' => 'false', 21 | 'mdx_toc' => 'true', 22 | 'mdx_toc_preview' => 'true', 23 | 'mdx_load_pro' => 'true', 24 | 'mdx_post_list_click_area' => 'title', 25 | 'mdx_post_list_1' => 'view', 26 | 'mdx_post_list_2' => 'time', 27 | 'mdx_post_list_3' => 'blank', 28 | 'mdx_post_edit_time' => 'post', 29 | 'mdx_author_card' => 'false', 30 | "mdx_lazy_load_mode" => 'speed', 31 | 'mdx_lazyload_fallback' => 'false', 32 | 'mdx_enhanced_ajax' => 'true', 33 | 'mdx_speed_pre' => 'false', 34 | 'mdx_share_area' => 'all', 35 | 'mdx_share_twitter_card' => 'summary', 36 | 'mdx_share_twitter_username' => '', 37 | 'mdx_share_image' => '', 38 | 'mdx_hot_posts' => 'false', 39 | 'mdx_hot_posts_get' => 'cat', 40 | 'mdx_hot_posts_num' => '10', 41 | 'mdx_hot_posts_cat' => '', 42 | 'mdx_hot_posts_text' => __('推荐文章','mdx'), 43 | 'mdx_all_posts_text' => __('最新文章','mdx'), 44 | 'mdx_you_may_like' => 'false', 45 | 'mdx_you_may_like_num' => '5', 46 | 'mdx_you_may_like_way' => 'tag', 47 | 'mdx_you_may_like_text' => __('推荐文章','mdx'), 48 | 'mdx_real_search' => 'false', 49 | 'mdx_submit_comment' => __('发送','mdx'), 50 | 'mdx_comment_ajax' => 'true', 51 | 'mdx_comment_emj' => 'true', 52 | 'mdx_ad' => '', 53 | 'mdx_logged_in_ad' => 'false', 54 | 'mdx_seo_key' => '', 55 | 'mdx_auto_des' => 'true', 56 | 'mdx_seo_des' => '', 57 | 'mdx_head_js' => '', 58 | 'mdx_footer_js' => '', 59 | 'mdx_icp_num' => !empty(get_option('zh_cn_l10n_icp_num')) ? get_option('zh_cn_l10n_icp_num') : '', 60 | 'mdx_wangan_num' => '', 61 | 'mdx_use_cdn' => 'none', 62 | 'mdx_custom_cdn_root' => '', 63 | 'mdx_jquery' => 'false', 64 | 65 | 'mdx_styles' => 'indigo', 66 | 'mdx_styles_hex' => '#3f51b5', 67 | 'mdx_styles_act' => 'pink', 68 | 'mdx_act_hex' => '#ff4081', 69 | 'mdx_styles_dark' => 'disable', 70 | 'mdx_md2' => 'false', 71 | 'mdx_md2_font' => 'false', 72 | 'mdx_login_md' => 'false', 73 | 'mdx_chrome_color' => 'true', 74 | 'mdx_title_bar' => 'false', 75 | 'mdx_tap_to_top' => 'true', 76 | 'mdx_default_style' => '1', 77 | 'mdx_post_list_width' => 'normal', 78 | 'mdx_index_show' => '0', 79 | 'mdx_post_style' => '0', 80 | 'mdx_post_time_positon' => 'foot', 81 | 'mdx_post_nav_style' => '1', 82 | 'mdx_echo_post_sum' => 'true', 83 | 'mdx_post_list_img_height' => 'auto', 84 | 'mdx_post_def_img' => 'false', 85 | 'mdx_post_def_img_url' => get_bloginfo('template_url').'/img/dpic.jpg', 86 | 'mdx_gravatar_actived' => 'false', 87 | 'mdx_link_rand_order' => 'false', 88 | 'mdx_title_med' => 'wp', 89 | 'mdx_index_head_style' => 'saying', 90 | 'mdx_index_slide_posts_style' => '1', 91 | 'mdx_index_slide_posts_num' => '5', 92 | 'mdx_index_slide_interval' => '5', 93 | 'mdx_index_slide_posts_get' => 'cat', 94 | 'mdx_index_slide_posts_cat' => '', 95 | 'mdx_index_img' => get_bloginfo('template_url').'/img/def_index.jpg', 96 | 'mdx_index_img_bg' => 'false', 97 | 'mdx_side_img' => '', 98 | 'mdx_side_info' => 'false', 99 | 'mdx_side_head' => '', 100 | 'mdx_side_name' => '', 101 | 'mdx_side_more' => '', 102 | 'mdx_index_say' => 'Hello => MDx!', 103 | 'mdx_index_say_size' => '1', 104 | 'mdx_say_after' => '', 105 | 'mdx_logo_way' => '1', 106 | 'mdx_logo' => '', 107 | 'mdx_logo_text' => '', 108 | 'mdx_safari' => 'false', 109 | 'mdx_svg' => '', 110 | 'mdx_svg_color' => '', 111 | 'mdx_tags_color' => 'true', 112 | 'mdx_styles_footer' => '1', 113 | 'mdx_footer_say' => 'Hello => MDx!', 114 | 'mdx_footer' => '', 115 | 'mdx_hide_footer' => 'false', 116 | 'mdx_friendly_links_style' => '0' 117 | ); 118 | ?> -------------------------------------------------------------------------------- /template-parts/content-first-5.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    mdx-postlist-simple-has-no-img"> 4 | 5 | <?php echo $Imagesurl;?> 6 | 7 | <?php echo mdx_get_post_default_url();?> 8 | 9 | 10 |
    11 | 12 |
    13 | 14 |
    15 |

    16 |

    17 | 43 | 44 | ID);}else if($mdx_more_1=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_1=='time'){the_time('Y-m-d');}?> 45 | ID);}else if($mdx_more_2=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_2=='time'){the_time('Y-m-d');}?> 46 | ID);}else if($mdx_more_3=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_3=='time'){the_time('Y-m-d');}?> 47 | 48 |
    49 |
    -------------------------------------------------------------------------------- /ajax-comment/app.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('DOMContentLoaded', () => { 2 | var __list = 'ajax-comments'; 3 | function getNext(dom){ 4 | return dom.nextElementSibling; 5 | } 6 | if (document.getElementById('commentform')) { 7 | document.getElementById('commentform').addEventListener('submit', function(e){ 8 | e.preventDefault(); 9 | document.getElementById('submit').setAttribute('disabled','disabled'); 10 | var xmlHttpReq = new XMLHttpRequest(); 11 | xmlHttpReq.open("POST", ajaxcomment.ajax_url, true); 12 | xmlHttpReq.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); 13 | xmlHttpReq.send(new URLSearchParams(Array.from(new FormData(document.getElementById('commentform')))).toString() + "&action=ajax_comment"); 14 | xmlHttpReq.onreadystatechange = function(){ 15 | if(xmlHttpReq.readyState === 4 && xmlHttpReq.status === 200){ 16 | for(var el of document.getElementsByTagName('textarea')){ 17 | el.value = '' 18 | } 19 | document.getElementById('submit').removeAttribute('disabled'); 20 | mdui.snackbar({ 21 | message: ajaxcomment.i18n_1, 22 | timeout: 5000, 23 | position: 'top', 24 | }); 25 | var t = faAjax, 26 | cancel = t.I('cancel-comment-reply-link'), 27 | temp = t.I('wp-temp-form-div'), 28 | respond = t.I('respond'), 29 | parent = t.I('comment_parent').value; 30 | if (parent != '0') { 31 | document.getElementById('respond').closest('li.mdui-list-item').insertAdjacentHTML('afterend', `
    • ${xmlHttpReq.responseText}
    `); 32 | for(var li of document.querySelectorAll('ul.children+ li.mdui-divider-inset.mdui-m-y-0')){ 33 | li.parentNode.removeChild(li); 34 | } 35 | } else if (document.getElementsByClassName(__list ).length < 1) { 36 | if (ajaxcomment.formpostion == 'bottom') { 37 | document.getElementById('respond').insertAdjacentHTML('beforebegin', `
      ${xmlHttpReq.responseText}
    `); 38 | } else { 39 | document.getElementById('respond').insertAdjacentHTML('afterend', `
      ${xmlHttpReq.responseText}
    `); 40 | } 41 | } else { 42 | if (ajaxcomment.order == 'asc') { 43 | document.getElementsByClassName(__list)[0].insertAdjacentHTML('beforeend', xmlHttpReq.responseText); 44 | } else { 45 | document.getElementsByClassName(__list)[0].insertAdjacentHTML('afterbegin', xmlHttpReq.responseText); 46 | } 47 | } 48 | cancel.style.display = 'none'; 49 | cancel.onclick = null; 50 | t.I('comment_parent').value = '0'; 51 | if (temp && respond) { 52 | temp.parentNode.insertBefore(respond, temp); 53 | temp.parentNode.removeChild(temp) 54 | } 55 | }else if(xmlHttpReq.readyState === 4){ 56 | var t = faAjax; 57 | document.getElementById('submit').removeAttribute('disabled'); 58 | if(xmlHttpReq.responseText){ 59 | mdui.snackbar({ 60 | message: xmlHttpReq.responseText, 61 | timeout: 5000, 62 | position: 'top', 63 | }); 64 | }else{ 65 | mdui.snackbar({ 66 | message: ajaxcomment.i18n_2, 67 | timeout: 5000, 68 | position: 'top', 69 | }); 70 | } 71 | } 72 | } 73 | return false; 74 | }); 75 | } 76 | faAjax = { 77 | I: function(e) { 78 | return document.getElementById(e); 79 | } 80 | }; 81 | }); -------------------------------------------------------------------------------- /includes/same_posts.php: -------------------------------------------------------------------------------- 1 | ID); 4 | if ($post_tags) { 5 | $tag_list = ''; 6 | foreach ($post_tags as $tag) { 7 | $tag_list .= $tag->term_id.','; 8 | } 9 | $tag_list = substr($tag_list, 0, strlen($tag_list)-1); 10 | $related_posts = $wpdb->get_results(" 11 | SELECT DISTINCT ID, post_title 12 | FROM {$wpdb->prefix}posts, {$wpdb->prefix}term_relationships, {$wpdb->prefix}term_taxonomy 13 | WHERE {$wpdb->prefix}term_taxonomy.term_taxonomy_id = {$wpdb->prefix}term_relationships.term_taxonomy_id 14 | AND ID = object_id 15 | AND taxonomy = 'post_tag' 16 | AND post_status = 'publish' 17 | AND post_type = 'post' 18 | AND term_id IN (" . $tag_list . ") 19 | AND ID != '" . $post->ID . "' 20 | ORDER BY RAND() 21 | LIMIT ".strval((int)mdx_get_option('mdx_you_may_like_num') > 0 ? (int)mdx_get_option('mdx_you_may_like_num') : 1)); 22 | if($related_posts){?>ID); 31 | if($cats){ 32 | $related = $wpdb->get_results(" 33 | SELECT post_title, ID 34 | FROM {$wpdb->prefix}posts, {$wpdb->prefix}term_relationships, {$wpdb->prefix}term_taxonomy 35 | WHERE {$wpdb->prefix}posts.ID = {$wpdb->prefix}term_relationships.object_id 36 | AND {$wpdb->prefix}term_taxonomy.taxonomy = 'category' 37 | AND {$wpdb->prefix}term_taxonomy.term_taxonomy_id = {$wpdb->prefix}term_relationships.term_taxonomy_id 38 | AND {$wpdb->prefix}posts.post_status = 'publish' 39 | AND {$wpdb->prefix}posts.post_type = 'post' 40 | AND {$wpdb->prefix}term_taxonomy.term_id = '" . $cats[0] . "' 41 | AND {$wpdb->prefix}posts.ID != '" . $post->ID . "' 42 | ORDER BY RAND() 43 | LIMIT ".strval((int)mdx_get_option('mdx_you_may_like_num') > 0 ? (int)mdx_get_option('mdx_you_may_like_num') : 1)); 44 | if($related){?> 45 | -------------------------------------------------------------------------------- /template-parts/content-5.php: -------------------------------------------------------------------------------- 1 | 2 |
    mdx-postlist-simple-has-no-img"> 3 | 4 | <?php echo $Imagesurl;?> 5 | 6 | <?php echo mdx_get_post_default_url();?> 7 | 8 | 9 |
    10 | 11 |
    12 | 13 |
    14 |

    15 |

    16 | 42 | 43 | ID);}else if($mdx_more_1=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_1=='time'){the_time('Y-m-d');}?> 44 | ID);}else if($mdx_more_2=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_2=='time'){the_time('Y-m-d');}?> 45 | ID);}else if($mdx_more_3=='comments'){comments_popup_link('0', '1', '%');}else if($mdx_more_3=='time'){the_time('Y-m-d');}?> 46 | 47 |
    48 |
    -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/Theme/UpdateChecker.php: -------------------------------------------------------------------------------- 1 | stylesheet = $stylesheet; 20 | 21 | parent::__construct( 22 | $metadataUrl, 23 | $stylesheet, 24 | $customSlug ? $customSlug : $stylesheet, 25 | $checkPeriod, 26 | $optionName 27 | ); 28 | } 29 | 30 | /** 31 | * For themes, the update array is indexed by theme directory name. 32 | * 33 | * @return string 34 | */ 35 | protected function getUpdateListKey() { 36 | return $this->directoryName; 37 | } 38 | 39 | /** 40 | * Retrieve the latest update (if any) from the configured API endpoint. 41 | * 42 | * @return Puc_v4p9_Update|null An instance of Update, or NULL when no updates are available. 43 | */ 44 | public function requestUpdate() { 45 | list($themeUpdate, $result) = $this->requestMetadata('Puc_v4p9_Theme_Update', 'request_update'); 46 | 47 | if ( $themeUpdate !== null ) { 48 | /** @var Puc_v4p9_Theme_Update $themeUpdate */ 49 | $themeUpdate->slug = $this->slug; 50 | } 51 | 52 | $themeUpdate = $this->filterUpdateResult($themeUpdate, $result); 53 | return $themeUpdate; 54 | } 55 | 56 | public function userCanInstallUpdates() { 57 | return current_user_can('update_themes'); 58 | } 59 | 60 | /** 61 | * Create an instance of the scheduler. 62 | * 63 | * @param int $checkPeriod 64 | * @return Puc_v4p9_Scheduler 65 | */ 66 | protected function createScheduler($checkPeriod) { 67 | return new Puc_v4p9_Scheduler($this, $checkPeriod, array('load-themes.php')); 68 | } 69 | 70 | /** 71 | * Is there an update being installed right now for this theme? 72 | * 73 | * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update. 74 | * @return bool 75 | */ 76 | public function isBeingUpgraded($upgrader = null) { 77 | return $this->upgraderStatus->isThemeBeingUpgraded($this->stylesheet, $upgrader); 78 | } 79 | 80 | protected function createDebugBarExtension() { 81 | return new Puc_v4p9_DebugBar_Extension($this, 'Puc_v4p9_DebugBar_ThemePanel'); 82 | } 83 | 84 | /** 85 | * Register a callback for filtering query arguments. 86 | * 87 | * The callback function should take one argument - an associative array of query arguments. 88 | * It should return a modified array of query arguments. 89 | * 90 | * @param callable $callback 91 | * @return void 92 | */ 93 | public function addQueryArgFilter($callback){ 94 | $this->addFilter('request_update_query_args', $callback); 95 | } 96 | 97 | /** 98 | * Register a callback for filtering arguments passed to wp_remote_get(). 99 | * 100 | * The callback function should take one argument - an associative array of arguments - 101 | * and return a modified array or arguments. See the WP documentation on wp_remote_get() 102 | * for details on what arguments are available and how they work. 103 | * 104 | * @uses add_filter() This method is a convenience wrapper for add_filter(). 105 | * 106 | * @param callable $callback 107 | * @return void 108 | */ 109 | public function addHttpRequestArgFilter($callback) { 110 | $this->addFilter('request_update_options', $callback); 111 | } 112 | 113 | /** 114 | * Register a callback for filtering theme updates retrieved from the external API. 115 | * 116 | * The callback function should take two arguments. If the theme update was retrieved 117 | * successfully, the first argument passed will be an instance of Theme_Update. Otherwise, 118 | * it will be NULL. The second argument will be the corresponding return value of 119 | * wp_remote_get (see WP docs for details). 120 | * 121 | * The callback function should return a new or modified instance of Theme_Update or NULL. 122 | * 123 | * @uses add_filter() This method is a convenience wrapper for add_filter(). 124 | * 125 | * @param callable $callback 126 | * @return void 127 | */ 128 | public function addResultFilter($callback) { 129 | $this->addFilter('request_update_result', $callback, 10, 2); 130 | } 131 | 132 | /** 133 | * Create a package instance that represents this plugin or theme. 134 | * 135 | * @return Puc_v4p9_InstalledPackage 136 | */ 137 | protected function createInstalledPackage() { 138 | return new Puc_v4p9_Theme_Package($this->stylesheet, $this); 139 | } 140 | } 141 | 142 | endif; 143 | -------------------------------------------------------------------------------- /js/sc1.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | tinymce.create('tinymce.plugins.mdx_fold', { 3 | init : function(ed, url){ 4 | ed.addButton('mdx_fold', { 5 | title : 'Folder', 6 | image : url+'/bt_icon/fold.png', 7 | onclick : function(){ 8 | ed.selection.setContent('[mdx_fold title="Your title here..."][/mdx_fold]'); 9 | } 10 | }); 11 | }, 12 | createControl:function(n, cm){ 13 | return null; 14 | }, 15 | }); 16 | tinymce.PluginManager.add('mdx_fold', tinymce.plugins.mdx_fold); 17 | 18 | tinymce.create('tinymce.plugins.mdx_warning', { 19 | init : function(ed, url){ 20 | ed.addButton('mdx_warning', { 21 | title : 'Warning', 22 | image : url+'/bt_icon/warning.png', 23 | onclick : function(){ 24 | ed.selection.setContent('[mdx_warning title="Your title here..."][/mdx_warning]'); 25 | } 26 | }); 27 | }, 28 | createControl:function(n, cm){ 29 | return null; 30 | }, 31 | }); 32 | tinymce.PluginManager.add('mdx_warning', tinymce.plugins.mdx_warning); 33 | 34 | tinymce.create('tinymce.plugins.mdx_table', { 35 | init : function(ed, url){ 36 | ed.addButton('mdx_table', { 37 | title : 'Table', 38 | image : url+'/bt_icon/table.png', 39 | onclick : function(){ 40 | ed.selection.setContent('[mdx_table][/mdx_table]'); 41 | } 42 | }); 43 | }, 44 | createControl:function(n, cm){ 45 | return null; 46 | }, 47 | }); 48 | tinymce.PluginManager.add('mdx_table', tinymce.plugins.mdx_table); 49 | 50 | tinymce.create('tinymce.plugins.mdx_progress', { 51 | init : function(ed, url){ 52 | ed.addButton('mdx_progress', { 53 | title : 'Progress', 54 | image : url+'/bt_icon/progress.png', 55 | onclick : function(){ 56 | ed.selection.setContent('[mdx_progress]Number 0-100 here, float number is supported.[/mdx_progress]'); 57 | } 58 | }); 59 | }, 60 | createControl:function(n, cm){ 61 | return null; 62 | }, 63 | }); 64 | tinymce.PluginManager.add('mdx_progress', tinymce.plugins.mdx_progress); 65 | 66 | tinymce.create('tinymce.plugins.mdx_post', { 67 | init : function(ed, url){ 68 | ed.addButton('mdx_post', { 69 | title : 'Post', 70 | image : url+'/bt_icon/post.png', 71 | onclick : function(){ 72 | ed.selection.setContent('[mdx_post]A post URL under the same domain here...[/mdx_post]'); 73 | } 74 | }); 75 | }, 76 | createControl:function(n, cm){ 77 | return null; 78 | }, 79 | }); 80 | tinymce.PluginManager.add('mdx_post', tinymce.plugins.mdx_post); 81 | 82 | tinymce.create('tinymce.plugins.mdx_github', { 83 | init : function(ed, url){ 84 | ed.addButton('mdx_github', { 85 | title : 'Github', 86 | image : url+'/bt_icon/github.png', 87 | onclick : function(){ 88 | ed.selection.setContent('[mdx_github author="Author..." project="Project..."][/mdx_github]'); 89 | } 90 | }); 91 | }, 92 | createControl:function(n, cm){ 93 | return null; 94 | }, 95 | }); 96 | tinymce.PluginManager.add('mdx_github', tinymce.plugins.mdx_github); 97 | 98 | tinymce.create('tinymce.plugins.mdx_ad', { 99 | init : function(ed, url){ 100 | ed.addButton('mdx_ad', { 101 | title : 'AD', 102 | image : url+'/bt_icon/ad.png', 103 | onclick : function(){ 104 | ed.selection.setContent('[mdx_ad][/mdx_ad]'); 105 | } 106 | }); 107 | }, 108 | createControl:function(n, cm){ 109 | return null; 110 | }, 111 | }); 112 | tinymce.PluginManager.add('mdx_ad', tinymce.plugins.mdx_ad); 113 | 114 | tinymce.create('tinymce.plugins.mdx_list', { 115 | init : function(ed, url){ 116 | ed.addButton('mdx_list', { 117 | title : 'List', 118 | image : url+'/bt_icon/list.png', 119 | onclick : function(){ 120 | ed.selection.setContent('[mdx_list]
    [mdx_list_item avatar="" title="" subtitle="" action="" blank="false"]Item content here...[/mdx_list_item]
    [/mdx_list]'); 121 | } 122 | }); 123 | }, 124 | createControl:function(n, cm){ 125 | return null; 126 | }, 127 | }); 128 | tinymce.PluginManager.add('mdx_list', tinymce.plugins.mdx_list); 129 | })(); 130 | -------------------------------------------------------------------------------- /src/search.js: -------------------------------------------------------------------------------- 1 | import betterFetch from './tools/betterFetch.js'; 2 | import ele from './tools/ele.js'; 3 | 4 | "use strict"; 5 | __webpack_public_path__ = window.mdxPublicPath; 6 | let nowType = ''; 7 | let oldType = ''; 8 | let waitForNetwork = false; 9 | const outSearch = document.createElement('div'); 10 | outSearch.classList.add('OutOfsearchBox'); 11 | const searchBox = document.createElement('div'); 12 | searchBox.classList.add('searchBoxFill'); 13 | outSearch.appendChild(searchBox); 14 | ele('body').insertBefore(outSearch, ele('body').firstChild); 15 | let stopId; 16 | let isStoped = false; 17 | let ifOffline = typeof offlineMode === "undefined" ? false : offlineMode; 18 | ele('.seainput').addEventListener('focus', function () { 19 | if (sessionStorage.getItem('rts_wra') == 'false') { 20 | mdui.snackbar({ 21 | message: snackMuti, 22 | timeout: 3000, 23 | position: 'top', 24 | }); 25 | } 26 | isStoped = false; 27 | window.requestAnimationFrame(checkType); 28 | }); 29 | ele('.seainput').addEventListener('blur', function () { 30 | isStoped = true; 31 | window.cancelAnimationFrame(stopId); 32 | }); 33 | function checkType() { 34 | if (sessionStorage.getItem('rts_wra') != 'false') { 35 | nowType = ele(".seainput").value; 36 | if ((nowType != '' && oldType == '') || (oldType != '' && nowType != oldType && nowType != '')) { 37 | if (!sessionStorage.getItem("rtsk_" + nowType)) { 38 | if (!waitForNetwork) { 39 | waitForNetwork = true; 40 | betterFetch(`/wp-json/wp/v2/posts?search=${nowType}&pre_page=10&context=embed`).then((data) => { 41 | setSessionSto(nowType, JSON.stringify(data)); 42 | readRes(data, false); 43 | waitForNetwork = false; 44 | }).catch(() => { 45 | mdui.snackbar({ 46 | message: snackMuti, 47 | timeout: 3000, 48 | position: 'top', 49 | }); 50 | sessionStorage.setItem('rts_wra', 'false'); 51 | waitForNetwork = false; 52 | }) 53 | } 54 | } else { 55 | readRes(sessionStorage.getItem("rtsk_" + nowType), true) 56 | } 57 | oldType = nowType; 58 | } else if (nowType == '') { 59 | if (ifOffline) { 60 | ele('.OutOfsearchBox').innerHTML = `
    ${tipMutiOff}
    `; 61 | } else { 62 | ele('.OutOfsearchBox').innerHTML = '
    '; 63 | } 64 | oldType = nowType; 65 | } 66 | } 67 | if (isStoped) { 68 | return; 69 | } else { 70 | stopId = window.requestAnimationFrame(checkType); 71 | } 72 | } 73 | function setSessionSto(nowType, data) { 74 | if (!sessionStorage.getItem("rtsk_" + nowType)) { 75 | if (sessionStorage.length >= 100) { 76 | sessionStorage.removeItem(sessionStorage.key(0)); 77 | sessionStorage.setItem("rtsk_" + nowType, data); 78 | } else { 79 | sessionStorage.setItem("rtsk_" + nowType, data); 80 | } 81 | } 82 | } 83 | function readRes(data, ifSession) { 84 | let data2 = data; 85 | if (ifSession) { 86 | data2 = JSON.parse(data); 87 | } 88 | ele('.OutOfsearchBox').innerHTML = '
    '; 89 | let inputValue = ele(".seainput").value; 90 | if (inputValue === "Axton" || inputValue === "axton" || inputValue === "无垠" || inputValue === "flyhigher" || inputValue === "Flyhigher") { 91 | data2.unshift({ "title": { "rendered": "无垠" }, "date": "Forever", "link": "https://flyhigher.top", "excerpt": { "rendered": "飞翔的天空无限大" } }); 92 | } 93 | if (data2.length > 0) { 94 | let finalHTML = ''; 95 | for (let i = 0; i < data2.length; i++) { 96 | let postTitleInApi = data2[i].title.rendered; 97 | let postTimeInApi = data2[i].date; 98 | let postUrlInApi = data2[i].link; 99 | let postDesInApi = data2[i].excerpt.rendered; 100 | finalHTML += `

    ${postTitleInApi}

    ${postDesInApi.replace(' […]', '…').replace('

    ', '').replace('

    ', '')}

       ${postTimeInApi.substring(0, 10)}${moreMuti}
    `; 101 | } 102 | ele('.OutOfsearchBox').innerHTML += finalHTML; 103 | } 104 | if (data2.length == 10) { 105 | ele('.OutOfsearchBox').innerHTML += `
    ${tipMuti}
    `; 106 | } 107 | } -------------------------------------------------------------------------------- /js/admin_tag.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function(){ 2 | var mdx_val = jQuery('.mdx_stbs').val(); 3 | if(mdx_val=='false'){ 4 | jQuery('select.mdx_stbsip').attr("disabled","disabled"); 5 | } 6 | jQuery('#insert-media-button').click(function(){ 7 | var custom_uploader = wp.media({ 8 | multiple: false, 9 | library: { 10 | type: ['image'] 11 | } 12 | }).on('select', function() { 13 | var attachment = custom_uploader.state().get('selection').first().toJSON(); 14 | jQuery('#mdx_post_money').val(attachment.url); 15 | }).open(); 16 | return; 17 | }); 18 | if(jQuery("#mdx_index_img").val()!=''){ 19 | var img1=jQuery("#mdx_index_img").val(); 20 | jQuery('#img1').attr('src',img1); 21 | } 22 | setInterval("img1()",500); 23 | var mdx_val = jQuery('input.mdx_apsp2:checked').val(); 24 | if(mdx_val=='true'){ 25 | jQuery('input.mdx_apspc2').removeAttr("disabled"); 26 | }else if(mdx_val=='false'){ 27 | jQuery('input.mdx_apspc2').attr("disabled","disabled"); 28 | } 29 | var mdx_val_get = jQuery('input.mdx_get:checked').val(); 30 | if(mdx_val_get=='cat'){ 31 | jQuery('#mdx_hot_posts_cat').removeAttr("disabled"); 32 | }else if(mdx_val_get=='sticky'){ 33 | jQuery('#mdx_hot_posts_cat').attr("disabled","disabled"); 34 | } 35 | var mdx_val_toc = jQuery('input.mdx_toc:checked').val(); 36 | if(mdx_val_toc=='true'){ 37 | jQuery('input.mdx_toc_preview').removeAttr("disabled"); 38 | }else if(mdx_val_toc=='false'){ 39 | jQuery('input.mdx_toc_preview').attr("disabled","disabled"); 40 | } 41 | var mdx_val_img_box = jQuery('input.mdx_img_box:checked').val(); 42 | if(mdx_val_img_box=='true'){ 43 | jQuery('input.mdx_img_box_alt').removeAttr("disabled"); 44 | }else if(mdx_val_img_box=='false'){ 45 | jQuery('input.mdx_img_box_alt').attr("disabled","disabled"); 46 | } 47 | var selectVO = document.getElementById('mdx_use_cdn').options[document.getElementById('mdx_use_cdn').options.selectedIndex].value; 48 | if(selectVO ==='none' || selectVO ==='jsdelivr'){ 49 | jQuery('.cdn_custom').hide(); 50 | }else if(selectVO == 'custom'){ 51 | jQuery('.cdn_custom').show(); 52 | } 53 | }); 54 | jQuery(".mdx_stbs").change(function(){ 55 | var mdx_val = jQuery('.mdx_stbs').val(); 56 | if(mdx_val!=='false'){ 57 | jQuery('select.mdx_stbsip').removeAttr("disabled"); 58 | }else if(mdx_val==='false'){ 59 | jQuery('select.mdx_stbsip').attr("disabled","disabled"); 60 | } 61 | }); 62 | jQuery(".mdx_apsp").click(function(){ 63 | var mdx_val = jQuery('input.mdx_apsp:checked').val(); 64 | if(mdx_val=='true'){ 65 | jQuery('input.mdx_apspc').removeAttr("disabled"); 66 | }else if(mdx_val=='false'){ 67 | jQuery('input.mdx_apspc').attr("disabled","disabled"); 68 | } 69 | }); 70 | jQuery(".mdx_apsp2").click(function(){ 71 | var mdx_val = jQuery('input.mdx_apsp2:checked').val(); 72 | if(mdx_val=='true'){ 73 | jQuery('input.mdx_apspc2').removeAttr("disabled"); 74 | }else if(mdx_val=='false'){ 75 | jQuery('input.mdx_apspc2').attr("disabled","disabled"); 76 | } 77 | }); 78 | jQuery(".mdx_get").click(function(){ 79 | var mdx_val = jQuery('input.mdx_get:checked').val(); 80 | if(mdx_val=='cat'){ 81 | jQuery('#mdx_hot_posts_cat').removeAttr("disabled"); 82 | }else if(mdx_val=='sticky'){ 83 | jQuery('#mdx_hot_posts_cat').attr("disabled","disabled"); 84 | } 85 | }); 86 | jQuery(".mdx_toc").click(function(){ 87 | var mdx_val = jQuery('input.mdx_toc:checked').val(); 88 | if(mdx_val=='true'){ 89 | jQuery('input.mdx_toc_preview').removeAttr("disabled"); 90 | }else if(mdx_val=='false'){ 91 | jQuery('input.mdx_toc_preview').attr("disabled","disabled"); 92 | } 93 | }); 94 | jQuery(".mdx_img_box").click(function(){ 95 | var mdx_val = jQuery('input.mdx_img_box:checked').val(); 96 | if(mdx_val=='true'){ 97 | jQuery('input.mdx_img_box_alt').removeAttr("disabled"); 98 | }else if(mdx_val=='false'){ 99 | jQuery('input.mdx_img_box_alt').attr("disabled","disabled"); 100 | } 101 | }); 102 | function img1(){ 103 | var img1=jQuery("#mdx_post_money").val(); 104 | if(img1.substring(0,4) != 'http'){ 105 | img1 = ''; 106 | } 107 | jQuery('#img1').attr('src',img1); 108 | } 109 | function mdx_cdn_sec(selectV){ 110 | if(selectV ==='none' || selectV ==='jsdelivr'){ 111 | jQuery('.cdn_custom').hide(); 112 | }else if(selectV == 'custom'){ 113 | jQuery('.cdn_custom').show(); 114 | } 115 | } 116 | jQuery(".mdx-admin-nav").click(function(e){ 117 | e.preventDefault(); 118 | var ele = jQuery(e.target); 119 | var eleId = ele.attr("id"); 120 | jQuery(".mdx-admin-nav.nav-tab-active").removeClass("nav-tab-active"); 121 | ele.addClass("nav-tab-active"); 122 | jQuery("tbody.mdx-admin-section.mdx-admin-section-active").removeClass("mdx-admin-section-active"); 123 | jQuery("#"+eleId+"-section").addClass("mdx-admin-section-active"); 124 | }) -------------------------------------------------------------------------------- /plugin-update-checker/Puc/v4p9/StateStore.php: -------------------------------------------------------------------------------- 1 | optionName = $optionName; 33 | } 34 | 35 | /** 36 | * Get time elapsed since the last update check. 37 | * 38 | * If there are no recorded update checks, this method returns a large arbitrary number 39 | * (i.e. time since the Unix epoch). 40 | * 41 | * @return int Elapsed time in seconds. 42 | */ 43 | public function timeSinceLastCheck() { 44 | $this->lazyLoad(); 45 | return time() - $this->lastCheck; 46 | } 47 | 48 | /** 49 | * @return int 50 | */ 51 | public function getLastCheck() { 52 | $this->lazyLoad(); 53 | return $this->lastCheck; 54 | } 55 | 56 | /** 57 | * Set the time of the last update check to the current timestamp. 58 | * 59 | * @return $this 60 | */ 61 | public function setLastCheckToNow() { 62 | $this->lazyLoad(); 63 | $this->lastCheck = time(); 64 | return $this; 65 | } 66 | 67 | /** 68 | * @return null|Puc_v4p9_Update 69 | */ 70 | public function getUpdate() { 71 | $this->lazyLoad(); 72 | return $this->update; 73 | } 74 | 75 | /** 76 | * @param Puc_v4p9_Update|null $update 77 | * @return $this 78 | */ 79 | public function setUpdate(Puc_v4p9_Update $update = null) { 80 | $this->lazyLoad(); 81 | $this->update = $update; 82 | return $this; 83 | } 84 | 85 | /** 86 | * @return string 87 | */ 88 | public function getCheckedVersion() { 89 | $this->lazyLoad(); 90 | return $this->checkedVersion; 91 | } 92 | 93 | /** 94 | * @param string $version 95 | * @return $this 96 | */ 97 | public function setCheckedVersion($version) { 98 | $this->lazyLoad(); 99 | $this->checkedVersion = strval($version); 100 | return $this; 101 | } 102 | 103 | /** 104 | * Get translation updates. 105 | * 106 | * @return array 107 | */ 108 | public function getTranslations() { 109 | $this->lazyLoad(); 110 | if ( isset($this->update, $this->update->translations) ) { 111 | return $this->update->translations; 112 | } 113 | return array(); 114 | } 115 | 116 | /** 117 | * Set translation updates. 118 | * 119 | * @param array $translationUpdates 120 | */ 121 | public function setTranslations($translationUpdates) { 122 | $this->lazyLoad(); 123 | if ( isset($this->update) ) { 124 | $this->update->translations = $translationUpdates; 125 | $this->save(); 126 | } 127 | } 128 | 129 | public function save() { 130 | $state = new stdClass(); 131 | 132 | $state->lastCheck = $this->lastCheck; 133 | $state->checkedVersion = $this->checkedVersion; 134 | 135 | if ( isset($this->update)) { 136 | $state->update = $this->update->toStdClass(); 137 | 138 | $updateClass = get_class($this->update); 139 | $state->updateClass = $updateClass; 140 | $prefix = $this->getLibPrefix(); 141 | if ( Puc_v4p9_Utils::startsWith($updateClass, $prefix) ) { 142 | $state->updateBaseClass = substr($updateClass, strlen($prefix)); 143 | } 144 | } 145 | 146 | update_site_option($this->optionName, $state); 147 | $this->isLoaded = true; 148 | } 149 | 150 | /** 151 | * @return $this 152 | */ 153 | public function lazyLoad() { 154 | if ( !$this->isLoaded ) { 155 | $this->load(); 156 | } 157 | return $this; 158 | } 159 | 160 | protected function load() { 161 | $this->isLoaded = true; 162 | 163 | $state = get_site_option($this->optionName, null); 164 | 165 | if ( !is_object($state) ) { 166 | $this->lastCheck = 0; 167 | $this->checkedVersion = ''; 168 | $this->update = null; 169 | return; 170 | } 171 | 172 | $this->lastCheck = intval(Puc_v4p9_Utils::get($state, 'lastCheck', 0)); 173 | $this->checkedVersion = Puc_v4p9_Utils::get($state, 'checkedVersion', ''); 174 | $this->update = null; 175 | 176 | if ( isset($state->update) ) { 177 | //This mess is due to the fact that the want the update class from this version 178 | //of the library, not the version that saved the update. 179 | 180 | $updateClass = null; 181 | if ( isset($state->updateBaseClass) ) { 182 | $updateClass = $this->getLibPrefix() . $state->updateBaseClass; 183 | } else if ( isset($state->updateClass) && class_exists($state->updateClass) ) { 184 | $updateClass = $state->updateClass; 185 | } 186 | 187 | if ( $updateClass !== null ) { 188 | $this->update = call_user_func(array($updateClass, 'fromObject'), $state->update); 189 | } 190 | } 191 | } 192 | 193 | public function delete() { 194 | delete_site_option($this->optionName); 195 | 196 | $this->lastCheck = 0; 197 | $this->checkedVersion = ''; 198 | $this->update = null; 199 | } 200 | 201 | private function getLibPrefix() { 202 | $parts = explode('_', __CLASS__, 3); 203 | return $parts[0] . '_' . $parts[1] . '_'; 204 | } 205 | } 206 | 207 | endif; 208 | -------------------------------------------------------------------------------- /css/oled.css: -------------------------------------------------------------------------------- 1 | body.mdui-theme-layout-dark { 2 | --mdx-theme-color-with-white-head: 18, 18, 18!important; 3 | } 4 | body.mdui-theme-layout-dark.mdx-index-void { 5 | --mdx-theme-color-with-white-head: 0, 0, 0!important; 6 | } 7 | .mdui-theme-layout-dark .PostMainPage, .mdui-theme-layout-dark .main, .mdui-theme-layout-dark .mdx-hot-posts, .mdui-theme-layout-dark #left-drawer, .mdui-theme-layout-dark #mdx-right-drawer, .mdui-theme-layout-dark #img-box, body.mdui-theme-layout-dark.body-grey, body.mdui-theme-layout-dark.body-grey1, .mdui-theme-layout-dark, .mdui-theme-layout-dark #mdx_menu li ul.mdui-collapse-item-body { 8 | background-color: black!important; 9 | } 10 | .mdui-theme-layout-dark #img-box.opacity-bg { 11 | background-color: rgba(0, 0, 0, .85)!important; 12 | } 13 | .mdui-theme-layout-dark .mdx-hot-posts .mdx-hp-g-l { 14 | background: -webkit-linear-gradient(left,rgba(0,0,0,1) 10%,rgba(0,0,0,0) 100%); 15 | background: linear-gradient(to right,rgba(0,0,0,1) 10%,rgba(0,0,0,0) 100%); 16 | } 17 | .mdui-theme-layout-dark .mdx-hot-posts .mdx-hp-g-r { 18 | background: -webkit-linear-gradient(left,rgba(0,0,0,0) 10%,rgba(0,0,0,1) 100%); 19 | background: linear-gradient(to right,rgba(0,0,0,0) 10%,rgba(0,0,0,1) 100%); 20 | } 21 | .mdui-theme-layout-dark .mdui-card { 22 | background-color: #222; 23 | } 24 | body.mdui-theme-layout-dark .mdxNotice.mdui-center, .mdui-theme-layout-dark.mdx-first-simple .mdx-hot-posts { 25 | background-color: #222!important; 26 | } 27 | .mdui-theme-layout-dark .mdui-card.mdx-widget { 28 | background-color: #111; 29 | } 30 | .mdui-theme-layout-dark .mdui-card.mdx-widget, .mdui-theme-layout-dark .mdui-table-fluid { 31 | border: 2px solid #242424; 32 | } 33 | .mdui-theme-layout-dark .nextpage2 { 34 | background-color: rgba(75, 75, 75, .3); 35 | } 36 | body.mdui-theme-layout-dark .searchCard, .mdui-theme-layout-dark .page-footer-nav, .mdui-theme-layout-dark .page-footer-nav-left, .mdui-theme-layout-dark .page-footer-nav-right { 37 | background-color: #131313!important; 38 | } 39 | .mdui-theme-layout-dark .ArtMain0, .mdui-theme-layout-dark main .mdx-postlist-simple.mdx-postlist-simple-sta { 40 | background-color: #151515; 41 | } 42 | .mdui-theme-layout-dark #respond, .mdui-theme-layout-dark .mdx-author-c, .mdui-theme-layout-dark .mdx-hot-posts, .mdui-theme-layout-dark .mdx-same-posts, .mdui-theme-layout-dark .spanout { 43 | background-color: #202020; 44 | } 45 | .mdui-theme-layout-dark .mdx-author-c .mdx-amask path { 46 | fill: #202020; 47 | } 48 | .mdui-theme-layout-dark .timeInPost { 49 | background: linear-gradient(to right,rgba(32,32,32,0) 0%,#202020 5%,#202020 100%); 50 | } 51 | .mdui-theme-layout-dark .mdui-appbar>[class*=mdui-color-]:not(.mdui-color-transparent), .mdui-theme-layout-dark div.PostTitleFillBack2[class*=mdui-color-], .mdui-theme-layout-dark div.PostTitleFill[class*=mdui-color-], .mdui-theme-layout-dark div.PostTitle[class*=mdui-color-], .mdui-theme-layout-dark .PostTitleFillPageBackGround, .mdui-theme-layout-dark .theFirstPageBackGround, .mdui-theme-layout-dark div.theFirstPageSmall, .mdui-theme-layout-dark #SearchBar { 52 | background-color: #121212!important; 53 | } 54 | .mdui-theme-layout-dark article div.mdui-panel.mdui-panel-gapless>div.mdui-panel-item, .mdui-theme-layout-dark .mdui-table { 55 | background-color: #1a1a1a; 56 | } 57 | .mdui-theme-layout-dark .mdui-table td, .mdui-theme-layout-dark .mdui-table th { 58 | border-bottom: 2px solid #242424; 59 | } 60 | .mdui-theme-layout-dark .mdui-table thead { 61 | background-color: #212121; 62 | } 63 | .mdui-theme-layout-dark .mdui-grid-tile.indexgaid .divimg, .mdui-theme-layout-dark .mdui-card.staDivgaid { 64 | background-color: #1d1d1d!important; 65 | } 66 | .mdui-theme-layout-dark .sta-4 { 67 | background: -webkit-linear-gradient(top,#1d1d1d 90%,transparent 100%); 68 | background: linear-gradient(to bottom,#1d1d1d 90%,transparent 100%); 69 | } 70 | .mdui-theme-layout-dark .backGround { 71 | background-color: #2e2e2e; 72 | } 73 | .mdx-first-simple .main { 74 | background-color: transparent!important; 75 | } 76 | .mdui-theme-layout-dark .mdui-dialog, .mdui-theme-layout-dark .mdui-menu { 77 | background-color: #1d1d1d; 78 | } 79 | .mdui-theme-layout-dark li.current-menu-item, .mdui-theme-layout-dark li.current_page_item { 80 | background-color: rgba(255, 255, 255, .08); 81 | } 82 | .mdui-theme-layout-dark .mdx-timeline-archives:before { 83 | background: #313131; 84 | } 85 | .mdui-theme-layout-dark .m-title:before { 86 | background: #000; 87 | } 88 | .mdui-theme-layout-dark main .mdx-postlist-simple.mdx-postlist-simple-has-no-img { 89 | background-color: #000000!important; 90 | border-color: #000000!important; 91 | } 92 | .mdui-theme-layout-dark .mdx-say-after.mdui-card, .mdui-theme-layout-dark .mdx-author-info { 93 | background-color: #202020!important; 94 | } 95 | .mdui-theme-layout-dark .ArtMain0 .mdx-say-after.mdui-card { 96 | background-color: #2b2b2b!important; 97 | } 98 | @media(max-width:720px) { 99 | .mdui-theme-layout-dark .ArtMain0 .mdx-say-after.mdui-card { 100 | background-color: #202020!important; 101 | } 102 | } 103 | @media screen and (orientation:landscape){ 104 | body.mdx-first-tworows.mdui-theme-layout-dark .mdx-tworow-search { 105 | background-color: rgb(37, 37, 37); 106 | } 107 | body.mdx-first-tworows.mdui-theme-layout-dark #mdx-search-anim { 108 | background-color: rgb(49, 49, 49); 109 | } 110 | body.mdx-first-tworows.mdui-theme-layout-dark .mdx-tworow-search:hover { 111 | background-color: rgb(49, 49, 49); 112 | } 113 | } --------------------------------------------------------------------------------