diff --git a/CHANGELOG.md b/CHANGELOG.md index 93cee99ff..e19f64f01 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'); 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