diff --git a/src/WPStrava/Blocks/Activity.php b/src/WPStrava/Blocks/Activity.php index 2c1e596..e624e98 100644 --- a/src/WPStrava/Blocks/Activity.php +++ b/src/WPStrava/Blocks/Activity.php @@ -28,6 +28,20 @@ class WPStrava_Blocks_Activity implements WPStrava_Blocks_Interface { 'editor_style' => 'wp-strava-block-editor', 'editor_script' => 'wp-strava-block', 'render_callback' => array( $this, 'render_block' ), + 'attributes' => array( + 'url' => array( + 'type' => 'string', + 'default' => '', + ), + 'imageOnly' => array( + 'type' => 'boolean', + 'default' => false, + ), + 'displayMarkers' => array( + 'type' => 'boolean', + 'default' => false, + ), + ), ) ); add_action( 'wp_footer', array( $this, 'print_scripts' ) ); diff --git a/src/blocks/activity/edit.js b/src/blocks/activity/edit.js index fc8a116..4f80b04 100644 --- a/src/blocks/activity/edit.js +++ b/src/blocks/activity/edit.js @@ -7,6 +7,7 @@ const { Component } = wp.element; const { InspectorControls } = wp.editor; const { PanelBody, ToggleControl } = wp.components; const { isEmpty } = lodash; +const { serverSideRender: ServerSideRender } = wp; /** @@ -83,7 +84,14 @@ class Edit extends Component { - +