diff --git a/README.md b/README.md index 49d23e281a..5d8930aaae 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,16 @@ During theme installation you will have options to update `style.css` theme head ```shell themes/your-theme-name/ # → Root of your Sage based theme ├── app/ # → Theme PHP -│ ├── Controllers/ # → Controller files +│ ├── Composers/ # → Composer files │ ├── admin.php # → Theme customizer setup │ ├── filters.php # → Theme filters │ ├── helpers.php # → Helper functions │ └── setup.php # → Theme setup +├── config/ # → Config files +│ ├── app.php # → Application configuration +│ ├── assets.php # → Asset configuration +│ ├── filesystems.php # → Filesystems configuration +│ └── view.php # → View configuration ├── composer.json # → Autoloading for `app/` files ├── composer.lock # → Composer lock file (never edit) ├── dist/ # → Built theme assets (never edit) @@ -97,7 +102,6 @@ Edit `app/setup.php` to enable or disable theme features, setup navigation menus ## Documentation * [Sage documentation](https://roots.io/sage/docs/) -* [Controller documentation](https://github.com/soberwp/controller#usage) ## Contributing @@ -107,7 +111,7 @@ Contributions are welcome from everyone. We have [contributing guidelines](https Help support our open-source development efforts by [becoming a patron](https://www.patreon.com/rootsdev). -Kinsta KM Digital +Kinsta KM Digital itineris ## Community diff --git a/app/Composers/Title.php b/app/Composers/Title.php index 5bfe9c726a..62c82ec47d 100644 --- a/app/Composers/Title.php +++ b/app/Composers/Title.php @@ -6,37 +6,61 @@ class Title extends Composer { + /** + * List of views served by this composer. + * + * @var array + */ protected static $views = [ 'partials.page-header', 'partials.content', 'partials.content-*' ]; + /** + * Data to be passed to view before rendering. + * + * @param array $data + * @param \Illuminate\View\View $view + * @return array + */ public function with($data, $view) { return ['title' => $this->title($view->getName())]; } + /** + * Returns the post title. + * + * @param \Illuminate\View\View $view + * @return string + */ public function title($view) { if ($view !== 'partials.page-header') { return get_the_title(); } + if (is_home()) { if ($home = get_option('page_for_posts', true)) { return get_the_title($home); } + return __('Latest Posts', 'sage'); } + if (is_archive()) { return get_the_archive_title(); } + if (is_search()) { return sprintf(__('Search Results for %s', 'sage'), get_search_query()); } + if (is_404()) { return __('Not Found', 'sage'); } + return get_the_title(); } } diff --git a/app/helpers.php b/app/helpers.php index 5034bed531..2d016488a5 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -1,5 +1,3 @@ '

', 'after_title' => '

' ]; + register_sidebar([ 'name' => __('Primary', 'sage'), 'id' => 'sidebar-primary' ] + $config); + register_sidebar([ 'name' => __('Footer', 'sage'), 'id' => 'sidebar-footer' diff --git a/composer.json b/composer.json index 09c7897d45..fe113da2be 100644 --- a/composer.json +++ b/composer.json @@ -33,21 +33,21 @@ "App\\": "app/" } }, - "repositories": [ - { - "type": "git", - "url": "https://github.com/qwp6t/acorn" - } - ], - "minimum-stability": "dev", "require": { - "php": ">=7.1", + "php": "^7.1.3", "roots/acorn": "dev-master" }, "require-dev": { - "squizlabs/php_codesniffer": "^3.3", - "roots/sage-installer": "~1.3" + "roots/sage-installer": "^1.6", + "squizlabs/php_codesniffer": "^3.3" + }, + "config": { + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true }, + "minimum-stability": "dev", + "prefer-stable": true, "scripts": { "test": [ "phpcs" diff --git a/composer.lock b/composer.lock index 1a73ae955c..c09969f700 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4e6dd4d5e94c35a36220ba54bb07f0a0", + "content-hash": "2cec6b1809bcbbfaddffc4bbac02b893", "packages": [ { "name": "doctrine/inflector", @@ -79,12 +79,12 @@ "source": { "type": "git", "url": "https://github.com/illuminate/config.git", - "reference": "08b6e422d62602ee5263ca2113e9f3d800e905a4" + "reference": "540e11b9ae058c9a94051d9ca6c02e40258c71fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/08b6e422d62602ee5263ca2113e9f3d800e905a4", - "reference": "08b6e422d62602ee5263ca2113e9f3d800e905a4", + "url": "https://api.github.com/repos/illuminate/config/zipball/540e11b9ae058c9a94051d9ca6c02e40258c71fd", + "reference": "540e11b9ae058c9a94051d9ca6c02e40258c71fd", "shasum": "" }, "require": { @@ -115,7 +115,7 @@ ], "description": "The Illuminate Config package.", "homepage": "https://laravel.com", - "time": "2018-10-06T18:48:42+00:00" + "time": "2019-02-11T13:48:57+00:00" }, { "name": "illuminate/container", @@ -123,12 +123,12 @@ "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "53a0991e918efaace42cde526a04fdb832128a03" + "reference": "8c3a75e464d59509ae88db152cab61a3f115b9ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/53a0991e918efaace42cde526a04fdb832128a03", - "reference": "53a0991e918efaace42cde526a04fdb832128a03", + "url": "https://api.github.com/repos/illuminate/container/zipball/8c3a75e464d59509ae88db152cab61a3f115b9ec", + "reference": "8c3a75e464d59509ae88db152cab61a3f115b9ec", "shasum": "" }, "require": { @@ -160,7 +160,7 @@ ], "description": "The Illuminate Container package.", "homepage": "https://laravel.com", - "time": "2018-12-18T14:00:02+00:00" + "time": "2019-02-11T13:48:57+00:00" }, { "name": "illuminate/contracts", @@ -168,12 +168,12 @@ "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "758927e5e925c1d442a1faaa1356675ceba0194c" + "reference": "b63324d349a8ae2156fbc2697c1ccc85879b3803" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/758927e5e925c1d442a1faaa1356675ceba0194c", - "reference": "758927e5e925c1d442a1faaa1356675ceba0194c", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/b63324d349a8ae2156fbc2697c1ccc85879b3803", + "reference": "b63324d349a8ae2156fbc2697c1ccc85879b3803", "shasum": "" }, "require": { @@ -204,7 +204,7 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2018-11-15T13:49:08+00:00" + "time": "2019-02-12T07:46:48+00:00" }, { "name": "illuminate/events", @@ -212,12 +212,12 @@ "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "a8e5e3d601ad7f3571428176a578ddf03ce649d8" + "reference": "e48888062a9962f30c431524357b9a815b093609" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/a8e5e3d601ad7f3571428176a578ddf03ce649d8", - "reference": "a8e5e3d601ad7f3571428176a578ddf03ce649d8", + "url": "https://api.github.com/repos/illuminate/events/zipball/e48888062a9962f30c431524357b9a815b093609", + "reference": "e48888062a9962f30c431524357b9a815b093609", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ ], "description": "The Illuminate Events package.", "homepage": "https://laravel.com", - "time": "2018-10-06T18:48:42+00:00" + "time": "2019-02-11T13:48:57+00:00" }, { "name": "illuminate/filesystem", @@ -257,12 +257,12 @@ "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "dfd91acf0cc557c91b59f6b4b7b9a31a6561b109" + "reference": "ff853e678a93996b1d0a3ddc6fc56c10bae0de30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/dfd91acf0cc557c91b59f6b4b7b9a31a6561b109", - "reference": "dfd91acf0cc557c91b59f6b4b7b9a31a6561b109", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/ff853e678a93996b1d0a3ddc6fc56c10bae0de30", + "reference": "ff853e678a93996b1d0a3ddc6fc56c10bae0de30", "shasum": "" }, "require": { @@ -301,7 +301,7 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2018-10-29T20:54:16+00:00" + "time": "2019-02-11T13:48:57+00:00" }, { "name": "illuminate/support", @@ -309,12 +309,12 @@ "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "1caddfa63a40d2f229bb0948d9871540da666d0b" + "reference": "3e2810145f37eb89fa11759781ee88ee1c1a5262" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/1caddfa63a40d2f229bb0948d9871540da666d0b", - "reference": "1caddfa63a40d2f229bb0948d9871540da666d0b", + "url": "https://api.github.com/repos/illuminate/support/zipball/3e2810145f37eb89fa11759781ee88ee1c1a5262", + "reference": "3e2810145f37eb89fa11759781ee88ee1c1a5262", "shasum": "" }, "require": { @@ -360,7 +360,7 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2018-12-18T13:45:35+00:00" + "time": "2019-02-12T07:57:07+00:00" }, { "name": "illuminate/view", @@ -368,12 +368,12 @@ "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "87755dad0c47a4afa050d0cc7da39d582e4b4ae4" + "reference": "ab0aff2520fa0985c279b2e403f632a21a88242a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/87755dad0c47a4afa050d0cc7da39d582e4b4ae4", - "reference": "87755dad0c47a4afa050d0cc7da39d582e4b4ae4", + "url": "https://api.github.com/repos/illuminate/view/zipball/ab0aff2520fa0985c279b2e403f632a21a88242a", + "reference": "ab0aff2520fa0985c279b2e403f632a21a88242a", "shasum": "" }, "require": { @@ -408,7 +408,7 @@ ], "description": "The Illuminate View package.", "homepage": "https://laravel.com", - "time": "2018-11-02T14:57:34+00:00" + "time": "2019-02-26T17:23:36+00:00" }, { "name": "league/flysystem", @@ -416,12 +416,12 @@ "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "2528dbeee5cebc5066625da1487486b9e22c0706" + "reference": "23f2326367dd04f1d2adbb2f0ecdd1f90d847c74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/2528dbeee5cebc5066625da1487486b9e22c0706", - "reference": "2528dbeee5cebc5066625da1487486b9e22c0706", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/23f2326367dd04f1d2adbb2f0ecdd1f90d847c74", + "reference": "23f2326367dd04f1d2adbb2f0ecdd1f90d847c74", "shasum": "" }, "require": { @@ -492,7 +492,7 @@ "sftp", "storage" ], - "time": "2018-12-09T20:53:18+00:00" + "time": "2019-04-24T15:26:06+00:00" }, { "name": "nesbot/carbon", @@ -558,12 +558,12 @@ "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "2cc4a01788191489dc7459446ba832fa79a216a7" + "reference": "014d250daebff39eba15ba990eeb2a140798e77c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/2cc4a01788191489dc7459446ba832fa79a216a7", - "reference": "2cc4a01788191489dc7459446ba832fa79a216a7", + "url": "https://api.github.com/repos/php-fig/container/zipball/014d250daebff39eba15ba990eeb2a140798e77c", + "reference": "014d250daebff39eba15ba990eeb2a140798e77c", "shasum": "" }, "require": { @@ -599,7 +599,7 @@ "container-interop", "psr" ], - "time": "2017-06-28T15:35:32+00:00" + "time": "2018-12-29T15:36:03+00:00" }, { "name": "psr/log", @@ -701,7 +701,7 @@ "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/qwp6t/acorn", + "url": "https://github.com/roots/acorn.git", "reference": "bb3a96f323457b18289eecd6989cce7ddb8b8806" }, "require": { @@ -775,12 +775,12 @@ "source": { "type": "git", "url": "https://github.com/roots/support.git", - "reference": "872a14d1a1b90d08488f39f4bb7e699559c4b655" + "reference": "0c5231dc194407e32bfee000d49a36775040289a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roots/support/zipball/872a14d1a1b90d08488f39f4bb7e699559c4b655", - "reference": "872a14d1a1b90d08488f39f4bb7e699559c4b655", + "url": "https://api.github.com/repos/roots/support/zipball/0c5231dc194407e32bfee000d49a36775040289a", + "reference": "0c5231dc194407e32bfee000d49a36775040289a", "shasum": "" }, "require": { @@ -807,7 +807,7 @@ } ], "homepage": "https://github.com/roots/support/", - "time": "2018-08-08T22:23:22+00:00" + "time": "2019-01-28T09:46:14+00:00" }, { "name": "symfony/contracts", @@ -883,12 +883,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "7f2f295f386c4b0054cf02099c29655a0c6265b8" + "reference": "bcb342fd9caa77809c7768bdf77220c0745fb30e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7f2f295f386c4b0054cf02099c29655a0c6265b8", - "reference": "7f2f295f386c4b0054cf02099c29655a0c6265b8", + "url": "https://api.github.com/repos/symfony/debug/zipball/bcb342fd9caa77809c7768bdf77220c0745fb30e", + "reference": "bcb342fd9caa77809c7768bdf77220c0745fb30e", "shasum": "" }, "require": { @@ -931,7 +931,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-12-13T12:43:21+00:00" + "time": "2019-04-11T12:10:52+00:00" }, { "name": "symfony/finder", @@ -939,12 +939,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "413fc800a335876085d358d3a3cd9e2d59093ed1" + "reference": "5e2136f5d2caf276f7b4ba77a6be786988c1783c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/413fc800a335876085d358d3a3cd9e2d59093ed1", - "reference": "413fc800a335876085d358d3a3cd9e2d59093ed1", + "url": "https://api.github.com/repos/symfony/finder/zipball/5e2136f5d2caf276f7b4ba77a6be786988c1783c", + "reference": "5e2136f5d2caf276f7b4ba77a6be786988c1783c", "shasum": "" }, "require": { @@ -980,7 +980,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-12-24T10:03:37+00:00" + "time": "2019-04-06T14:04:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -1047,12 +1047,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "5c111fac40dc3ed9b62e33aa641b35c9b5ef5cd0" + "reference": "8406472bf4deb6f713cb72bee6594849c9e20ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/5c111fac40dc3ed9b62e33aa641b35c9b5ef5cd0", - "reference": "5c111fac40dc3ed9b62e33aa641b35c9b5ef5cd0", + "url": "https://api.github.com/repos/symfony/translation/zipball/8406472bf4deb6f713cb72bee6594849c9e20ecc", + "reference": "8406472bf4deb6f713cb72bee6594849c9e20ecc", "shasum": "" }, "require": { @@ -1074,7 +1074,9 @@ "symfony/console": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "~3.4|~4.0", "symfony/intl": "~3.4|~4.0", + "symfony/var-dumper": "~3.4|~4.0", "symfony/yaml": "~3.4|~4.0" }, "suggest": { @@ -1112,7 +1114,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-12-13T12:43:21+00:00" + "time": "2019-04-29T10:05:16+00:00" } ], "packages-dev": [ @@ -1122,12 +1124,12 @@ "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "12b5e9844144ce4c72abf527c5b002266ad01e97" + "reference": "0d97b6ead0cbb09140b1e8317f5a9d9f69ff9ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/12b5e9844144ce4c72abf527c5b002266ad01e97", - "reference": "12b5e9844144ce4c72abf527c5b002266ad01e97", + "url": "https://api.github.com/repos/illuminate/console/zipball/0d97b6ead0cbb09140b1e8317f5a9d9f69ff9ec6", + "reference": "0d97b6ead0cbb09140b1e8317f5a9d9f69ff9ec6", "shasum": "" }, "require": { @@ -1164,29 +1166,157 @@ ], "description": "The Illuminate Console package.", "homepage": "https://laravel.com", - "time": "2018-12-13T13:53:32+00:00" + "time": "2019-02-11T13:48:57+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, + { + "name": "ramsey/uuid", + "version": "3.8.0", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0|9.99.99", + "php": "^5.4 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "codeception/aspect-mock": "^1.0 | ~2.0.0", + "doctrine/annotations": "~1.2.0", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.9", + "moontoast/math": "^1.1", + "php-mock/php-mock-phpunit": "^0.3|^1.1", + "phpunit/phpunit": "^4.7|^5.0|^6.5", + "squizlabs/php_codesniffer": "^2.3" + }, + "suggest": { + "ext-ctype": "Provides support for PHP Ctype functions", + "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", + "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "time": "2018-07-19T23:38:55+00:00" }, { "name": "roots/sage-installer", - "version": "1.5.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/roots/sage-installer.git", - "reference": "b5f9b2f2175b4c61dc98cd2523b2e87ea1b4ecbb" + "reference": "bff412234f9852a73d3c2f2e49bfb959f7f732e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roots/sage-installer/zipball/b5f9b2f2175b4c61dc98cd2523b2e87ea1b4ecbb", - "reference": "b5f9b2f2175b4c61dc98cd2523b2e87ea1b4ecbb", + "url": "https://api.github.com/repos/roots/sage-installer/zipball/bff412234f9852a73d3c2f2e49bfb959f7f732e8", + "reference": "bff412234f9852a73d3c2f2e49bfb959f7f732e8", "shasum": "" }, "require": { "illuminate/console": "~5.6", "illuminate/filesystem": "~5.6", + "ramsey/uuid": "^3.8", "symfony/process": "~3.3" }, "require-dev": { - "squizlabs/php_codesniffer": "~3.0" + "squizlabs/php_codesniffer": "~3.3.1" }, "bin": [ "bin/sage" @@ -1223,7 +1353,7 @@ "theme", "wordpress" ], - "time": "2018-12-21T19:32:27+00:00" + "time": "2019-02-14T01:13:25+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -1231,12 +1361,12 @@ "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "390bffe2265aac8184fdf86400c0d0841e65bc4b" + "reference": "1d7c6576a578fb57723c8c0fbc716cb88dae4f13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/390bffe2265aac8184fdf86400c0d0841e65bc4b", - "reference": "390bffe2265aac8184fdf86400c0d0841e65bc4b", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1d7c6576a578fb57723c8c0fbc716cb88dae4f13", + "reference": "1d7c6576a578fb57723c8c0fbc716cb88dae4f13", "shasum": "" }, "require": { @@ -1269,12 +1399,12 @@ } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", "standards" ], - "time": "2018-12-21T04:12:30+00:00" + "time": "2019-04-16T03:35:30+00:00" }, { "name": "symfony/console", @@ -1345,18 +1475,76 @@ "homepage": "https://symfony.com", "time": "2018-12-24T10:03:37+00:00" }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "82ebae02209c21113908c229e9883c419720738a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-02-06T07:57:58+00:00" + }, { "name": "symfony/process", "version": "3.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2" + "reference": "a9c4dfbf653023b668c282e4e02609d131f4057a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2", - "reference": "abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2", + "url": "https://api.github.com/repos/symfony/process/zipball/a9c4dfbf653023b668c282e4e02609d131f4057a", + "reference": "a9c4dfbf653023b668c282e4e02609d131f4057a", "shasum": "" }, "require": { @@ -1392,7 +1580,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-11-20T16:10:26+00:00" + "time": "2019-04-08T16:15:54+00:00" } ], "aliases": [], @@ -1400,10 +1588,10 @@ "stability-flags": { "roots/acorn": 20 }, - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.1" + "php": "^7.1.3" }, "platform-dev": [] } diff --git a/config/app.php b/config/app.php index 80c72eed5b..b85bc1d302 100644 --- a/config/app.php +++ b/config/app.php @@ -40,8 +40,8 @@ | or doing any other checks to ensure the service is functional. | */ - - 'preflight' => false, + + 'preflight' => env('WP_ENV', 'production') !== 'production', /* |-------------------------------------------------------------------------- diff --git a/config/assets.php b/config/assets.php index 5966a8ba84..0cfcc20a1f 100644 --- a/config/assets.php +++ b/config/assets.php @@ -15,7 +15,6 @@ 'uri' => get_theme_file_uri('/dist'), - /* |-------------------------------------------------------------------------- | Assets Directory Path @@ -28,7 +27,6 @@ 'path' => get_theme_file_path('/dist'), - /* |-------------------------------------------------------------------------- | Assets Manifest diff --git a/config/filesystems.php b/config/filesystems.php index e5b6482689..491ae4a679 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -17,7 +17,6 @@ 'default' => env('FILESYSTEM_DRIVER', 'local'), - /* |-------------------------------------------------------------------------- | Default Cloud Filesystem Disk @@ -31,7 +30,6 @@ 'cloud' => env('FILESYSTEM_CLOUD', 's3'), - /* |-------------------------------------------------------------------------- | Filesystem Disks diff --git a/config/view.php b/config/view.php index c087271a45..41a2ef4c55 100644 --- a/config/view.php +++ b/config/view.php @@ -17,7 +17,6 @@ get_parent_theme_file_path('/resources/views') ], - /* |-------------------------------------------------------------------------- | Compiled View Path @@ -31,7 +30,6 @@ 'compiled' => wp_upload_dir()['basedir'] . '/acorn/cache', - /* |-------------------------------------------------------------------------- | View Debugger @@ -46,7 +44,6 @@ 'debug' => false, - /* |-------------------------------------------------------------------------- | View Namespaces @@ -67,7 +64,6 @@ // 'MyPlugin' => WP_PLUGIN_DIR . '/my-plugin/resources/views', ], - /* |-------------------------------------------------------------------------- | View Composers @@ -83,7 +79,6 @@ App\Composers\Title::class, ], - /* |-------------------------------------------------------------------------- | View Directives diff --git a/package.json b/package.json index 05990ed2fc..a893057ace 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sage", - "version": "9.0.5", + "version": "10.0.0", "author": "Roots ", "homepage": "https://roots.io/sage/", "private": true, diff --git a/resources/functions.php b/resources/functions.php index 60d88c07c3..3ed2ea3792 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -20,8 +20,8 @@ /** * Ensure compatible version of PHP is used */ -if (version_compare('7.1', phpversion(), '>=')) { - $sage_error(__('You must be using PHP 7.1 or greater.', 'sage'), __('Invalid PHP version', 'sage')); +if (version_compare('7.1.3', phpversion(), '>=')) { + $sage_error(__('You must be using PHP 7.1.3 or greater.', 'sage'), __('Invalid PHP version', 'sage')); } /** @@ -50,7 +50,7 @@ */ array_map(function ($file) use ($sage_error) { $file = "../app/{$file}.php"; - if (!locate_template($file, true, true)) { + if (! locate_template($file, true, true)) { $sage_error( sprintf(__('Error locating %s for inclusion.', 'sage'), $file), __('File not found', 'sage') diff --git a/resources/style.css b/resources/style.css index 130b8ed9cf..cbbce0430f 100644 --- a/resources/style.css +++ b/resources/style.css @@ -2,7 +2,7 @@ Theme Name: Sage Starter Theme Theme URI: https://roots.io/sage/ Description: Sage is a WordPress starter theme. -Version: 9.0.5 +Version: 10.0.0 Author: Roots Author URI: https://roots.io/ Text Domain: sage diff --git a/resources/views/404.blade.php b/resources/views/404.blade.php index ee68d543ca..67a4c9e905 100644 --- a/resources/views/404.blade.php +++ b/resources/views/404.blade.php @@ -3,10 +3,11 @@ @section('content') @include('partials.page-header') - @if (!have_posts()) + @if (! have_posts())
{{ __('Sorry, but the page you were trying to view does not exist.', 'sage') }}
+ {!! get_search_form(false) !!} @endif @endsection diff --git a/resources/views/forms/search.blade.php b/resources/views/forms/search.blade.php new file mode 100644 index 0000000000..b4ab242f60 --- /dev/null +++ b/resources/views/forms/search.blade.php @@ -0,0 +1,8 @@ + diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 9bf9afdf72..15e19bdf5f 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -3,14 +3,15 @@ @section('content') @include('partials.page-header') - @if (!have_posts()) + @if (! have_posts())
{{ __('Sorry, no results were found.', 'sage') }}
+ {!! get_search_form(false) !!} @endif - @while (have_posts()) @php the_post() @endphp + @while (have_posts()) @php(the_post()) @includeFirst(['partials.content-'.get_post_type(), 'partials.content']) @endwhile @@ -18,7 +19,5 @@ @endsection @section('sidebar') - + @include('partials.sidebar') @endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index d361bf5f54..c04d69378f 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -1,19 +1,28 @@ @include('partials.head') - - @php do_action('get_header') @endphp + + + @php(do_action('get_header')) @include('partials.header') -
+ +
@yield('content')
- @yield('sidebar') + + @hasSection('sidebar') + + @endif
- @php do_action('get_footer') @endphp + + @php(do_action('get_footer')) @include('partials.footer') - @php wp_footer() @endphp + + @php(wp_footer()) diff --git a/resources/views/page.blade.php b/resources/views/page.blade.php index c57fc94eca..38c0dabb1e 100644 --- a/resources/views/page.blade.php +++ b/resources/views/page.blade.php @@ -1,7 +1,7 @@ @extends('layouts.app') @section('content') - @while(have_posts()) @php the_post() @endphp + @while(have_posts()) @php(the_post()) @include('partials.page-header') @includeFirst(['partials.content-page', 'partials.content']) @endwhile diff --git a/resources/views/partials/comments.blade.php b/resources/views/partials/comments.blade.php index 8060b6cd04..35e992d013 100644 --- a/resources/views/partials/comments.blade.php +++ b/resources/views/partials/comments.blade.php @@ -1,8 +1,6 @@ -@php -if (post_password_required()) { - return; -} -@endphp +@if (post_password_required()) + @php(return) +@endif
@if (have_comments()) @@ -18,21 +16,22 @@ @endif @endif - @if (!comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments')) + @if (! comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments'))
{{ __('Comments are closed.', 'sage') }}
@endif - @php comment_form() @endphp + @php(comment_form())
diff --git a/resources/views/partials/content-page.blade.php b/resources/views/partials/content-page.blade.php index 347ec378e9..41e050a4fe 100644 --- a/resources/views/partials/content-page.blade.php +++ b/resources/views/partials/content-page.blade.php @@ -1,2 +1,2 @@ -@php the_content() @endphp +@php(the_content()) {!! wp_link_pages(['echo' => 0, 'before' => '']) !!} diff --git a/resources/views/partials/content-search.blade.php b/resources/views/partials/content-search.blade.php index 520ab681b3..937660fb34 100644 --- a/resources/views/partials/content-search.blade.php +++ b/resources/views/partials/content-search.blade.php @@ -1,11 +1,15 @@ -
+
-

{{ $title }}

- @if (get_post_type() === 'post') - @include('partials/entry-meta') - @endif +

+ + {!! $title !!} + +

+ + @includeWhen(get_post_type() === 'post', 'partials/entry-meta')
+
- @php the_excerpt() @endphp + @php(the_excerpt())
diff --git a/resources/views/partials/content-single.blade.php b/resources/views/partials/content-single.blade.php index 227505e492..7ebc0b37a1 100644 --- a/resources/views/partials/content-single.blade.php +++ b/resources/views/partials/content-single.blade.php @@ -1,13 +1,19 @@ -
+
-

{{ $title }}

+

+ {!! $title !!} +

+ @include('partials/entry-meta')
+
- @php the_content() @endphp + @php(the_content())
+
{!! wp_link_pages(['echo' => 0, 'before' => '']) !!}
- @php comments_template('/partials/comments.blade.php') @endphp + + @php(comments_template('/partials/comments.blade.php'))
diff --git a/resources/views/partials/content.blade.php b/resources/views/partials/content.blade.php index 1790d09fcc..c6b5bffdf0 100644 --- a/resources/views/partials/content.blade.php +++ b/resources/views/partials/content.blade.php @@ -1,9 +1,15 @@ -
+ diff --git a/resources/views/partials/entry-meta.blade.php b/resources/views/partials/entry-meta.blade.php index 301e9b74b4..f218893c8d 100644 --- a/resources/views/partials/entry-meta.blade.php +++ b/resources/views/partials/entry-meta.blade.php @@ -1,6 +1,10 @@ - + + diff --git a/resources/views/partials/footer.blade.php b/resources/views/partials/footer.blade.php index da9feba0fa..3c1fac143f 100644 --- a/resources/views/partials/footer.blade.php +++ b/resources/views/partials/footer.blade.php @@ -1,5 +1,5 @@
- @php dynamic_sidebar('sidebar-footer') @endphp + @php(dynamic_sidebar('sidebar-footer'))
diff --git a/resources/views/partials/head.blade.php b/resources/views/partials/head.blade.php index 4f0e833e1e..b6adcc562e 100644 --- a/resources/views/partials/head.blade.php +++ b/resources/views/partials/head.blade.php @@ -2,5 +2,5 @@ - @php wp_head() @endphp + @php(wp_head()) diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php index 4af67fcf4b..d98858ff3e 100644 --- a/resources/views/partials/header.blade.php +++ b/resources/views/partials/header.blade.php @@ -1,6 +1,9 @@