-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Displays the Call to Action block. | ||
* | ||
* @package WDS_Gutenberg | ||
* @since NEXT | ||
*/ | ||
|
||
namespace WDS_Gutenberg\Src\Call_To_Action; | ||
|
||
/** | ||
* Render block: Related Posts. | ||
* | ||
* @param array $attributes The attributes passed in from the Related Post block settings. | ||
* @return string The block markup. | ||
* | ||
* @since NEXT | ||
*/ | ||
function render_block( $attributes ) { | ||
|
||
ob_start(); ?> | ||
|
||
<!-- wp:wds/related-posts --> | ||
<?php \WDS_Gutenberg\Src\Block_Options\display_block_options( $attributes ); ?> | ||
|
||
<?php \WDS_Gutenberg\Src\Component\display_block_title( $attributes ); ?> | ||
|
||
</section> | ||
<!-- /wp:wds/related-posts --> | ||
<?php | ||
|
||
return ob_get_clean(); | ||
} | ||
register_block_type( 'wds/call-to-action', [ 'render_callback' => __NAMESPACE__ . '\\render_block' ] ); |