Skip to content

Commit

Permalink
Add in a base render.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
efuller committed Mar 9, 2018
1 parent fb484d2 commit 8542fd0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/blocks/call-to-action/render.php
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' ] );

0 comments on commit 8542fd0

Please sign in to comment.