Skip to content

Commit

Permalink
updating GT blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed Apr 27, 2019
1 parent 0a36e6f commit bf86c79
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Change Log for the Eightshift Libs
All notable changes to this project will be documented in this file.

Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/class-base-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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';
}
}
4 changes: 3 additions & 1 deletion src/blocks/class-wrapper-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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';
}

/**
Expand Down

0 comments on commit bf86c79

Please sign in to comment.