diff --git a/dt-metrics/combined/critical-path.php b/dt-metrics/combined/critical-path.php index 66af17e1b..0b0c63c68 100644 --- a/dt-metrics/combined/critical-path.php +++ b/dt-metrics/combined/critical-path.php @@ -7,7 +7,7 @@ class DT_Metrics_Critical_Path_Chart extends DT_Metrics_Chart_Base { //slug and title of the top menu folder - public $base_slug = 'combined'; // lowercase + public $base_slug = 'access'; // lowercase public $base_title; public $title; public $slug = 'critical_path'; // lowercase diff --git a/dt-metrics/combined/daily-activity.php b/dt-metrics/combined/daily-activity.php index b9dee5335..7b036a206 100644 --- a/dt-metrics/combined/daily-activity.php +++ b/dt-metrics/combined/daily-activity.php @@ -6,7 +6,7 @@ class DT_Metrics_Daily_Activity extends DT_Metrics_Chart_Base { //slug and title of the top menu folder - public $base_slug = 'combined'; // lowercase + public $base_slug = 'records'; // lowercase public $base_title; public $title; public $slug = 'daily-activity'; // lowercase diff --git a/dt-metrics/combined/hover-map.php b/dt-metrics/combined/hover-map.php index 4d02b8d08..4fa35651a 100644 --- a/dt-metrics/combined/hover-map.php +++ b/dt-metrics/combined/hover-map.php @@ -8,7 +8,7 @@ class DT_Metrics_Hover_Map extends DT_Metrics_Chart_Base { //slug and title of the top menu folder - public $base_slug = 'combined'; // lowercase + public $base_slug = 'records'; // lowercase public $base_title; public $title; public $slug = 'hover_map'; // lowercase @@ -22,7 +22,7 @@ public function __construct() { if ( !$this->has_permission() ){ return; } - $this->title = __( 'Hover Map', 'disciple_tools' ); + $this->title = __( 'Simple Map', 'disciple_tools' ); $this->base_title = __( 'Project', 'disciple_tools' ); $this->namespace = "dt-metrics/$this->base_slug/$this->slug"; @@ -62,7 +62,7 @@ public function scripts() { 'current_user_login' => wp_get_current_user()->user_login, 'current_user_id' => get_current_user_id(), 'translations' => [ - 'title' => __( 'Hover Map', 'disciple_tools' ) + 'title' => __( 'Simple Map', 'disciple_tools' ) ] ] ); diff --git a/dt-metrics/combined/locations-list.php b/dt-metrics/combined/locations-list.php index 950437181..00cc8a19e 100644 --- a/dt-metrics/combined/locations-list.php +++ b/dt-metrics/combined/locations-list.php @@ -8,7 +8,7 @@ class DT_Metrics_Locations_List extends DT_Metrics_Chart_Base { //slug and title of the top menu folder - public $base_slug = 'combined'; // lowercase + public $base_slug = 'records'; // lowercase public $base_title; public $title; public $slug = 'locations_list'; // lowercase diff --git a/dt-metrics/combined/mapbox-maps.php b/dt-metrics/combined/mapbox-maps.php index 293546e93..058189e2a 100644 --- a/dt-metrics/combined/mapbox-maps.php +++ b/dt-metrics/combined/mapbox-maps.php @@ -7,7 +7,7 @@ class DT_Metrics_Mapbox_Combined_Maps extends DT_Metrics_Chart_Base { //slug and title of the top menu folder - public $base_slug = 'combined'; // lowercase + public $base_slug = 'records'; // lowercase public $base_title; public $title; diff --git a/dt-metrics/combined/site-links.php b/dt-metrics/combined/site-links.php index 0e62ff4ad..b3880cc45 100644 --- a/dt-metrics/combined/site-links.php +++ b/dt-metrics/combined/site-links.php @@ -6,7 +6,7 @@ class DT_Metrics_Site_Links extends DT_Metrics_Chart_Base { //slug and title of the top menu folder - public $base_slug = 'combined'; // lowercase + public $base_slug = 'access'; // lowercase public $base_title; public $title; public $slug = 'site-links'; // lowercase @@ -20,7 +20,7 @@ public function __construct() { return; } $this->title = __( 'Transferred Contacts', 'disciple_tools' ); - $this->base_title = __( 'Project', 'disciple_tools' ); + $this->base_title = __( 'Access', 'disciple_tools' ); $url_path = dt_get_url_path( true ); if ( "metrics/$this->base_slug/$this->slug" === $url_path ) { diff --git a/dt-metrics/contacts/sources.php b/dt-metrics/contacts/sources.php index 191e04e1e..95c9126fa 100644 --- a/dt-metrics/contacts/sources.php +++ b/dt-metrics/contacts/sources.php @@ -8,7 +8,7 @@ class DT_Metrics_Sources_Chart extends DT_Metrics_Chart_Base { //slug and title of the top menu folder - public $base_slug = 'contacts'; // lowercase + public $base_slug = 'access'; // lowercase public $base_title; public $title; public $slug = 'sources'; // lowercase @@ -22,7 +22,7 @@ public function __construct() { return; } $this->title = __( 'Sources Chart', 'disciple_tools' ); - $this->base_title = __( 'Contacts', 'disciple_tools' ); + $this->base_title = __( 'Access', 'disciple_tools' ); $url_path = dt_get_url_path( true ); if ( "metrics/$this->base_slug/$this->slug" === $url_path ) { diff --git a/dt-metrics/metrics.php b/dt-metrics/metrics.php index 5abe20789..164e8b158 100644 --- a/dt-metrics/metrics.php +++ b/dt-metrics/metrics.php @@ -41,78 +41,73 @@ public function __construct(){ new DT_Metrics_Groups_Genmap( 'personal', __( 'Personal', 'disciple_tools' ) ); require_once( get_template_directory() . '/dt-metrics/records/dynamic-records-map.php' ); new DT_Metrics_Dynamic_Records_Map( 'personal', __( 'Personal', 'disciple_tools' ) ); - require_once( get_template_directory() . '/dt-metrics/personal/coaching-tree.php' ); - require_once( get_template_directory() . '/dt-metrics/personal/baptism-tree.php' ); - require_once( get_template_directory() . '/dt-metrics/personal/group-tree.php' ); + // require_once( get_template_directory() . '/dt-metrics/personal/coaching-tree.php' ); + // require_once( get_template_directory() . '/dt-metrics/personal/baptism-tree.php' ); + // require_once( get_template_directory() . '/dt-metrics/personal/group-tree.php' ); - require_once( get_template_directory() . '/dt-metrics/personal/mapbox-contacts-maps.php' ); - require_once( get_template_directory() . '/dt-metrics/personal/mapbox-groups-maps.php' ); + // require_once( get_template_directory() . '/dt-metrics/personal/mapbox-contacts-maps.php' ); + // require_once( get_template_directory() . '/dt-metrics/personal/mapbox-groups-maps.php' ); require_once( get_template_directory() . '/dt-metrics/personal/activity-highlights.php' ); require_once( get_template_directory() . '/dt-metrics/personal/activity-log.php' ); require_once( get_template_directory() . '/dt-metrics/personal/overview.php' ); - require_once( get_template_directory() . '/dt-metrics/combined/mapbox-maps.php' ); + //...require_once( get_template_directory() . '/dt-metrics/combined/mapbox-maps.php' ); require_once( get_template_directory() . '/dt-metrics/records/records-endpoints.php' ); if ( dt_has_permissions( [ 'dt_all_access_contacts', 'view_project_metrics' ] ) ){ // tests if project level permissions /* Contacts */ - if ( !empty( $modules['dmm_module']['enabled'] ) ){ - require_once( get_template_directory() . '/dt-metrics/contacts/baptism-tree.php' ); - require_once( get_template_directory() . '/dt-metrics/contacts/coaching-tree.php' ); - require_once( get_template_directory() . '/dt-metrics/contacts/milestones.php' ); - require_once( get_template_directory() . '/dt-metrics/contacts/milestones-map.php' ); - } + // if ( !empty( $modules['dmm_module']['enabled'] ) ){ + //...require_once( get_template_directory() . '/dt-metrics/contacts/baptism-tree.php' ); + //...require_once( get_template_directory() . '/dt-metrics/contacts/coaching-tree.php' ); + // require_once( get_template_directory() . '/dt-metrics/contacts/milestones.php' ); + // ...require_once( get_template_directory() . '/dt-metrics/contacts/milestones-map.php' ); + // } if ( !empty( $modules['access_module']['enabled'] ) ){ - require_once( get_template_directory() . '/dt-metrics/contacts/mapbox-maps.php' ); + //...require_once( get_template_directory() . '/dt-metrics/contacts/mapbox-maps.php' ); require_once( get_template_directory() . '/dt-metrics/contacts/sources.php' ); - require_once( get_template_directory() . '/dt-metrics/contacts/overview.php' ); + //...require_once( get_template_directory() . '/dt-metrics/contacts/overview.php' ); } /* Groups */ - require_once( get_template_directory() . '/dt-metrics/groups/tree.php' ); + /*require_once( get_template_directory() . '/dt-metrics/groups/tree.php' ); require_once( get_template_directory() . '/dt-metrics/groups/mapbox-maps.php' ); - require_once( get_template_directory() . '/dt-metrics/groups/overview.php' ); + require_once( get_template_directory() . '/dt-metrics/groups/overview.php' );*/ // Combined require_once( get_template_directory() . '/dt-metrics/combined/site-links.php' ); - require_once( get_template_directory() . '/dt-metrics/combined/daily-activity.php' ); + //..require_once( get_template_directory() . '/dt-metrics/combined/daily-activity.php' ); require_once( get_template_directory() . '/dt-metrics/combined/locations-list.php' ); - require_once( get_template_directory() . '/dt-metrics/combined/hover-map.php' ); /* Record Types */ + require_once( get_template_directory() . '/dt-metrics/records/date-range-activity.php' ); + require_once( get_template_directory() . '/dt-metrics/records/time-charts.php' ); + require_once( get_template_directory() . '/dt-metrics/records/select-tags-charts.php' ); new DT_Metrics_Groups_Genmap( 'records', __( 'Genmap', 'disciple_tools' ) ); - new DT_Metrics_Dynamic_Records_Map( 'records', __( 'Records Map', 'disciple_tools' ) ); + new DT_Metrics_Dynamic_Records_Map( 'records', __( 'Maps', 'disciple_tools' ) ); + require_once( get_template_directory() . '/dt-metrics/combined/hover-map.php' ); } if ( !empty( $modules['access_module']['enabled'] ) ){ require_once( get_template_directory() . '/dt-metrics/combined/critical-path.php' ); } - require_once( get_template_directory() . '/dt-metrics/records/select-tags-charts.php' ); - require_once( get_template_directory() . '/dt-metrics/records/time-charts.php' ); - require_once( get_template_directory() . '/dt-metrics/records/date-range-activity.php' ); }, 1000); // default menu order add_filter( 'dt_metrics_menu', function ( $content ){ $modules = dt_get_option( 'dt_post_type_modules' ); if ( $content === '' ){ + $content .= '