mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-20 07:04:24 +09:00
Added transforms for segments
This commit is contained in:
@@ -48,6 +48,7 @@ class WPStrava_Blocks_Segment implements WPStrava_Blocks_Interface {
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
add_action( 'wp_footer', array( $this, 'print_scripts' ) );
|
||||
}
|
||||
|
||||
@@ -68,7 +69,7 @@ class WPStrava_Blocks_Segment implements WPStrava_Blocks_Interface {
|
||||
$this->add_script = true;
|
||||
|
||||
$matches = array();
|
||||
preg_match( '/\/segments\/([0-9].*)$/', $attributes['url'], $matches );
|
||||
preg_match( '#/segments/([0-9].*)$#', $attributes['url'], $matches );
|
||||
if ( $matches[1] ) {
|
||||
// Transform from block attributes to shortcode standard.
|
||||
$atts = array(
|
||||
|
||||
Reference in New Issue
Block a user