From 864f14344ea05d133149102a0ccd5ebba33b07e5 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 11 Feb 2016 12:59:46 -0700 Subject: [PATCH 1/4] Add method to get contentMeta and initialize content if needed --- system/src/Grav/Common/Page/Page.php | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 85573528b..b9b6db7b8 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -583,16 +583,50 @@ class Page return $this->content; } + /** + * Get the contentMeta array and initialize content first if it's not already + * + * @return mixed + */ + public function contentMeta() + { + if ($this->content === null) { + $this->content(); + } + return $this->getContentMeta(); + } + + /** + * Add an entry to the page's contentMeta array + * + * @param $name + * @param $value + */ public function addContentMeta($name, $value) { $this->content_meta[$name] = $value; } + /** + * Return the whole contentMeta array as it currently stands + * + * @return mixed + */ public function getContentMeta() { return $this->content_meta; } + /** + * Sets the whole content meta array in one shot + * + * @param $content_meta + * @return mixed + */ + public function setContentMeta($content_meta) + { + return $this->content_meta = $content_meta; + } /** * Process the Markdown content. Uses Parsedown or Parsedown Extra depending on configuration From 0bd60d24b7df17c785a7f833fb50fc4bef5f555b Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 11 Feb 2016 15:28:57 -0700 Subject: [PATCH 2/4] updated libraries --- composer.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index c5c236f9f..5ff8b3311 100644 --- a/composer.lock +++ b/composer.lock @@ -675,16 +675,16 @@ }, { "name": "rockettheme/toolbox", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/rockettheme/toolbox.git", - "reference": "0c7a3b4b6e4d73be8512e89f7acde6899334b7f2" + "reference": "22273dff75748eb1f51fcfa41fa85d8eff1f9f6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rockettheme/toolbox/zipball/0c7a3b4b6e4d73be8512e89f7acde6899334b7f2", - "reference": "0c7a3b4b6e4d73be8512e89f7acde6899334b7f2", + "url": "https://api.github.com/repos/rockettheme/toolbox/zipball/22273dff75748eb1f51fcfa41fa85d8eff1f9f6c", + "reference": "22273dff75748eb1f51fcfa41fa85d8eff1f9f6c", "shasum": "" }, "require": { @@ -720,7 +720,7 @@ "php", "rockettheme" ], - "time": "2015-11-24 17:04:24" + "time": "2016-02-11 19:08:48" }, { "name": "symfony/console", @@ -1137,16 +1137,16 @@ "packages-dev": [ { "name": "codeception/codeception", - "version": "2.1.5", + "version": "2.1.6", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "4ee562f421fd404139dd7b73ae46d075396a4baf" + "reference": "b199941f5e59d1e7fd32d78296c8ab98db873d89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/4ee562f421fd404139dd7b73ae46d075396a4baf", - "reference": "4ee562f421fd404139dd7b73ae46d075396a4baf", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b199941f5e59d1e7fd32d78296c8ab98db873d89", + "reference": "b199941f5e59d1e7fd32d78296c8ab98db873d89", "shasum": "" }, "require": { @@ -1213,7 +1213,7 @@ "functional testing", "unit testing" ], - "time": "2015-12-20 12:11:42" + "time": "2016-02-09 22:27:48" }, { "name": "doctrine/instantiator", @@ -1886,16 +1886,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.22", + "version": "4.8.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "dfb11aa5236376b4fc63853cf746af39fe780e72" + "reference": "6e351261f9cd33daf205a131a1ba61c6d33bd483" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/dfb11aa5236376b4fc63853cf746af39fe780e72", - "reference": "dfb11aa5236376b4fc63853cf746af39fe780e72", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6e351261f9cd33daf205a131a1ba61c6d33bd483", + "reference": "6e351261f9cd33daf205a131a1ba61c6d33bd483", "shasum": "" }, "require": { @@ -1954,7 +1954,7 @@ "testing", "xunit" ], - "time": "2016-02-02 09:01:21" + "time": "2016-02-11 14:56:33" }, { "name": "phpunit/phpunit-mock-objects", From bf91d13222dfa9ca4413e19cf36dd561366d60ca Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 11 Feb 2016 15:37:14 -0700 Subject: [PATCH 3/4] version update --- CHANGELOG.md | 12 ++++++++++++ system/defines.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93cee99ff..02d5c1927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# v1.0.10 +## 02/11/2016 + +1. [](#new) + * Added new `Page::contentMeta()` mechanism to store content-level meta data alongside content + * Added Japanese language translation +1. [](#improved) + * Updated some vendor libraries +1. [](#bugfix) + * Hide `streams` blueprint from Admin plugin + * Fix translations of languages with `---` in YAML files + # v1.0.9 ## 02/05/2016 diff --git a/system/defines.php b/system/defines.php index 8efc90724..a56126901 100644 --- a/system/defines.php +++ b/system/defines.php @@ -2,7 +2,7 @@ // Some standard defines define('GRAV', true); -define('GRAV_VERSION', '1.0.9'); +define('GRAV_VERSION', '1.0.10'); define('DS', '/'); define('GRAV_PHP_MIN', '5.5.9'); From 3a46dc3dcd8939fbb6547ab3cdc2a69510fd88eb Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 11 Feb 2016 18:05:05 -0700 Subject: [PATCH 4/4] fixed some extraneous spaces --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d5c1927..e19f64f01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # v1.0.10 ## 02/11/2016 - + 1. [](#new) * Added new `Page::contentMeta()` mechanism to store content-level meta data alongside content * Added Japanese language translation