Plugin Directory

source: mortgage/trunk/build/button/render.php @ 3106603

Last change on this file since 3106603 was 3106603, checked in by tropicalista, 5 weeks ago

Update to version 0.4.0 from GitHub

File size: 788 bytes
Line 
1<?php
2/**
3 * PHP file to use when rendering the block type on the server to show on the front end.
4 *
5 * The following variables are exposed to the file:
6 *     $attributes (array): The block attributes.
7 *     $content (string): The block default content.
8 *     $block (WP_Block): The block instance.
9 *
10 * @see https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#render
11 */
12
13// Generate unique id for aria-controls.
14$unique_id = wp_unique_id( 'p-' );
15?>
16
17<button
18        <?php echo get_block_wrapper_attributes(
19                array( 'class' => 'wp-element-button' )
20        ); ?>
21        data-wp-on--click="actions.calculate"
22        aria-controls="<?php echo esc_attr( $unique_id ); ?>"
23        type="button"
24>
25        <?php echo $attributes['text']; ?>
26</button>
Note: See TracBrowser for help on using the repository browser.