Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/tutor-pro/addons/google-meet/views/pages/main.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + /**
3 + * Google meet backend main page
4 + *
5 + * Loads other pages as per active tab
6 + *
7 + * @since v2.1.0
8 + *
9 + * @package TutorPro\GoogleMeet\Views
10 + */
11 +
12 + use TutorPro\GoogleMeet\GoogleEvent\GoogleEvent;
13 + use TutorPro\GoogleMeet\GoogleMeet;
14 + use TutorPro\GoogleMeet\Utilities\Utilities;
15 +
16 + $google_client = new GoogleEvent();
17 + $active_tab = Utilities::active_tab();
18 + $page_tab = 'active-meeting' === $active_tab || 'expired' === $active_tab ? 'meetings' : $active_tab;
19 +
20 + if ( ! $google_client->is_app_permitted() ) {
21 + // Filter sub pages.
22 + Utilities::not_permitted_sub_pages();
23 +
24 + // Only set-api page access enable if app not permitted.
25 + if ( 'meetings' === $page_tab ) {
26 + $active_tab = 'set-api';
27 + $page_tab = 'set-api';
28 + }
29 + }
30 + ?>
31 + <div class="tutor-admin-wrap">
32 + <!-- navbar -->
33 + <?php
34 + // Load navbar template.
35 +
36 + Utilities::tabs_key_value();
37 + $navbar_template = tutor()->path . 'views/elements/navbar.php';
38 + $navbar_data = array(
39 + 'page_title' => __( 'Google Meet', 'tutor-pro' ),
40 + 'tabs' => Utilities::tabs_key_value(),
41 + 'active' => $active_tab,
42 + );
43 + tutor_load_template_from_custom_path(
44 + $navbar_template,
45 + $navbar_data
46 + );
47 + ?>
48 + <!-- navbar end -->
49 +
50 + <!-- sub-page -->
51 + <div>
52 + <?php
53 + // Load page template.
54 + $plugin_data = GoogleMeet::meta_data();
55 +
56 + $template = trailingslashit( $plugin_data['views'] . 'pages' ) . $page_tab . '.php';
57 +
58 + if ( file_exists( $template ) ) {
59 + tutor_load_template_from_custom_path(
60 + $template
61 + );
62 + } else {
63 + tutor_utils()->tutor_empty_state(
64 + __( 'You are trying to access invalid page tab', 'tutor-pro' )
65 + );
66 + }
67 + ?>
68 + </div>
69 + <!-- sub-page end -->
70 + </div>
71 +
72 +