commit a55750feb081f500b0b930d5f053de6dcd21cfab Author: Guilherme Capanema Date: Thu Apr 30 09:31:14 2020 -0300 Commit inicial. diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..00bc7f2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.php] +indent_size = 4 + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c5a9c8d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +* text=auto eol=lf + +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/README.md export-ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..81b9258 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +composer.lock +phpunit.xml +vendor diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c1434b7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Vincent Klaiber + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b2cdd75 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Plate + +This package has been archived and abandoned by the owner. It is now read-only. + +If you want a plugin with similar features, consider checking out [Administration UI](https://vinkla.dev/administration-ui). When you buy a license you'll help the continuous development of WordPlate. + +## License + +[MIT](LICENSE) © [Vincent Klaiber](https://doubledip.se) diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..3202071 --- /dev/null +++ b/composer.json @@ -0,0 +1,35 @@ +{ + "name": "wordplate/plate", + "type": "wordpress-plugin", + "description": "A theme support plugin for WordPlate", + "keywords": [ + "plate", + "plugin", + "wordplate", + "wordpress" + ], + "license": "MIT", + "authors": [ + { + "name": "Vincent Klaiber", + "email": "hello@doubledip.se" + }, + { + "name": "Chris Andersson", + "email": "hello@puredazzle.se" + } + ], + "require": { + "php": "^7.2" + }, + "config": { + "preferred-install": "dist" + }, + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/plate.php b/plate.php new file mode 100644 index 0000000..5c5498a --- /dev/null +++ b/plate.php @@ -0,0 +1,30 @@ + 'normal', + 'dashboard_incoming_links' => 'normal', + 'dashboard_plugins' => 'normal', + 'dashboard_recent_comments' => 'normal', + 'dashboard_right_now' => 'normal', + 'dashboard_primary' => 'side', + 'dashboard_quick_press' => 'side', + 'dashboard_recent_drafts' => 'side', + 'dashboard_secondary' => 'side', + ]; + + $boxes = get_theme_support('plate-disable-dashboard')[0]; + + foreach ($boxes as $box) { + $position = $positions[$box] ?: 'normal'; + + unset($wp_meta_boxes['dashboard'][$position]['core'][$box]); + } +}); diff --git a/src/disable-menu.php b/src/disable-menu.php new file mode 100644 index 0000000..d394606 --- /dev/null +++ b/src/disable-menu.php @@ -0,0 +1,38 @@ +remove_node($item); + } +}, 999); diff --git a/src/footer-text.php b/src/footer-text.php new file mode 100644 index 0000000..6a81029 --- /dev/null +++ b/src/footer-text.php @@ -0,0 +1,17 @@ += 2) { + $styles[] = sprintf('width: %dpx;', $args[1]); + } + + echo sprintf('', implode(' ', $styles)); +}); + +// Set custom login logo url. +add_filter('login_headerurl', function () { + return get_bloginfo('url'); +}); diff --git a/src/permalink.php b/src/permalink.php new file mode 100644 index 0000000..719373c --- /dev/null +++ b/src/permalink.php @@ -0,0 +1,21 @@ +set_permalink_structure($pattern); +});