Added segment block with test

This commit is contained in:
Justin Foell
2021-04-30 14:59:10 -05:00
parent d3572c9942
commit 30f0377b45
10 changed files with 314 additions and 13 deletions
+11
View File
@@ -41,6 +41,12 @@ class WPStrava {
*/
private $routes = null;
/**
* Segment object to get segments.
* @var WPStrava_Segments
*/
private $segments = null;
/**
* Private constructor (singleton).
*/
@@ -115,6 +121,10 @@ class WPStrava {
return $this->get_routes();
}
if ( 'segments' === $name ) {
return $this->get_segments();
}
if ( isset( $this->{$name} ) ) {
return $this->{$name};
}
@@ -216,6 +226,7 @@ class WPStrava {
'WPStrava_Blocks_Activity',
'WPStrava_Blocks_Route',
'WPStrava_Blocks_ActivitiesList',
'WPStrava_Blocks_Segment',
);
// automatically load dependencies and version