From bf86c791c1e45862bfde36424d56da5797d3a86e Mon Sep 17 00:00:00 2001 From: Ivan Ruzevic Date: Sat, 27 Apr 2019 02:02:06 +0200 Subject: [PATCH] updating GT blocks --- CHANGELOG.md | 7 ++++++- src/blocks/class-base-block.php | 4 +++- src/blocks/class-wrapper-block.php | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b328f5529..6c1297080 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ - # Change Log for the Eightshift Libs All notable changes to this project will be documented in this file. @@ -8,6 +7,12 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a _No documentation available about unreleased changes as of yet._ +## [0.4.0] + +### Changed + +- Changing wrapper block view path. + ## [0.3.0] ### Added diff --git a/src/blocks/class-base-block.php b/src/blocks/class-base-block.php index 2dbc67776..a64b534da 100644 --- a/src/blocks/class-base-block.php +++ b/src/blocks/class-base-block.php @@ -2,6 +2,7 @@ /** * File that holds base abstract class for Gutenberg blocks registration * + * @since 0.4.0 Chaning block view path. * @since 0.3.0 Separating Wrapper_Block and General_Block. * @since 0.1.0 * @package Eightshift_Libs\Blocks @@ -125,11 +126,12 @@ abstract public function get_block_attributes() : array; * * @return string * + * @since 0.4.0 Changing the path. * @since 0.3.0 */ public function get_block_view_path() { $block_name = $this->get_block_name(); - return 'src/blocks/' . $block_name . '/view/' . $block_name . '.php'; + return 'src/blocks/' . $block_name . '/view.php'; } } diff --git a/src/blocks/class-wrapper-block.php b/src/blocks/class-wrapper-block.php index 5be473d38..a46b79db3 100644 --- a/src/blocks/class-wrapper-block.php +++ b/src/blocks/class-wrapper-block.php @@ -3,6 +3,7 @@ * File that holds Wrapper_Block abstract class for Gutenberg blocks registration. * This implementation is used if you want to add markup around you block that is reused in the project. * + * @since 0.4.0 Changing wrapper block view path. * @since 0.3.0 * @package Eightshift_Libs\Blocks */ @@ -21,12 +22,13 @@ abstract class Wrapper_Block extends Base_Block { * * @return string * + * @since 0.4.0 Changing view path. * @since 0.3.0 */ public function get_block_wrapper_view_path() { $block_name = $this->get_block_name(); - return 'src/blocks/wrapper-block/wrapper.php'; + return 'src/blocks/wrapper-block/view.php'; } /**