PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / v1.3
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel vv1.3
1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 1.5.1 All 26 releases
← All changes | views/admin.php +27 -3 0.4.3v1.3 View file →
@@ -1,4 +1,9 @@
1 +<?php
2 +use FlyWP\Helper;
3 +
4 +?>
5 +
1 6 <div class="flywp-settings" id="flywp-settings">
2 7 <div class="fw-mb-8 fw-bg-white fw-border-b fw-border-solid fw-border-gray-200">
3 8 <div class="fw-max-w-xl fw-mx-auto fw-px-4 sm:fw-px-0">
4 9 <div class="fw-flex fw-py-2 fw-items-center fw-justify-between">
@@ -6,16 +11,35 @@
6 11 <img src="<?php echo esc_url( FLYWP_PLUGIN_URL . 'assets/images/flywp-logo.svg' ); ?>" alt="FlyWP" class="fw-h-11 fw-mr-2 fw-inline-block">
7 12 </h1>
8 13
9 14 <div class="">
10 - <a href="https://app.flywp.com" target="_blank" class="button button-secondary"><span class="dashicons dashicons-external fw-mt-1"></span> <?php esc_html_e( 'FlyWP Dashboard', 'flywp' ); ?></a>
15 + <a href="<?php echo esc_url( $app_site_url ); ?>" target="_blank" class="button button-secondary"><span class="dashicons dashicons-external fw-mt-1"></span> <?php esc_html_e( 'FlyWP Dashboard', 'flywp' ); ?></a>
11 16 </div>
12 17 </div>
18 +
19 + <div class="fw-flex -fw-mb-px fw-gap-2">
20 + <?php foreach ( $tabs as $key => $label ) { ?>
21 + <a href="<?php echo esc_url( add_query_arg( [ 'tab' => $key ], $this->page_url() ) ); ?>" class="fw-block fw-px-4 fw-py-3 fw-text-sm -m fw-text-gray-800 fw-no-underline fw-outline-none focus:fw-outline-none <?php echo $key === $active_tab ? 'fw-border-b-2 fw-border-indigo-500 fw-font-semibold' : ''; ?>"><?php echo $label; ?></a>
22 + <?php } ?>
23 + </div>
13 24 </div>
14 25 </div>
15 26
16 27 <div class="fw-max-w-xl fw-mx-auto fw-px-4 sm:fw-px-0">
17 - <?php require __DIR__ . '/page-cache.php'; ?>
18 - <?php require __DIR__ . '/op-cache.php'; ?>
28 + <?php
29 + do_action( 'flywp_admin_tab_content', $active_tab );
30 +
31 + if ( $active_tab === 'cache' ) {
32 + if ( Helper::is_nginx() ) {
33 + require __DIR__ . '/page-cache.php';
34 + } elseif ( Helper::is_litespeed() ) {
35 + require __DIR__ . '/litespeed.php';
36 + }
37 +
38 + require __DIR__ . '/op-cache.php';
39 + } elseif ( $active_tab === 'email' ) {
40 + require __DIR__ . '/email.php';
41 + }
42 + ?>
19 43 </div>
20 44
21 45 </div>