admin-settings-new.php
121 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; |
| 4 | } |
| 5 | ?> |
| 6 | <div class="wrap ahsc-wrapper"> |
| 7 | <div id="ahsc-main"> |
| 8 | |
| 9 | <div class="ahsc-settings-header"> |
| 10 | <h1 class="ahsc-settings-title" style="font-weight: 600!important;color:gray;!important;width:52%;margin:0 auto;"> |
| 11 | <img height="100px" width="100px" style="vertical-align: middle" src="<?php echo esc_html(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_BASEURL']). 'admin' . esc_html(DIRECTORY_SEPARATOR) ?>/assets/img/icon-256x256.png"/> |
| 12 | <?php \esc_html_e( 'Aruba HiSpeed Cache', 'aruba-hispeed-cache' ); ?> |
| 13 | <span style=" background: #eee;color: #50565d8a;padding: 5px;font-size: 12px;vertical-align: middle;"><?php |
| 14 | $ahsc_plugin_data = get_plugin_data( WP_PLUGIN_DIR."/aruba-hispeed-cache/aruba-hispeed-cache.php"); |
| 15 | $ahsc_plugin_version = $ahsc_plugin_data['Version']; |
| 16 | echo esc_html($ahsc_plugin_version);?></span> |
| 17 | </h1> |
| 18 | <div style="position:relative;display:block;margin:0px auto; width:52%; padding:20px 0 20px 0;"> |
| 19 | <?php echo wp_kses( __( 'Aruba HiSpeed Cache is the plugin that allows you to increase page loading speed by optimizing cache management with the support of artificial intelligence and improving your website performance, to offer a better browsing experience to your users.', 'aruba-hispeed-cache' ), array( 'strong' => array() ) ) ?> |
| 20 | </div> |
| 21 | <div class="ahsc-actions-wrapper"> |
| 22 | <table class="button-table ahst-table" style="text-align: inherit!important"> |
| 23 | <tr> |
| 24 | <td> |
| 25 | <?php /* |
| 26 | \submit_button( __( 'Save changes', 'aruba-hispeed-cache' ), 'primary', 'ahsc_settings_save', false, array( 'form' => 'ahsc-settings-form' ) ); |
| 27 | */?> |
| 28 | <a id="purgeall" href="#" class="button button-secondary"> <?php echo \esc_html( __('Purge entire cache', 'aruba-hispeed-cache') ); ?></a> |
| 29 | |
| 30 | <?php |
| 31 | \submit_button( __( 'Reset default value', 'aruba-hispeed-cache' ), 'primary', 'ahsc_reset_save', false, array( 'form' => 'ahsc-settings-form' ) ); |
| 32 | ?> |
| 33 | </td> |
| 34 | </tr> |
| 35 | </table> |
| 36 | </div> |
| 37 | |
| 38 | <h2 class="nav-tab-wrapper ahsc-settings-nav"> |
| 39 | <a class="nav-tab nav-tab-active" data-tab="#general"><?php esc_html_e( 'Cache', 'aruba-hispeed-cache' ); ?></a> |
| 40 | <a class="nav-tab " data-tab="#performance"><?php esc_html_e( 'Performance', 'aruba-hispeed-cache' ); ?></a> |
| 41 | |
| 42 | <?php |
| 43 | $ahsc_headers_data=AHSC_get_headers(); |
| 44 | // $ahsc_data=AHSC_check(); |
| 45 | |
| 46 | if (is_array($ahsc_headers_data) && array_key_exists( 'x-servername', $ahsc_headers_data ) && (false !== strpos( $ahsc_headers_data['x-servername'], 'aruba.it' ) || false !== strpos($ahsc_headers_data['x-servername'],'arubacdn')) ){ |
| 47 | //if(isset($ahsc_data['cdn_status']) & !empty($ahsc_data['cdn_status'])){ |
| 48 | ?> |
| 49 | <a class="nav-tab " data-tab="#cdn"><?php esc_html_e( 'CDN', 'aruba-hispeed-cache' ); ?></a> |
| 50 | <?php } ?> |
| 51 | <?php if (WP_DEBUG && is_dir(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_BASEPATH']."/Debug")) : ?> |
| 52 | <a class="nav-tab" data-tab="#debug"><?php esc_html_e( 'Debug', 'aruba-hispeed-cache' ); ?></a> |
| 53 | <?php |
| 54 | //var_dump(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_OPTIONS']['ahsc_apc']) ; |
| 55 | |
| 56 | if(isset(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_OPTIONS']) && isset(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_OPTIONS']['ahsc_apc']) && AHSC_CONSTANT['ARUBA_HISPEED_CACHE_OPTIONS']['ahsc_apc']!==false ){ ?> |
| 57 | |
| 58 | |
| 59 | <a class="nav-tab " data-tab="#apc"><?php esc_html_e( 'APCu', 'aruba-hispeed-cache' ); ?></a> |
| 60 | <?php } ?> |
| 61 | <?php endif; ?> |
| 62 | </h2> |
| 63 | </div> |
| 64 | <div id="general" class="ahsc-tab ahsc-options-wrapper"> |
| 65 | <div style="padding-top:30px;padding-bottom:30px;"> |
| 66 | <?php |
| 67 | require AHSC_CONSTANT['ARUBA_HISPEED_CACHE_BASEPATH'] . 'admin' . DIRECTORY_SEPARATOR .'pages'.DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'admin-tab-general-new.php'; ?> |
| 68 | |
| 69 | </div> |
| 70 | </div> |
| 71 | <div id="performance" class="ahsc-tab hidden ahsc-options-wrapper"> |
| 72 | <div style="padding-top:30px; padding-bottom:30px;"> |
| 73 | <?php |
| 74 | require AHSC_CONSTANT['ARUBA_HISPEED_CACHE_BASEPATH'] . 'admin' . DIRECTORY_SEPARATOR .'pages'.DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'admin-tab-performance.php'; ?> |
| 75 | </div> |
| 76 | </div> |
| 77 | |
| 78 | <?php |
| 79 | if ( is_array($ahsc_headers_data) && array_key_exists( 'x-servername', $ahsc_headers_data ) && (false !== strpos( $ahsc_headers_data['x-servername'], 'aruba.it' ) || false !== strpos($ahsc_headers_data['x-servername'],'arubacdn')) ){ |
| 80 | // if(isset($ahsc_data['cdn_status']) & !empty($ahsc_data['cdn_status'])){ |
| 81 | ?> |
| 82 | |
| 83 | <div id="cdn" class="ahsc-tab hidden ahsc-options-wrapper"> |
| 84 | <div style="padding-top:30px;padding-bottom:30px;"> |
| 85 | <?php |
| 86 | require AHSC_CONSTANT['ARUBA_HISPEED_CACHE_BASEPATH'] . 'admin' . DIRECTORY_SEPARATOR .'pages'.DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'admin-tab-cdn.php'; |
| 87 | ?> |
| 88 | |
| 89 | </div> |
| 90 | </div> |
| 91 | <?php |
| 92 | } |
| 93 | ?> |
| 94 | <?php if ( WP_DEBUG && is_dir(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_BASEPATH']."/Debug") ) : ?> |
| 95 | |
| 96 | <div id="debug" class="ahsc-tab hidden"> |
| 97 | <div style="padding-top:30px;padding-bottom:30px;margin: 0 auto;width: 52%;"> |
| 98 | <?php require AHSC_CONSTANT['ARUBA_HISPEED_CACHE_BASEPATH']. 'Debug'.DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'admin-tab-debug.php'; ?> |
| 99 | </div> |
| 100 | </div> |
| 101 | |
| 102 | <?php |
| 103 | // var_dump(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_OPTIONS']['ahsc_apc']) ; |
| 104 | |
| 105 | if(isset(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_OPTIONS']) && isset(AHSC_CONSTANT['ARUBA_HISPEED_CACHE_OPTIONS']['ahsc_apc']) && AHSC_CONSTANT['ARUBA_HISPEED_CACHE_OPTIONS']['ahsc_apc']!==false ){ ?> |
| 106 | |
| 107 | <div id="apc" class="ahsc-tab hidden ahsc-options-wrapper"> |
| 108 | <div style="padding-top:30px; padding-bottom:30px;"> |
| 109 | <?php |
| 110 | require AHSC_CONSTANT['ARUBA_HISPEED_CACHE_BASEPATH'] . 'Debug'.DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'admin-tab-apc.php'; ?> |
| 111 | </div> |
| 112 | </div> |
| 113 | |
| 114 | <?php } ?> |
| 115 | |
| 116 | <?php endif; ?> |
| 117 | |
| 118 | </div> <!-- End of #ahsc-main --> |
| 119 | |
| 120 | <div class="clear"></div> |
| 121 | </div> <!-- End of .wrap .ahsc-wrapper --> |