PluginProbe
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score / 1.0
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score v1.0
trunk 1.0 1.0.1 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1 2.1.1 2.1.2 2.2 2.2.1 All 69 releases
powered-cache / includes / admin / settings.php

settings.php in Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score 1.0, at includes/admin/settings.php

160 lines 5.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 * Settings page template
5 *
6 * @package PoweredCache
7 * @subpackage PoweredCache/Settings
8 */
9
10
11 // Exit if accessed directly
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 $object_cache_methods = Powered_Cache_Admin_Helper::available_object_caches();
17 $current_section = isset( $_GET['section'] ) ? $_GET['section'] : 'basic-options';
18 $show_submit = true;
19
20 if ( in_array( $current_section, array( 'extensions', 'premium', 'support' ) ) ) {
21 $show_submit = false;
22 }
23 ?>
24 <div class="wrap">
25 <h1>
26 <img width="22" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGhlaWdodD0iMzJweCIgaWQ9IkxheWVyXzEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHdpZHRoPSIzMnB4IiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNDQgMzM2KSI+PHBhdGggZD0iTS0xMTcuMTc2LTMzNC4wNjNoLTkuMzUzTC0xMzguMTExLTMyMGg5LjMwNGwtMTEuNzQ1LDE0LjA2M2wyNS4xMDUtMTguMzE2aC05LjgwOUwtMTE3LjE3Ni0zMzQuMDYzeiIvPjwvZz48L3N2Zz4=">
27 <?php _e('Powered Cache','powered-cache'); ?>
28 </h1>
29
30
31 <div id="poststuff" class="powered-cache-settings-page">
32
33 <div id="post-body" class="metabox-holder columns-<?php echo( powered_cache_is_premium() ? '1' : '2' ); ?>">
34
35 <h2 class="nav-tab-wrapper powered-cache-settings-nav">
36 <?php
37
38 $sections = Powered_Cache_Admin_Helper::admin_sections();
39 foreach ($sections as $section => $title ): ?>
40 <a
41 href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'powered-cache', 'section' => $section ), 'admin.php' ) ) ); ?>"
42 title="<?php esc_attr_e( $title, 'powered-cache' ); ?>"
43 class="nav-tab <?php echo $current_section == $section ? 'nav-tab-active' : ''; ?>"
44 >
45 <?php esc_attr_e( $title, 'powered-cache' ); ?>
46 </a>
47 <?php endforeach; ?>
48 </h2>
49
50
51
52 <!-- main content -->
53 <div id="post-body-content">
54 <form id="powered-cache-settings-form" method="post" action="" enctype="multipart/form-data" class="powered-cache-form">
55 <?php wp_nonce_field( 'powered_cache_update_settings', 'powered_cache_settings_nonce' ); ?>
56 <input type="hidden" name="action" value="powered_cache_update_settings">
57 <input type="hidden" name="wp_http_referer" value="<?php echo esc_attr( wp_unslash( $_SERVER['REQUEST_URI'] ) ); ?>'" />
58
59 <?php
60 $page = POWERED_CACHE_ADMIN_DIR . 'settings/' . $current_section . '.php';
61 if ( file_exists( $page ) ) {
62 do_action( 'powered_cache_before_load_settings_template_' . $current_section );
63 include $page;
64 do_action( 'powered_cache_after_load_settings_template_' . $current_section );
65 }
66 ?>
67
68
69 <!-- .meta-box-sortables .ui-sortable -->
70 <?php if ( true === $show_submit ): ?>
71 <div class="save">
72 <?php submit_button( __( 'Save Changes', 'powered-cache' ), 'primary', 'submit', false ); ?>
73 </div>
74 <?php endif; ?>
75 </form>
76
77 </div>
78 <!-- post-body-content -->
79
80 <?php if ( ! powered_cache_is_premium() ): ?>
81 <!-- sidebar -->
82 <div id="postbox-container-1" class="postbox-container">
83
84 <div class="sidebar-box">
85
86 <div class="sidebar-postbox">
87
88
89 <div class="inside">
90 <h3 class="powered-cache-sidebar-title"><span><?php _e( "Rate Us!", "powered-cache" ); ?></span> <span class="powered-cache-sidebar-icon dashicons dashicons-heart"></span> </h3>
91 <?php echo sprintf(
92 __( 'We would like to hear your thoughts about our plugin. Please review on <a target="_blank" href="%s">WordPress.org</a>',
93 'powered-cache' ),
94 'https://wordpress.org/support/plugin/powered-cache/reviews/'
95 ); ?>
96 </div>
97 <br>
98
99 <div class="inside">
100 <h3 class="powered-cache-sidebar-title"><span><?php _e( "Become a Premium User", "powered-cache" ); ?></span><span class="powered-cache-sidebar-icon dashicons dashicons-awards"></span></h3>
101 <?php _e( 'Premium users will reach more goodies', 'powered-cache' ); ?>
102 <ul class="premium-benefits">
103 <li>
104 <span class="dashicons dashicons-yes"></span>
105 <?php _e( 'Premium Features', 'powered-cache' ); ?>
106 </li>
107 <li>
108 <span class="dashicons dashicons-yes"></span>
109 <?php _e( 'Premium Extensions', 'powered-cache' ); ?>
110 </li>
111 <li>
112 <span class="dashicons dashicons-yes"></span>
113 <?php _e( 'Friendly Bots', 'powered-cache' ); ?>
114 </li>
115 <li>
116 <span class="dashicons dashicons-yes"></span>
117 <?php _e( 'WP-CLI commands', 'powered-cache' ); ?>
118 </li>
119 <li>
120 <span class="dashicons dashicons-yes"></span>
121 <?php _e( 'Premium Support', 'powered-cache' ); ?>
122 </li>
123 <li>
124 <span class="dashicons dashicons-yes"></span>
125 <?php _e( 'No Ads', 'powered-cache' ); ?>
126 </li>
127 </ul>
128 <a class="get-premium-small" href="https://poweredcache.com"><span><?php echo __( 'Buy Powered Cache Premium', 'powered-cache' ); ?></span></a>
129
130 </div>
131
132 <div class="inside">
133 <h3 class="powered-cache-sidebar-title"><span><?php _e( "Support", "powered-cache" ); ?></span><span class="powered-cache-sidebar-icon dashicons dashicons-sos"></span></h3>
134 <p>
135 <?php _e( 'We are offering direct support to premium users only, free users welcome on WordPress.org forums.', 'powered-cache' ); ?>
136 <br>
137 <?php echo sprintf( __( 'Please check our <a href="%s">support policy</a>', 'powered-cache' ), 'https://poweredcache.com/support-policy/' ); ?>
138 </p>
139 </div>
140
141 <!-- .inside -->
142
143 </div>
144 <!-- .postbox -->
145
146 </div>
147 <!-- .meta-box-sortables -->
148
149 </div>
150 <!-- #postbox-container-1 .postbox-container -->
151 <?php endif; ?>
152
153 </div>
154 <!-- #post-body .metabox-holder .columns-2 -->
155
156 <br class="clear">
157 </div>
158 <!-- #poststuff -->
159
160 </div> <!-- .wrap -->