Nginx Helper - Version 1.8

Version Description

  • New admin UI
  • Fix missing wp_sanitize_redirect function call
Download this release

Release Info

Developer faishal
Plugin Icon 128x128 Nginx Helper
Version 1.8
Comparing to
See all releases

Code changes from version 1.7.6 to 1.8

admin/admin.php CHANGED
@@ -4,419 +4,138 @@ namespace rtCamp\WP\Nginx {
4
 
5
  class Admin {
6
 
 
 
 
 
 
7
  function __construct() {
8
- if (is_multisite()) {
9
- add_action('network_admin_menu', array(&$this, 'add_network_menu'));
10
  } else {
11
- add_action('admin_menu', array(&$this, 'add_menu'));
12
  }
13
- add_action('admin_print_scripts-settings_page_nginx', array(&$this, 'load_scripts'));
14
- add_action('admin_print_styles-settings_page_nginx', array(&$this, 'load_styles'));
15
- add_action('admin_bar_menu', array(&$this, 'add_toolbar_purge_item'), 100);
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
 
 
 
 
18
  function add_menu() {
19
- add_submenu_page('options-general.php', 'Nginx Helper', __('Nginx Helper', 'nginx-helper'), 'install_plugins', 'nginx', array(&$this, 'show_menu'));
20
- //add_submenu_page($parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function)
21
  }
22
 
 
 
 
23
  function add_network_menu() {
24
- add_submenu_page('settings.php', 'Nginx Helper', __('Nginx Helper', 'nginx-helper'), 'install_plugins', 'nginx', array(&$this, 'show_menu'));
25
  }
26
 
27
- // load the script for the defined page and load only this code
28
- function show_menu() {
29
-
30
- global $rt_wp_nginx_helper, $rt_wp_nginx_purger;
31
- ;
32
-
33
- $required_page = $_GET['page'];
34
- switch ($required_page) {
35
-
36
- default :
37
-
38
- $update = 0;
39
- $error_time = false;
40
- $error_log_filesize = false;
41
- $rt_wp_nginx_helper->options['enable_purge'] = (isset($_POST['enable_purge']) and ($_POST['enable_purge'] == 1) ) ? 1 : 0;
42
- $rt_wp_nginx_helper->options['enable_map'] = (isset($_POST['enable_map']) and ($_POST['enable_map'] == 1) ) ? 1 : 0;
43
- $rt_wp_nginx_helper->options['enable_log'] = (isset($_POST['enable_log']) and ($_POST['enable_log'] == 1) ) ? 1 : 0;
44
- $rt_wp_nginx_helper->options['enable_stamp'] = (isset($_POST['enable_stamp']) and ($_POST['enable_stamp'] == 1) ) ? 1 : 0;
45
 
46
- if (isset($_POST['is_submit']) && ($_POST['is_submit'] == 1)) {
47
- if (!(!is_network_admin() && is_multisite())) {
48
- if ($rt_wp_nginx_helper->options['enable_log']) {
49
- if (isset($_POST['log_level']) && !empty($_POST['log_level']) && $_POST['log_level'] != '') {
50
- $rt_wp_nginx_helper->options['log_level'] = $_POST['log_level'];
51
- } else {
52
- $rt_wp_nginx_helper->options['log_level'] = 'INFO';
53
- }
54
- if (isset($_POST['log_filesize']) && !empty($_POST['log_filesize']) && $_POST['log_filesize'] != '') {
55
- if ((!is_numeric($_POST['log_filesize'])) || (empty($_POST['log_filesize']))) {
56
- $error_log_filesize = "Log file size must be a number";
57
- } else {
58
- $rt_wp_nginx_helper->options['log_filesize'] = $_POST['log_filesize'];
59
- }
60
- } else {
61
- $rt_wp_nginx_helper->options['log_filesize'] = 5;
62
- }
63
- }
64
- if ($rt_wp_nginx_helper->options['enable_map']) {
65
- $rt_wp_nginx_helper->update_map();
 
 
 
 
66
  }
67
- }
68
- if (isset($_POST['enable_purge'])) {
69
-
70
- $rt_wp_nginx_helper->options['purge_homepage_on_edit'] = (isset($_POST['purge_homepage_on_edit']) and ($_POST['purge_homepage_on_edit'] == 1) ) ? 1 : 0;
71
- $rt_wp_nginx_helper->options['purge_homepage_on_del'] = (isset($_POST['purge_homepage_on_del']) and ($_POST['purge_homepage_on_del'] == 1) ) ? 1 : 0;
72
-
73
- $rt_wp_nginx_helper->options['purge_archive_on_edit'] = (isset($_POST['purge_archive_on_edit']) and ($_POST['purge_archive_on_edit'] == 1) ) ? 1 : 0;
74
- $rt_wp_nginx_helper->options['purge_archive_on_del'] = (isset($_POST['purge_archive_on_del']) and ($_POST['purge_archive_on_del'] == 1) ) ? 1 : 0;
75
-
76
- $rt_wp_nginx_helper->options['purge_archive_on_new_comment'] = (isset($_POST['purge_archive_on_new_comment']) and ($_POST['purge_archive_on_new_comment'] == 1) ) ? 1 : 0;
77
- $rt_wp_nginx_helper->options['purge_archive_on_deleted_comment'] = (isset($_POST['purge_archive_on_deleted_comment']) and ($_POST['purge_archive_on_deleted_comment'] == 1) ) ? 1 : 0;
78
-
79
- $rt_wp_nginx_helper->options['purge_page_on_mod'] = (isset($_POST['purge_page_on_mod']) and ($_POST['purge_page_on_mod'] == 1) ) ? 1 : 0;
80
- $rt_wp_nginx_helper->options['purge_page_on_new_comment'] = (isset($_POST['purge_page_on_new_comment']) and ($_POST['purge_page_on_new_comment'] == 1) ) ? 1 : 0;
81
- $rt_wp_nginx_helper->options['purge_page_on_deleted_comment'] = (isset($_POST['purge_page_on_deleted_comment']) and ($_POST['purge_page_on_deleted_comment'] == 1) ) ? 1 : 0;
82
- }
83
- update_site_option("rt_wp_nginx_helper_options", $rt_wp_nginx_helper->options);
84
-
85
-
86
- $update = 1;
87
- }
88
- $rt_wp_nginx_helper->options = get_site_option("rt_wp_nginx_helper_options");
89
- ?>
90
-
91
- <div class="wrap rt-nginx-wrapper">
92
- <h2><?php _e('Nginx Settings', 'nginx-helper') ?></h2>
93
- <div id="poststuff">
94
- <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
95
- <div id="post-body-content" class="postbox">
96
- <h3 class="hndle">
97
- <span><?php _e('Plugin Options', 'nginx-helper'); ?></span>
98
- </h3>
99
- <form id="purgeall" action="" method="post" class="clearfix">
100
- <div class="inside">
101
- <?php $purge_url = add_query_arg(array('nginx_helper_action' => 'purge', 'nginx_helper_urls' => 'all')); ?>
102
- <?php $nonced_url = wp_nonce_url($purge_url, 'nginx_helper-purge_all'); ?>
103
- <a href="<?php echo $nonced_url; ?>" class="button-primary"><?php _e('Purge Cache', 'nginx-helper'); ?></a>
104
- </div>
105
- </form>
106
- <form id="post_form" method="post" action="#" name="smart_http_expire_form" class="clearfix">
107
- <?php if ( !( !is_network_admin() && is_multisite() ) ) { ?>
108
- <div class="inside">
109
- <input type="hidden" name="is_submit" value="1" />
110
- <table class="form-table">
111
- <tr valign="top">
112
- <td>
113
- <input type="checkbox" value="1" id="enable_purge" name="enable_purge" <?php checked($rt_wp_nginx_helper->options['enable_purge'], 1); ?> />
114
- <label for="enable_purge"><?php _e('Enable Cache Purge (requires external settings for nginx)', 'nginx-helper'); ?></label>
115
- </td>
116
- </tr>
117
- <?php if (is_network_admin()) { ?>
118
- <tr valign="top">
119
- <td>
120
- <input type="checkbox" value="1" id="enable_map" name="enable_map"<?php checked($rt_wp_nginx_helper->options['enable_map'], 1); ?> />
121
- <label for="enable_map"><?php _e('Enable Nginx Map.', 'nginx-helper'); ?></label>
122
- </td>
123
- </tr>
124
- <?php } ?>
125
- <tr valign="top">
126
- <td>
127
- <input type="checkbox" value="1" id="enable_log" name="enable_log"<?php checked($rt_wp_nginx_helper->options['enable_log'], 1); ?> />
128
- <label for="enable_log"><?php _e('Enable Logging', 'nginx-helper'); ?></label>
129
- </td>
130
- </tr>
131
- <tr valign="top">
132
- <td>
133
- <input type="checkbox" value="1" id="enable_stamp" name="enable_stamp"<?php checked($rt_wp_nginx_helper->options['enable_stamp'], 1); ?> />
134
- <label for="enable_stamp"><?php _e('Enable Nginx Timestamp in HTML', 'nginx-helper'); ?></label>
135
- </td>
136
- </tr>
137
- </table>
138
- </div> <!-- End of .inside -->
139
- <?php
140
- $displayvar = '';
141
- if ($rt_wp_nginx_helper->options['enable_purge'] == false) {
142
- $displayvar = ' style="display:none"';
143
- }
144
- ?>
145
- <h3 class="hndle"<?php echo $displayvar; ?>>
146
- <span><?php _e('Purging Options', 'nginx-helper'); ?></span>
147
- </h3>
148
- <div class="inside">
149
-
150
- <table class="form-table rtnginx-table"<?php echo $displayvar; ?>>
151
- <tr valign="top">
152
- <th scope="row"><h4><?php _e('Purge Homepage:', 'nginx-helper'); ?></h4></th>
153
- <td>
154
- <fieldset>
155
- <legend class="screen-reader-text">
156
- <span>&nbsp;<?php _e('when a post/page/custom post is modified or added.', 'nginx-helper'); ?></span>
157
- </legend>
158
- <label for="purge_homepage_on_edit">
159
- <input type="checkbox" value="1" id="purge_homepage_on_edit" name="purge_homepage_on_edit"<?php checked($rt_wp_nginx_helper->options['purge_homepage_on_edit'], 1); ?> />
160
- &nbsp;<?php _e('when a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>.', 'nginx-helper'); ?>
161
- </label><br />
162
- </fieldset>
163
- <fieldset>
164
- <legend class="screen-reader-text">
165
- <span>&nbsp;<?php _e('when an existing post/page/custom post is modified.', 'nginx-helper'); ?></span>
166
- </legend>
167
- <label for="purge_homepage_on_del">
168
- <input type="checkbox" value="1" id="purge_homepage_on_del" name="purge_homepage_on_del"<?php checked($rt_wp_nginx_helper->options['purge_homepage_on_del'], 1); ?> />
169
- &nbsp;<?php _e('when a <strong>published post</strong> (or page/custom post) is <strong>trashed</strong>.', 'nginx-helper'); ?></label><br />
170
- </fieldset>
171
- </td>
172
- </tr>
173
- </table>
174
- <table class="form-table rtnginx-table"<?php echo $displayvar; ?>>
175
- <tr valign="top">
176
- <th scope="row">
177
- <h4><?php _e('Purge Post/Page/Custom Post Type:', 'nginx-helper'); ?></h4>
178
- </th>
179
- <td>
180
- <fieldset>
181
- <legend class="screen-reader-text">
182
- <span>&nbsp;<?php _e('when a post/page/custom post is published.', 'nginx-helper'); ?></span>
183
- </legend>
184
- <label for="purge_page_on_mod">
185
- <input type="checkbox" value="1" id="purge_page_on_mod" name="purge_page_on_mod"<?php checked($rt_wp_nginx_helper->options['purge_page_on_mod'], 1); ?>>
186
- &nbsp;<?php _e('when a <strong>post</strong> is <strong>published</strong>.', 'nginx-helper'); ?>
187
- </label><br />
188
- </fieldset>
189
- <fieldset>
190
- <legend class="screen-reader-text">
191
- <span>&nbsp;<?php _e('when a comment is approved/published.', 'nginx-helper'); ?></span>
192
- </legend>
193
- <label for="purge_page_on_new_comment">
194
- <input type="checkbox" value="1" id="purge_page_on_new_comment" name="purge_page_on_new_comment"<?php checked($rt_wp_nginx_helper->options['purge_page_on_new_comment'], 1); ?>>
195
- &nbsp;<?php _e('when a <strong>comment</strong> is <strong>approved/published</strong>.', 'nginx-helper'); ?>
196
- </label><br />
197
- </fieldset>
198
- <fieldset>
199
- <legend class="screen-reader-text">
200
- <span>&nbsp;<?php _e('when a comment is unapproved/deleted.', 'nginx-helper'); ?></span>
201
- </legend>
202
- <label for="purge_page_on_deleted_comment">
203
- <input type="checkbox" value="1" id="purge_page_on_deleted_comment" name="purge_page_on_deleted_comment"<?php checked($rt_wp_nginx_helper->options['purge_page_on_deleted_comment'], 1); ?>>
204
- &nbsp;<?php _e('when a <strong>comment</strong> is <strong>unapproved/deleted</strong>.', 'nginx-helper'); ?>
205
- </label><br />
206
- </fieldset>
207
- </td>
208
- </tr>
209
- </table>
210
- <table class="form-table rtnginx-table"<?php echo $displayvar; ?>>
211
- <tr valign="top">
212
- <th scope="row">
213
- <h4><?php _e('Purge Archives:', 'nginx-helper'); ?></h4>
214
- <small><?php _e('(date, category, tag, author, custom taxonomies)', 'nginx-helper'); ?></small>
215
- </th>
216
- <td>
217
- <fieldset>
218
- <legend class="screen-reader-text">
219
- <span>&nbsp;<?php _e('when an post/page/custom post is modified or added.</span>', 'nginx-helper'); ?>
220
- </legend>
221
- <label for="purge_archive_on_edit">
222
- <input type="checkbox" value="1" id="purge_archive_on_edit" name="purge_archive_on_edit"<?php checked($rt_wp_nginx_helper->options['purge_archive_on_edit'], 1); ?> />
223
- &nbsp;<?php _e('when a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>.', 'nginx-helper'); ?>
224
- </label><br />
225
- </fieldset>
226
- <fieldset>
227
- <legend class="screen-reader-text">
228
- <span>&nbsp;<?php _e('when an existing post/page/custom post is trashed.</span>', 'nginx-helper'); ?>
229
- </legend>
230
- <label for="purge_archive_on_del">
231
- <input type="checkbox" value="1" id="purge_archive_on_del" name="purge_archive_on_del"<?php checked($rt_wp_nginx_helper->options['purge_archive_on_del'], 1); ?> />
232
- &nbsp;<?php _e('when a <strong>published post</strong> (or page/custom post) is <strong>trashed</strong>.', 'nginx-helper'); ?>
233
- </label><br />
234
- </fieldset>
235
- <br />
236
- <fieldset>
237
- <legend class="screen-reader-text">
238
- <span>&nbsp;<?php _e('when a comment is approved/published.</span>', 'nginx-helper'); ?>
239
- </legend>
240
- <label for="purge_archive_on_new_comment">
241
- <input type="checkbox" value="1" id="purge_archive_on_new_comment" name="purge_archive_on_new_comment"<?php checked($rt_wp_nginx_helper->options['purge_archive_on_new_comment'], 1); ?> />
242
- &nbsp;<?php _e('when a <strong>comment</strong> is <strong>approved/published</strong>.', 'nginx-helper'); ?>
243
- </label><br />
244
- </fieldset>
245
- <fieldset>
246
- <legend class="screen-reader-text">
247
- <span>&nbsp;<?php _e('when a comment is unapproved/deleted.</span>', 'nginx-helper'); ?>
248
- </legend>
249
- <label for="purge_archive_on_deleted_comment">
250
- <input type="checkbox" value="1" id="purge_archive_on_deleted_comment" name="purge_archive_on_deleted_comment"<?php checked($rt_wp_nginx_helper->options['purge_archive_on_deleted_comment'], 1); ?> />
251
- &nbsp;<?php _e('when a <strong>comment</strong> is <strong>unapproved/deleted</strong>.', 'nginx-helper'); ?>
252
- </label><br />
253
- </fieldset>
254
-
255
- </td>
256
- </tr>
257
- </table>
258
- </div> <!-- End of .inside --><?php
259
- } // End of if ( !( !is_network_admin() && is_multisite() ) )
260
-
261
-
262
- if (is_network_admin() && $rt_wp_nginx_helper->options['enable_map'] != false) { ?>
263
- <h3 class="hndle">
264
- <span><?php _e('Nginx Map', 'nginx-helper'); ?></span>
265
- </h3>
266
- <div class="inside">
267
- <?php if ( !is_writable( $rt_wp_nginx_helper->functional_asset_path() . 'map.conf' ) ) { ?>
268
- <span class="error fade" style="display : block"><p><?php printf( __( 'Can\'t write on map file.<br /><br />Check you have write permission on <strong>%s</strong>', 'nginx-helper' ), $rt_wp_nginx_helper->functional_asset_path() . 'map.conf' ); ?></p></span>
269
- <?php } ?>
270
-
271
- <table class="form-table rtnginx-table">
272
- <tr>
273
- <th><?php _e('Nginx Map path to include in nginx settings<br /><small>(recommended)</small>', 'nginx-helper'); ?></th>
274
- <td>
275
- <?php echo $rt_wp_nginx_helper->functional_asset_path() . 'map.conf'; ?>
276
- </td>
277
- </tr>
278
- <tr>
279
- <th><?php _e('Or,<br />Text to manually copy and paste in nginx settings<br /><small>(if your network is small and new sites are not added frequently)</small>', 'nginx-helper'); ?></th>
280
- <td>
281
- <pre id="map"><?php echo $rt_wp_nginx_helper->get_map() ?></pre>
282
- </td>
283
- </tr>
284
- </table>
285
- </div> <!-- End of .inside -->
286
- <?php } ?>
287
-
288
- <?php if ($rt_wp_nginx_helper->options['enable_log'] != false) { ?>
289
- <h3 class="hndle">
290
- <span><?php _e('Logging', 'nginx-helper'); ?></span>
291
- </h3>
292
- <div class="inside">
293
- <?php
294
- $path = $rt_wp_nginx_helper->functional_asset_path();
295
- if (!is_dir($path)) {
296
- mkdir($path);
297
- }
298
- if (!file_exists($path . 'nginx.log')) {
299
- $log = fopen($path . 'nginx.log', 'w');
300
- fclose($log);
301
- }
302
- if (is_writable($path . 'nginx.log')) {
303
- $rt_wp_nginx_purger->log("+++++++++");
304
- $rt_wp_nginx_purger->log("+Log Test");
305
- $rt_wp_nginx_purger->log("+++++++++");
306
- }
307
- if (!is_writable($path . 'nginx.log')) {
308
- ?>
309
- <span class="error fade" style="display : block"><p><?php printf(__('Can\'t write on log file.<br /><br />Check you have write permission on <strong>%s</strong>', 'nginx-helper'), $rt_wp_nginx_helper->functional_asset_path() . 'nginx.log'); ?></p></span>
310
- <?php } ?>
311
-
312
- <table class="form-table rtnginx-table">
313
- <tbody>
314
- <tr>
315
- <th><label for="rt_wp_nginx_helper_logs_path"><?php _e('Logs path', 'nginx-helper'); ?></label></th>
316
- <td><?php echo $rt_wp_nginx_helper->functional_asset_path(); ?>nginx.log</td>
317
- </tr>
318
- <tr>
319
- <th><label for="rt_wp_nginx_helper_logs_link"><?php _e('View Log', 'nginx-helper'); ?></label></th>
320
- <td><a target="_blank" href="<?php echo $rt_wp_nginx_helper->functional_asset_url(); ?>nginx.log"><?php _e('Log', 'nginx-helper'); ?></a></td>
321
- </tr>
322
- <tr>
323
- <th><label for="rt_wp_nginx_helper_log_level"><?php _e('Log level', 'nginx-helper'); ?></label></th>
324
- <td>
325
- <select name="log_level">
326
- <option value="NONE"<?php selected($rt_wp_nginx_helper->options['log_level'], 'NONE'); ?>><?php _e('None', 'nginx-helper'); ?></option>
327
- <option value="INFO"<?php selected($rt_wp_nginx_helper->options['log_level'], 'INFO'); ?>><?php _e('Info', 'nginx-helper'); ?></option>
328
- <option value="WARNING"<?php selected($rt_wp_nginx_helper->options['log_level'], 'WARNING'); ?>><?php _e('Warning', 'nginx-helper'); ?></option>
329
- <option value="ERROR"<?php selected($rt_wp_nginx_helper->options['log_level'], 'ERROR'); ?>><?php _e('Error', 'nginx-helper'); ?></option>
330
- </select>
331
- </td>
332
- </tr>
333
- <tr>
334
- <th><label for="log_filesize"><?php _e('Max log file size', 'nginx-helper'); ?></label></th>
335
- <td>
336
- <input id="log_filesize" class="small-text" type="text" name="log_filesize" value="<?php echo $rt_wp_nginx_helper->options['log_filesize'] ?>" /> <?php _e('Mb', 'nginx-helper');
337
- if ($error_log_filesize) {
338
- ?>
339
- <span class="error fade" style="display: block;">
340
- <p>
341
- <strong><?php echo $error_log_filesize; ?></strong>
342
- </p>
343
- </span><?php }
344
- ?>
345
- </td>
346
- </tr>
347
- </tbody>
348
- </table>
349
- </div> <!-- End of .inside -->
350
- <?php } ?>
351
- <div class="inside">
352
- <p class="submit">
353
- <input type="submit" name="smart_http_expire_save" class="button-primary" value="<?php _e('Save', 'nginx-helper'); ?>" />
354
- </p>
355
- </div>
356
- </form>
357
 
358
- </div>
359
- <div id="postbox-container-1" class="postbox-container">
360
- <?php $this->default_admin_sidebar(); ?>
361
- </div>
362
- </div> <!-- End of #post-body -->
363
- </div> <!-- End of #poststuff -->
364
- </div> <!-- End of .wrap -->
365
- <?php
366
- break;
367
- }
368
  }
369
 
370
- function add_toolbar_purge_item($admin_bar) {
371
- if (!current_user_can('manage_options')) {
372
  return;
373
  }
374
- $purge_url = add_query_arg(array('nginx_helper_action' => 'purge', 'nginx_helper_urls' => 'all'));
375
- $nonced_url = wp_nonce_url($purge_url, 'nginx_helper-purge_all');
376
- $admin_bar->add_menu(array('id' => 'nginx-helper-purge-all', 'title' => __('Purge Cache', 'nginx-helper'), 'href' => $nonced_url, 'meta' => array('title' => __('Purge Cache', 'nginx-helper'),),));
377
  }
378
 
379
- function default_admin_sidebar() {
380
- ?>
381
- <div class="postbox" id="support">
382
- <div title="<?php _e('Click to toggle', 'nginx-helper'); ?>" class="handlediv"><br /></div>
383
- <h3 class="hndle"><span><?php _e('Need Help?', 'nginx-helper'); ?></span></h3>
384
- <div class="inside">
385
- <p>
386
- <?php printf(__('Please use our <a href="%s">free support forum</a>.<span class="nh-aligncenter">OR</span><a href="%s">Hire us!</a> for wordpress on nginx solutions.', 'nginx-helper'), 'http://rtcamp.com/support/forum/wordpress-nginx/', 'http://rtcamp.com/wordpress-nginx/'); ?>
387
- </p>
388
- </div>
389
- </div>
390
- <div class="postbox" id="social">
391
- <div title="<?php _e('Click to toggle', 'nginx-helper'); ?>" class="handlediv"><br /></div>
392
- <h3 class="hndle">
393
- <span><?php _e('Getting Social is Good', 'nginx-helper'); ?></span>
394
- </h3>
395
- <div style="text-align:center;" class="inside">
396
- <a class="nginx-helper-facebook" title="<?php _e('Become a fan on Facebook', 'nginx-helper'); ?>" target="_blank" href="http://www.facebook.com/rtCamp.solutions/"></a>
397
- <a class="nginx-helper-twitter" title="<?php _e('Follow us on Twitter', 'nginx-helper'); ?>" target="_blank" href="https://twitter.com/rtcamp/"></a>
398
- <a class="nginx-helper-rss" title="<?php _e('Subscribe to our feeds', 'nginx-helper'); ?>" target="_blank" href="http://feeds.feedburner.com/rtcamp/"></a>
399
- </div>
400
- </div>
401
-
402
- <div class="postbox" id="latest_news">
403
- <div title="<?php _e('Click to toggle', 'nginx-helper'); ?>" class="handlediv"><br /></div>
404
- <h3 class="hndle"><span><?php _e('Latest News', 'nginx-helper'); ?></span></h3>
405
- <div class="inside"><img src ="<?php echo admin_url(); ?>/images/wpspin_light.gif" /><?php _e('Loading...', 'nginx-helper'); ?></div>
406
- </div><?php
407
- }
408
 
409
- function load_styles() {
410
- wp_enqueue_style('rt-nginx-admin-icon', plugins_url('admin/assets/nginx-helper-icons/css/nginx-fontello.css', dirname(__FILE__)));
411
- wp_enqueue_style('rt-nginx-admin-css', plugins_url('admin/assets/style.css', dirname(__FILE__)));
412
- }
413
 
414
- function load_scripts() {
415
- $admin_js = trailingslashit(site_url()) . '?get_feeds=1';
416
- wp_enqueue_script('nginx-js', plugins_url('admin/assets/nginx.js', dirname(__FILE__)));
417
- wp_localize_script('nginx-js', 'news_url', $admin_js);
418
  }
419
-
420
  }
421
-
422
  }
4
 
5
  class Admin {
6
 
7
+ /**
8
+ * Holds the values to be used in the fields callbacks
9
+ */
10
+ private $nginx_helper_tabs;
11
+
12
  function __construct() {
13
+ if ( is_multisite() ) {
14
+ add_action( 'network_admin_menu', array( &$this, 'add_network_menu' ) );
15
  } else {
16
+ add_action( 'admin_menu', array( &$this, 'add_menu' ) );
17
  }
18
+
19
+ add_action( 'admin_init', array( $this, 'nginx_admin_page_init' ) );
20
+
21
+ /**
22
+ * Define Tabs
23
+ */
24
+ $this->nginx_helper_tabs = apply_filters( 'rt_nginx_helper_tabs', array(
25
+ 'general' => array(
26
+ 'menu_title' => __( 'General', 'nginx-helper' ),
27
+ 'menu_slug' => 'general'
28
+ ),
29
+ 'support' => array(
30
+ 'menu_title' => __( 'Support', 'nginx-helper' ),
31
+ 'menu_slug' => 'support'
32
+ ) )
33
+ );
34
  }
35
 
36
+ /**
37
+ * Add setting sub-menu for single site
38
+ */
39
  function add_menu() {
40
+ add_submenu_page( 'options-general.php', __( 'Nginx Helper', 'nginx-helper' ), __( 'Nginx Helper', 'nginx-helper' ), 'install_plugins', 'nginx', array( &$this, 'nginx_create_admin_page' ) );
 
41
  }
42
 
43
+ /**
44
+ * Add setting sub-menu for multi site
45
+ */
46
  function add_network_menu() {
47
+ add_submenu_page( 'settings.php', __( 'Nginx Helper', 'nginx-helper' ), __( 'Nginx Helper', 'nginx-helper' ), 'install_plugins', 'nginx', array( &$this, 'nginx_create_admin_page' ) );
48
  }
49
 
50
+ /**
51
+ * Create tab with links
52
+ *
53
+ * @param type $current current tab
54
+ */
55
+ function nginx_admin_page_tabs( $current = 'general' ) {
56
+ echo '<h2 class="nav-tab-wrapper">';
57
+ foreach ( $this->nginx_helper_tabs as $tab => $name ) {
58
+ $class = ( $tab == $current ) ? ' nav-tab-active' : '';
59
+ echo '<a class="nav-tab' . $class . '" href="?page=nginx&tab=' . $name['menu_slug'] . '">' . $name['menu_title'] . '</a>';
60
+ }
61
+ echo '</h2>';
62
+ }
 
 
 
 
 
63
 
64
+ /**
65
+ * Options page callback
66
+ */
67
+ function nginx_create_admin_page() {
68
+ global $pagenow;
69
+
70
+ /**
71
+ * Includes PHP files located in 'admin/lib/' folder
72
+ */
73
+ foreach (glob(plugin_dir_path(__FILE__) . "lib/*.php") as $lib_filename) {
74
+ require_once( $lib_filename );
75
+ } ?>
76
+
77
+ <div class="wrap rt-nginx-wrapper">
78
+ <h2 class="rt_option_title"><?php _e( 'Nginx Settings', 'nginx-helper' ); ?></h2>
79
+ <div id="poststuff">
80
+ <div id="post-body" class="metabox-holder columns-2">
81
+ <div id="post-body-content"><?php
82
+
83
+ /* Show Tabs */
84
+ if ( ( 'options-general.php' == $pagenow || 'settings.php' == $pagenow ) && isset( $_GET['tab'] ) ) {
85
+ $this->nginx_admin_page_tabs( $_GET['tab'] );
86
+ } else {
87
+ $this->nginx_admin_page_tabs( 'general' );
88
  }
89
+
90
+ /* Fetch Page Content */
91
+ $current = isset( $_GET['tab'] ) ? $_GET['tab'] : 'general';
92
+ if ( ( 'options-general.php' == $pagenow || 'settings.php' == $pagenow ) && isset( $_GET['page'] ) ) {
93
+ switch ( $current ) {
94
+ case 'general' :
95
+ nginx_general_options_page();
96
+ break;
97
+ case 'support' :
98
+ nginx_support_options_page();
99
+ break;
100
+ }
101
+ } ?>
102
+ </div> <!-- End of #post-body-content -->
103
+ <div id="postbox-container-1" class="postbox-container"><?php
104
+ default_admin_sidebar(); ?>
105
+ </div> <!-- End of #postbox-container-1 -->
106
+ </div> <!-- End of #post-body -->
107
+ </div> <!-- End of #poststuff -->
108
+ </div> <!-- End of .wrap .rt-nginx-wrapper -->
109
+ <?php
110
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
 
112
+ function nginx_admin_page_init() {
113
+ add_action( 'admin_enqueue_scripts', array( $this, 'nginx_admin_enqueue_assets' ), 999 );
114
+ add_action( 'admin_bar_menu', array( &$this, 'nginx_toolbar_purge_item' ), 100 );
 
 
 
 
 
 
 
115
  }
116
 
117
+ function nginx_toolbar_purge_item( $admin_bar ) {
118
+ if ( !current_user_can( 'manage_options' ) ) {
119
  return;
120
  }
121
+ $purge_url = add_query_arg( array( 'nginx_helper_action' => 'purge', 'nginx_helper_urls' => 'all' ) );
122
+ $nonced_url = wp_nonce_url( $purge_url, 'nginx_helper-purge_all' );
123
+ $admin_bar->add_menu( array( 'id' => 'nginx-helper-purge-all', 'title' => __( 'Purge Cache', 'nginx-helper' ), 'href' => $nonced_url, 'meta' => array( 'title' => __( 'Purge Cache', 'nginx-helper' ), ), ) );
124
  }
125
 
126
+ function nginx_admin_enqueue_assets($hook) {
127
+ if ( 'settings_page_nginx' != $hook ) {
128
+ return;
129
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
+ /* Load Plugin CSS */
132
+ wp_enqueue_style('rt-nginx-admin-icon', plugin_dir_url(__FILE__) . 'assets/nginx-helper-icons/css/nginx-fontello.css');
133
+ wp_enqueue_style('rt-nginx-admin-css', plugin_dir_url(__FILE__) . 'assets/style.css');
 
134
 
135
+ /* Load Plugin Scripts */
136
+ $admin_js = trailingslashit( site_url() ) . '?get_feeds=1';
137
+ wp_enqueue_script( 'nginx-js', plugin_dir_url( __FILE__ ) . 'assets/nginx.js', '', '', true );
138
+ wp_localize_script( 'nginx-js', 'news_url', $admin_js );
139
  }
 
140
  }
 
141
  }
admin/assets/nginx-helper-icons/config.json CHANGED
@@ -7,20 +7,26 @@
7
  "ascent": 850,
8
  "glyphs": [
9
  {
10
- "uid": "3e617d8049807e128c80d0344ba09e37",
11
  "css": "rss",
12
- "code": 59394,
13
- "src": "entypo"
14
  },
15
  {
16
- "uid": "d090355c31f497b61d676416c1fd39fb",
17
  "css": "twitter",
18
- "code": 59393,
19
- "src": "entypo"
20
  },
21
  {
22
  "uid": "bc50457410acf467b8b5721240768742",
23
  "css": "facebook",
 
 
 
 
 
 
24
  "code": 59392,
25
  "src": "entypo"
26
  }
7
  "ascent": 850,
8
  "glyphs": [
9
  {
10
+ "uid": "72b1277834cba5b7944b0a6cac7ddb0d",
11
  "css": "rss",
12
+ "code": 59395,
13
+ "src": "fontawesome"
14
  },
15
  {
16
+ "uid": "627abcdb627cb1789e009c08e2678ef9",
17
  "css": "twitter",
18
+ "code": 59394,
19
+ "src": "fontawesome"
20
  },
21
  {
22
  "uid": "bc50457410acf467b8b5721240768742",
23
  "css": "facebook",
24
+ "code": 59393,
25
+ "src": "entypo"
26
+ },
27
+ {
28
+ "uid": "b945f4ac2439565661e8e4878e35d379",
29
+ "css": "gplus",
30
  "code": 59392,
31
  "src": "entypo"
32
  }
admin/assets/nginx-helper-icons/css/nginx-fontello.css CHANGED
@@ -1,10 +1,10 @@
1
  @font-face {
2
  font-family: 'nginx-fontello';
3
- src: url('../font/nginx-fontello.eot?11827046');
4
- src: url('../font/nginx-fontello.eot?11827046#iefix') format('embedded-opentype'),
5
- url('../font/nginx-fontello.woff?11827046') format('woff'),
6
- url('../font/nginx-fontello.ttf?11827046') format('truetype'),
7
- url('../font/nginx-fontello.svg?11827046#nginx-fontello') format('svg');
8
  font-weight: normal;
9
  font-style: normal;
10
  }
@@ -14,7 +14,7 @@
14
  @media screen and (-webkit-min-device-pixel-ratio:0) {
15
  @font-face {
16
  font-family: 'nginx-fontello';
17
- src: url('../font/nginx-fontello.svg?11827046#nginx-fontello') format('svg');
18
  }
19
  }
20
  */
@@ -50,6 +50,7 @@
50
  /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
51
  }
52
 
53
- .nginx-helper-rss:before { content: '\e802'; } /* '' */
54
- .nginx-helper-twitter:before { content: '\e801'; } /* '' */
55
- .nginx-helper-facebook:before { content: '\e800'; } /* '' */
 
1
  @font-face {
2
  font-family: 'nginx-fontello';
3
+ src: url('../font/nginx-fontello.eot?7388141');
4
+ src: url('../font/nginx-fontello.eot?7388141#iefix') format('embedded-opentype'),
5
+ url('../font/nginx-fontello.woff?7388141') format('woff'),
6
+ url('../font/nginx-fontello.ttf?7388141') format('truetype'),
7
+ url('../font/nginx-fontello.svg?7388141#nginx-fontello') format('svg');
8
  font-weight: normal;
9
  font-style: normal;
10
  }
14
  @media screen and (-webkit-min-device-pixel-ratio:0) {
15
  @font-face {
16
  font-family: 'nginx-fontello';
17
+ src: url('../font/nginx-fontello.svg?7388141#nginx-fontello') format('svg');
18
  }
19
  }
20
  */
50
  /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
51
  }
52
 
53
+ .nginx-helper-rss:before { content: '\e803'; } /* '' */
54
+ .nginx-helper-twitter:before { content: '\e802'; } /* '' */
55
+ .nginx-helper-facebook:before { content: '\e801'; } /* '' */
56
+ .nginx-helper-gplus:before { content: '\e800'; } /* '' */
admin/assets/nginx-helper-icons/font/nginx-fontello.eot CHANGED
Binary file
admin/assets/nginx-helper-icons/font/nginx-fontello.svg CHANGED
@@ -6,9 +6,10 @@
6
  <font id="nginx-fontello" horiz-adv-x="1000" >
7
  <font-face font-family="nginx-fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
  <missing-glyph horiz-adv-x="1000" />
9
- <glyph glyph-name="rss" unicode="&#xe802;" d="m0 730q314 0 537-223t223-537l-118 0q0 266-188 453t-454 187l0 120z m0-238q218 0 371-153t153-369l-118 0q0 166-119 285t-287 119l0 118z m114-296q46 0 80-33t34-81q0-46-34-79t-80-33t-80 33t-34 79q0 48 34 81t80 33z" horiz-adv-x="760" />
10
- <glyph glyph-name="twitter" unicode="&#xe801;" d="m920 636q-36-54-94-98l0-24q0-130-60-250t-186-203t-290-83q-160 0-290 84q14-2 46-2q132 0 234 80q-62 2-110 38t-66 94q10-4 34-4q26 0 50 6q-66 14-108 66t-42 120l0 2q36-20 84-24q-84 58-84 158q0 48 26 94q154-188 390-196q-6 18-6 42q0 78 55 133t135 55q82 0 136-58q60 12 120 44q-20-66-82-104q56 8 108 30z" horiz-adv-x="920" />
11
- <glyph glyph-name="facebook" unicode="&#xe800;" d="m500 644l-142 0q-14 0-25-15t-11-37l0-102l178 0l0-148l-178 0l0-442l-170 0l0 442l-152 0l0 148l152 0l0 86q0 94 59 159t147 65l142 0l0-156z" horiz-adv-x="500" />
 
12
  </font>
13
  </defs>
14
  </svg>
6
  <font id="nginx-fontello" horiz-adv-x="1000" >
7
  <font-face font-family="nginx-fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
  <missing-glyph horiz-adv-x="1000" />
9
+ <glyph glyph-name="rss" unicode="&#xe803;" d="m214 100q0-45-31-76t-76-31t-76 31t-31 76t31 76t76 31t76-31t31-76z m286-69q1-15-9-26q-11-12-27-12h-75q-14 0-24 9t-11 23q-12 128-103 219t-219 103q-14 1-23 11t-9 24v75q0 16 12 26q9 10 24 10h3q89-7 170-45t145-101q63-63 101-145t45-171z m286-1q1-15-10-26q-10-11-26-11h-80q-14 0-25 10t-11 23q-6 120-56 228t-129 188t-188 129t-227 57q-14 0-24 11t-10 24v80q0 15 11 26q10 10 25 10h1q147-8 280-67t238-164q104-104 164-238t67-280z" horiz-adv-x="785.7" />
10
+ <glyph glyph-name="twitter" unicode="&#xe802;" d="m904 622q-37-54-90-93q0-8 0-23q0-73-21-145t-64-139t-103-117t-144-82t-181-30q-151 0-276 81q19-3 43-3q126 0 224 77q-59 2-105 36t-64 89q19-2 34-2q24 0 48 6q-63 13-104 62t-41 115v2q38-21 82-23q-37 25-59 64t-22 86q0 49 25 91q68-83 164-133t208-55q-5 21-5 41q0 75 53 127t127 53q79 0 132-57q61 12 114 44q-20-64-79-100q52 6 104 28z" horiz-adv-x="928.6" />
11
+ <glyph glyph-name="facebook" unicode="&#xe801;" d="m500 644l-142 0q-14 0-25-15t-11-37l0-102l178 0l0-148l-178 0l0-442l-170 0l0 442l-152 0l0 148l152 0l0 86q0 94 59 159t147 65l142 0l0-156z" horiz-adv-x="500" />
12
+ <glyph glyph-name="gplus" unicode="&#xe800;" d="m48 572q0 58 25 102t56 65t69 34t56 15t26 2l230 0l0-4q0-22-78-36q-28 0-38-6q40-20 54-56t14-96q0-102-68-158q-38-38-38-54q0-18 50-64q104-90 104-178q0-140-116-194q-68-34-150-34l-4 0l-4 2q-2-2-4-2q-24 0-54 5t-75 21t-74 57t-29 103q0 60 32 101t83 57t88 22t71 6l2 0q-16 22-24 47t-8 39l2 14l-14 0q-64 0-110 30q-74 44-74 160z m370-452q-4 52-43 84t-103 32l-16 0q-64-2-114-46q-46-42-42-94t53-80t119-24q68 4 109 40t37 88z m-60 500q-30 108-122 108q-12 0-20-2q-40-12-58-62q-16-50-2-106q14-52 47-85t71-33q12 0 18 2q42 12 63 65t3 113z m388-174l150 0l0-94l-150 0l0-150l-94 0l0 150l-150 0l0 94l150 0l0 150l94 0l0-150z" horiz-adv-x="896" />
13
  </font>
14
  </defs>
15
  </svg>
admin/assets/nginx-helper-icons/font/nginx-fontello.ttf CHANGED
Binary file
admin/assets/nginx-helper-icons/font/nginx-fontello.woff CHANGED
Binary file
admin/assets/nginx.js CHANGED
@@ -5,4 +5,22 @@ jQuery(document).ready(function() {
5
  news_section.find('.inside').html(data);
6
  });
7
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  });
5
  news_section.find('.inside').html(data);
6
  });
7
  }
8
+
9
+ /**
10
+ * Show OR Hide options on option checkbox
11
+ * @param {type} selector Selector of Checkbox and PostBox
12
+ */
13
+ function nginx_show_option( selector ) {
14
+ jQuery( '#'+selector ).on( 'change', function (){
15
+ if ( jQuery(this).is( ':checked' ) ) {
16
+ jQuery( '.'+selector ).show();
17
+ } else {
18
+ jQuery( '.'+selector ).hide();
19
+ }
20
+ } );
21
+ }
22
+ /* Function call with parameter */
23
+ nginx_show_option( 'enable_purge' );
24
+ nginx_show_option( 'enable_map' );
25
+ nginx_show_option( 'enable_log' );
26
  });
admin/assets/style.css CHANGED
@@ -2,16 +2,20 @@
2
  .clearfix:before, .clearfix:after { content: " "; display: table; }
3
  .clearfix:after { clear: both; }
4
  h4 { margin: 0; }
5
- .rt-nginx-wrapper .form-table td { padding: 5px; }
6
  .form-table th, .form-wrap label { vertical-align: middle; }
7
  table.rtnginx-table { border-bottom: 1px solid #EEE; }
 
 
8
  pre#map { background: #e5e5e5 none; border-radius: 10px; padding: 10px; }
9
- .wrap h2 { background: url(nginx-icon-32x32.png) 0 6px no-repeat rgba(0, 0, 0, 0); padding-left: 40px; }
10
- form#purgeall .button-primary { float: right; height: 32px; line-height: 32px; font-weight: bold; font-size: 16px; }
 
 
11
  .nh-aligncenter { display: block; text-align: center; line-height: 2; }
12
- #latest_news .inside ul { margin: 0 0 0 12px }
13
- #latest_news .inside ul li { list-style: square; padding: 0 0 7px; }
14
  #social .inside a { background-color: #666;color: #FFF;display: inline-block;height: 30px;font-size: 1.25rem;line-height: 30px;margin: 10px 20px 0 0;overflow: hidden;padding: 0;text-align: center;text-decoration: none;width: 30px;-webkit-border-radius: 1000px;-moz-border-radius: 1000px;border-radius: 1000px; }
15
  #social .inside .nginx-helper-rss:hover { background-color: #FAA33D; }
16
  #social .inside .nginx-helper-facebook:hover { background-color: #537BBD; }
17
- #social .inside .nginx-helper-twitter:hover { background-color: #40BFF5; }
 
2
  .clearfix:before, .clearfix:after { content: " "; display: table; }
3
  .clearfix:after { clear: both; }
4
  h4 { margin: 0; }
 
5
  .form-table th, .form-wrap label { vertical-align: middle; }
6
  table.rtnginx-table { border-bottom: 1px solid #EEE; }
7
+ table.rtnginx-table:last-child { border-bottom: 0; }
8
+ .rtnginx-table p.error { color: red; }
9
  pre#map { background: #e5e5e5 none; border-radius: 10px; padding: 10px; }
10
+ .wrap h2.rt_option_title { background: url(nginx-icon-32x32.png) 0 6px no-repeat rgba(0, 0, 0, 0); padding-left: 40px; }
11
+ #poststuff h2 { padding: 0 0 0 10px; margin-top: 0; }
12
+ form#purgeall .button-primary { box-shadow: inset 0 -2px rgba(0, 0, 0, 0.14);padding: 15px 30px;font-size: 1rem;border: 0;border-radius: 5px;color: #FFF;background: #DD3D36; height: auto; }
13
+ form#purgeall .button-primary:hover, form#purgeall .button-primary:focus { background: #d52c24; }
14
  .nh-aligncenter { display: block; text-align: center; line-height: 2; }
15
+ #latest_news .inside ul, #useful-links .inside ul { margin: 0 0 0 12px }
16
+ #latest_news .inside ul li, #useful-links .inside ul li { list-style: square; padding: 0 0 7px; }
17
  #social .inside a { background-color: #666;color: #FFF;display: inline-block;height: 30px;font-size: 1.25rem;line-height: 30px;margin: 10px 20px 0 0;overflow: hidden;padding: 0;text-align: center;text-decoration: none;width: 30px;-webkit-border-radius: 1000px;-moz-border-radius: 1000px;border-radius: 1000px; }
18
  #social .inside .nginx-helper-rss:hover { background-color: #FAA33D; }
19
  #social .inside .nginx-helper-facebook:hover { background-color: #537BBD; }
20
+ #social .inside .nginx-helper-twitter:hover { background-color: #40BFF5; }
21
+ #social .inside .nginx-helper-gplus:hover { background-color: #DD4B39; }
admin/lib/nginx-general.php ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace rtCamp\WP\Nginx {
4
+
5
+ function nginx_general_options_page() {
6
+ global $rt_wp_nginx_helper, $rt_wp_nginx_purger;
7
+
8
+ $update = 0;
9
+ $error_time = false;
10
+ $error_log_filesize = false;
11
+ $rt_wp_nginx_helper->options['enable_purge'] = (isset($_POST['enable_purge']) and ($_POST['enable_purge'] == 1) ) ? 1 : 0;
12
+ $rt_wp_nginx_helper->options['enable_map'] = (isset($_POST['enable_map']) and ($_POST['enable_map'] == 1) ) ? 1 : 0;
13
+ $rt_wp_nginx_helper->options['enable_log'] = (isset($_POST['enable_log']) and ($_POST['enable_log'] == 1) ) ? 1 : 0;
14
+ $rt_wp_nginx_helper->options['enable_stamp'] = (isset($_POST['enable_stamp']) and ($_POST['enable_stamp'] == 1) ) ? 1 : 0;
15
+
16
+ if ( isset( $_POST['is_submit'] ) && ( $_POST['is_submit'] == 1 ) ) {
17
+ if ( !( !is_network_admin() && is_multisite() ) ) {
18
+ if ( $rt_wp_nginx_helper->options['enable_log'] ) {
19
+ if ( isset( $_POST['log_level'] ) && !empty( $_POST['log_level'] ) && $_POST['log_level'] != '' ) {
20
+ $rt_wp_nginx_helper->options['log_level'] = $_POST['log_level'];
21
+ } else {
22
+ $rt_wp_nginx_helper->options['log_level'] = 'INFO';
23
+ }
24
+ if ( isset( $_POST['log_filesize'] ) && !empty( $_POST['log_filesize'] ) && $_POST['log_filesize'] != '' ) {
25
+ if ( ( !is_numeric( $_POST['log_filesize'] ) ) || ( empty( $_POST['log_filesize'] ) ) ) {
26
+ $error_log_filesize = __( 'Log file size must be a number', 'nginx-helper' );
27
+ } else {
28
+ $rt_wp_nginx_helper->options['log_filesize'] = $_POST['log_filesize'];
29
+ }
30
+ } else {
31
+ $rt_wp_nginx_helper->options['log_filesize'] = 5;
32
+ }
33
+ }
34
+ if ( $rt_wp_nginx_helper->options['enable_map'] ) {
35
+ $rt_wp_nginx_helper->update_map();
36
+ }
37
+ }
38
+ if ( isset( $_POST['enable_purge'] ) ) {
39
+ $rt_wp_nginx_helper->options['purge_homepage_on_edit'] = ( isset($_POST['purge_homepage_on_edit'] ) and ( $_POST['purge_homepage_on_edit'] == 1 ) ) ? 1 : 0;
40
+ $rt_wp_nginx_helper->options['purge_homepage_on_del'] = ( isset($_POST['purge_homepage_on_del'] ) and ( $_POST['purge_homepage_on_del'] == 1 ) ) ? 1 : 0;
41
+
42
+ $rt_wp_nginx_helper->options['purge_archive_on_edit'] = ( isset($_POST['purge_archive_on_edit'] ) and ( $_POST['purge_archive_on_edit'] == 1 ) ) ? 1 : 0;
43
+ $rt_wp_nginx_helper->options['purge_archive_on_del'] = ( isset($_POST['purge_archive_on_del'] ) and ( $_POST['purge_archive_on_del'] == 1 ) ) ? 1 : 0;
44
+
45
+ $rt_wp_nginx_helper->options['purge_archive_on_new_comment'] = ( isset( $_POST['purge_archive_on_new_comment'] ) and ( $_POST['purge_archive_on_new_comment'] == 1 ) ) ? 1 : 0;
46
+ $rt_wp_nginx_helper->options['purge_archive_on_deleted_comment'] = ( isset( $_POST['purge_archive_on_deleted_comment'] ) and ( $_POST['purge_archive_on_deleted_comment'] == 1 ) ) ? 1 : 0;
47
+
48
+ $rt_wp_nginx_helper->options['purge_page_on_mod'] = ( isset( $_POST['purge_page_on_mod'] ) and ( $_POST['purge_page_on_mod'] == 1 ) ) ? 1 : 0;
49
+ $rt_wp_nginx_helper->options['purge_page_on_new_comment'] = ( isset( $_POST['purge_page_on_new_comment'] ) and ( $_POST['purge_page_on_new_comment'] == 1 ) ) ? 1 : 0;
50
+ $rt_wp_nginx_helper->options['purge_page_on_deleted_comment'] = ( isset( $_POST['purge_page_on_deleted_comment'] ) and ( $_POST['purge_page_on_deleted_comment'] == 1 ) ) ? 1 : 0;
51
+ }
52
+ update_site_option( 'rt_wp_nginx_helper_options', $rt_wp_nginx_helper->options );
53
+ $update = 1;
54
+ }
55
+ $rt_wp_nginx_helper->options = get_site_option( 'rt_wp_nginx_helper_options' );
56
+
57
+ /**
58
+ * Show Update Message
59
+ */
60
+ if ( isset( $_POST['smart_http_expire_save'] ) ) {
61
+ echo '<div class="updated"><p>' . __( 'Settings saved.', 'nginx-helper' ) . '</p></div>';
62
+ }
63
+
64
+ /**
65
+ * Check for single multiple with subdomain OR multiple with subdirectory site
66
+ */
67
+ $nginx_setting_link = '#';
68
+ if ( is_multisite() ) {
69
+ if ( SUBDOMAIN_INSTALL == false ) {
70
+ $nginx_setting_link = 'https://rtcamp.com/wordpress-nginx/tutorials/multisite/subdirectories/fastcgi-cache-with-purging/';
71
+ } else {
72
+ $nginx_setting_link = 'https://rtcamp.com/wordpress-nginx/tutorials/multisite/subdomains/fastcgi-cache-with-purging/';
73
+ }
74
+ } else {
75
+ $nginx_setting_link = 'https://rtcamp.com/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/';
76
+ } ?>
77
+ <div class="postbox">
78
+ <h3 class="hndle">
79
+ <span><?php _e( 'Purge Cache', 'nginx-helper' ); ?></span>
80
+ </h3>
81
+ <form id="purgeall" action="" method="post" class="clearfix">
82
+ <div class="inside">
83
+ <?php $purge_url = add_query_arg( array( 'nginx_helper_action' => 'purge', 'nginx_helper_urls' => 'all' ) ); ?>
84
+ <?php $nonced_url = wp_nonce_url( $purge_url, 'nginx_helper-purge_all' ); ?>
85
+ <table class="form-table">
86
+ <tr valign="top">
87
+ <th><?php _e( 'Purge All Cache', 'nginx-helper' ); ?></th>
88
+ <td>
89
+ <a href="<?php echo $nonced_url; ?>" class="button-primary"><?php _e( 'Purge Cache', 'nginx-helper' ); ?></a>
90
+ </td>
91
+ </tr>
92
+ </table>
93
+ </div>
94
+ </form>
95
+ </div> <!-- End of .postbox -->
96
+ <form id="post_form" method="post" action="#" name="smart_http_expire_form" class="clearfix">
97
+ <div class="postbox">
98
+ <h3 class="hndle">
99
+ <span><?php _e('Plugin Options', 'nginx-helper'); ?></span>
100
+ </h3>
101
+ <?php if ( !( !is_network_admin() && is_multisite() ) ) { ?>
102
+ <div class="inside">
103
+ <input type="hidden" name="is_submit" value="1" />
104
+ <table class="form-table">
105
+ <tr valign="top">
106
+ <td>
107
+ <input type="checkbox" value="1" id="enable_purge" name="enable_purge" <?php checked($rt_wp_nginx_helper->options['enable_purge'], 1); ?> />
108
+ <label for="enable_purge">
109
+ <?php printf( __( 'Enable Cache Purge (<a target="_blank" href="%s" title="External settings for nginx">requires external settings for nginx</a>)', 'nginx-helper' ), $nginx_setting_link ); ?>
110
+ </label>
111
+ </td>
112
+ </tr>
113
+ <?php if ( is_network_admin() ) { ?>
114
+ <tr valign="top">
115
+ <td>
116
+ <input type="checkbox" value="1" id="enable_map" name="enable_map"<?php checked($rt_wp_nginx_helper->options['enable_map'], 1); ?> />
117
+ <label for="enable_map"><?php _e('Enable Nginx Map.', 'nginx-helper'); ?></label>
118
+ </td>
119
+ </tr>
120
+ <?php } ?>
121
+ <tr valign="top">
122
+ <td>
123
+ <input type="checkbox" value="1" id="enable_log" name="enable_log"<?php checked($rt_wp_nginx_helper->options['enable_log'], 1); ?> />
124
+ <label for="enable_log"><?php _e('Enable Logging', 'nginx-helper'); ?></label>
125
+ </td>
126
+ </tr>
127
+ <tr valign="top">
128
+ <td>
129
+ <input type="checkbox" value="1" id="enable_stamp" name="enable_stamp"<?php checked($rt_wp_nginx_helper->options['enable_stamp'], 1); ?> />
130
+ <label for="enable_stamp"><?php _e('Enable Nginx Timestamp in HTML', 'nginx-helper'); ?></label>
131
+ </td>
132
+ </tr>
133
+ </table>
134
+ </div> <!-- End of .inside -->
135
+ </div>
136
+
137
+ <div class="postbox enable_purge"<?php echo ( $rt_wp_nginx_helper->options['enable_purge'] == false ) ? ' style="display: none;"' : ''; ?>>
138
+ <h3 class="hndle">
139
+ <span><?php _e('Purging Options', 'nginx-helper'); ?></span>
140
+ </h3>
141
+ <div class="inside">
142
+
143
+ <table class="form-table rtnginx-table">
144
+ <tr valign="top">
145
+ <th scope="row"><h4><?php _e('Purge Homepage:', 'nginx-helper'); ?></h4></th>
146
+ <td>
147
+ <fieldset>
148
+ <legend class="screen-reader-text">
149
+ <span>&nbsp;<?php _e('when a post/page/custom post is modified or added.', 'nginx-helper'); ?></span>
150
+ </legend>
151
+ <label for="purge_homepage_on_edit">
152
+ <input type="checkbox" value="1" id="purge_homepage_on_edit" name="purge_homepage_on_edit"<?php checked($rt_wp_nginx_helper->options['purge_homepage_on_edit'], 1); ?> />
153
+ &nbsp;<?php _e('when a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>.', 'nginx-helper'); ?>
154
+ </label><br />
155
+ </fieldset>
156
+ <fieldset>
157
+ <legend class="screen-reader-text">
158
+ <span>&nbsp;<?php _e('when an existing post/page/custom post is modified.', 'nginx-helper'); ?></span>
159
+ </legend>
160
+ <label for="purge_homepage_on_del">
161
+ <input type="checkbox" value="1" id="purge_homepage_on_del" name="purge_homepage_on_del"<?php checked($rt_wp_nginx_helper->options['purge_homepage_on_del'], 1); ?> />
162
+ &nbsp;<?php _e('when a <strong>published post</strong> (or page/custom post) is <strong>trashed</strong>.', 'nginx-helper'); ?></label><br />
163
+ </fieldset>
164
+ </td>
165
+ </tr>
166
+ </table>
167
+ <table class="form-table rtnginx-table">
168
+ <tr valign="top">
169
+ <th scope="row">
170
+ <h4><?php _e('Purge Post/Page/Custom Post Type:', 'nginx-helper'); ?></h4>
171
+ </th>
172
+ <td>
173
+ <fieldset>
174
+ <legend class="screen-reader-text">
175
+ <span>&nbsp;<?php _e('when a post/page/custom post is published.', 'nginx-helper'); ?></span>
176
+ </legend>
177
+ <label for="purge_page_on_mod">
178
+ <input type="checkbox" value="1" id="purge_page_on_mod" name="purge_page_on_mod"<?php checked($rt_wp_nginx_helper->options['purge_page_on_mod'], 1); ?>>
179
+ &nbsp;<?php _e('when a <strong>post</strong> is <strong>published</strong>.', 'nginx-helper'); ?>
180
+ </label><br />
181
+ </fieldset>
182
+ <fieldset>
183
+ <legend class="screen-reader-text">
184
+ <span>&nbsp;<?php _e('when a comment is approved/published.', 'nginx-helper'); ?></span>
185
+ </legend>
186
+ <label for="purge_page_on_new_comment">
187
+ <input type="checkbox" value="1" id="purge_page_on_new_comment" name="purge_page_on_new_comment"<?php checked($rt_wp_nginx_helper->options['purge_page_on_new_comment'], 1); ?>>
188
+ &nbsp;<?php _e('when a <strong>comment</strong> is <strong>approved/published</strong>.', 'nginx-helper'); ?>
189
+ </label><br />
190
+ </fieldset>
191
+ <fieldset>
192
+ <legend class="screen-reader-text">
193
+ <span>&nbsp;<?php _e('when a comment is unapproved/deleted.', 'nginx-helper'); ?></span>
194
+ </legend>
195
+ <label for="purge_page_on_deleted_comment">
196
+ <input type="checkbox" value="1" id="purge_page_on_deleted_comment" name="purge_page_on_deleted_comment"<?php checked($rt_wp_nginx_helper->options['purge_page_on_deleted_comment'], 1); ?>>
197
+ &nbsp;<?php _e('when a <strong>comment</strong> is <strong>unapproved/deleted</strong>.', 'nginx-helper'); ?>
198
+ </label><br />
199
+ </fieldset>
200
+ </td>
201
+ </tr>
202
+ </table>
203
+ <table class="form-table rtnginx-table">
204
+ <tr valign="top">
205
+ <th scope="row">
206
+ <h4><?php _e('Purge Archives:', 'nginx-helper'); ?></h4>
207
+ <small><?php _e('(date, category, tag, author, custom taxonomies)', 'nginx-helper'); ?></small>
208
+ </th>
209
+ <td>
210
+ <fieldset>
211
+ <legend class="screen-reader-text">
212
+ <span>&nbsp;<?php _e('when an post/page/custom post is modified or added.</span>', 'nginx-helper'); ?>
213
+ </legend>
214
+ <label for="purge_archive_on_edit">
215
+ <input type="checkbox" value="1" id="purge_archive_on_edit" name="purge_archive_on_edit"<?php checked($rt_wp_nginx_helper->options['purge_archive_on_edit'], 1); ?> />
216
+ &nbsp;<?php _e('when a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>.', 'nginx-helper'); ?>
217
+ </label><br />
218
+ </fieldset>
219
+ <fieldset>
220
+ <legend class="screen-reader-text">
221
+ <span>&nbsp;<?php _e('when an existing post/page/custom post is trashed.</span>', 'nginx-helper'); ?>
222
+ </legend>
223
+ <label for="purge_archive_on_del">
224
+ <input type="checkbox" value="1" id="purge_archive_on_del" name="purge_archive_on_del"<?php checked($rt_wp_nginx_helper->options['purge_archive_on_del'], 1); ?> />
225
+ &nbsp;<?php _e('when a <strong>published post</strong> (or page/custom post) is <strong>trashed</strong>.', 'nginx-helper'); ?>
226
+ </label><br />
227
+ </fieldset>
228
+ <br />
229
+ <fieldset>
230
+ <legend class="screen-reader-text">
231
+ <span>&nbsp;<?php _e('when a comment is approved/published.</span>', 'nginx-helper'); ?>
232
+ </legend>
233
+ <label for="purge_archive_on_new_comment">
234
+ <input type="checkbox" value="1" id="purge_archive_on_new_comment" name="purge_archive_on_new_comment"<?php checked($rt_wp_nginx_helper->options['purge_archive_on_new_comment'], 1); ?> />
235
+ &nbsp;<?php _e('when a <strong>comment</strong> is <strong>approved/published</strong>.', 'nginx-helper'); ?>
236
+ </label><br />
237
+ </fieldset>
238
+ <fieldset>
239
+ <legend class="screen-reader-text">
240
+ <span>&nbsp;<?php _e('when a comment is unapproved/deleted.</span>', 'nginx-helper'); ?>
241
+ </legend>
242
+ <label for="purge_archive_on_deleted_comment">
243
+ <input type="checkbox" value="1" id="purge_archive_on_deleted_comment" name="purge_archive_on_deleted_comment"<?php checked($rt_wp_nginx_helper->options['purge_archive_on_deleted_comment'], 1); ?> />
244
+ &nbsp;<?php _e('when a <strong>comment</strong> is <strong>unapproved/deleted</strong>.', 'nginx-helper'); ?>
245
+ </label><br />
246
+ </fieldset>
247
+
248
+ </td>
249
+ </tr>
250
+ </table>
251
+ </div> <!-- End of .inside -->
252
+ </div><?php
253
+ } // End of if ( !( !is_network_admin() && is_multisite() ) )
254
+
255
+
256
+ if ( is_network_admin() ) { ?>
257
+ <div class="postbox enable_map"<?php echo ( $rt_wp_nginx_helper->options['enable_map'] == false ) ? ' style="display: none;"' : ''; ?>>
258
+ <h3 class="hndle">
259
+ <span><?php _e('Nginx Map', 'nginx-helper'); ?></span>
260
+ </h3>
261
+ <div class="inside"><?php
262
+ if ( !is_writable( $rt_wp_nginx_helper->functional_asset_path() . 'map.conf' ) ) { ?>
263
+ <span class="error fade" style="display: block"><p><?php printf(__('Can\'t write on map file.<br /><br />Check you have write permission on <strong>%s</strong>', 'nginx-helper'), $rt_wp_nginx_helper->functional_asset_path() . 'map.conf'); ?></p></span><?php
264
+ } ?>
265
+
266
+ <table class="form-table rtnginx-table">
267
+ <tr>
268
+ <th><?php _e('Nginx Map path to include in nginx settings<br /><small>(recommended)</small>', 'nginx-helper'); ?></th>
269
+ <td>
270
+ <pre><?php echo $rt_wp_nginx_helper->functional_asset_path() . 'map.conf'; ?></pre>
271
+ </td>
272
+ </tr>
273
+ <tr>
274
+ <th><?php _e('Or,<br />Text to manually copy and paste in nginx settings<br /><small>(if your network is small and new sites are not added frequently)</small>', 'nginx-helper'); ?></th>
275
+ <td>
276
+ <pre id="map"><?php echo $rt_wp_nginx_helper->get_map() ?></pre>
277
+ </td>
278
+ </tr>
279
+ </table>
280
+ </div> <!-- End of .inside -->
281
+ </div>
282
+ <?php } ?>
283
+
284
+ <div class="postbox enable_log"<?php echo ( $rt_wp_nginx_helper->options['enable_log'] == false ) ? ' style="display: none;"' : ''; ?>>
285
+ <h3 class="hndle">
286
+ <span><?php _e('Logging Options', 'nginx-helper'); ?></span>
287
+ </h3>
288
+ <div class="inside">
289
+ <?php
290
+ $path = $rt_wp_nginx_helper->functional_asset_path();
291
+ if (!is_dir($path)) {
292
+ mkdir($path);
293
+ }
294
+ if (!file_exists($path . 'nginx.log')) {
295
+ $log = fopen($path . 'nginx.log', 'w');
296
+ fclose($log);
297
+ }
298
+ if (is_writable($path . 'nginx.log')) {
299
+ $rt_wp_nginx_purger->log("+++++++++");
300
+ $rt_wp_nginx_purger->log("+Log Test");
301
+ $rt_wp_nginx_purger->log("+++++++++");
302
+ }
303
+ if (!is_writable($path . 'nginx.log')) { ?>
304
+ <span class="error fade" style="display : block"><p><?php printf(__('Can\'t write on log file.<br /><br />Check you have write permission on <strong>%s</strong>', 'nginx-helper'), $rt_wp_nginx_helper->functional_asset_path() . 'nginx.log'); ?></p></span><?php
305
+ } ?>
306
+
307
+ <table class="form-table rtnginx-table">
308
+ <tbody>
309
+ <tr>
310
+ <th><label for="rt_wp_nginx_helper_logs_path"><?php _e('Logs path', 'nginx-helper'); ?></label></th>
311
+ <td><pre><?php echo $rt_wp_nginx_helper->functional_asset_path(); ?>nginx.log</pre></td>
312
+ </tr>
313
+ <tr>
314
+ <th><label for="rt_wp_nginx_helper_logs_link"><?php _e('View Log', 'nginx-helper'); ?></label></th>
315
+ <td><a target="_blank" href="<?php echo $rt_wp_nginx_helper->functional_asset_url(); ?>nginx.log"><?php _e('Log', 'nginx-helper'); ?></a></td>
316
+ </tr>
317
+ <tr>
318
+ <th><label for="rt_wp_nginx_helper_log_level"><?php _e('Log level', 'nginx-helper'); ?></label></th>
319
+ <td>
320
+ <select name="log_level">
321
+ <option value="NONE"<?php selected($rt_wp_nginx_helper->options['log_level'], 'NONE'); ?>><?php _e('None', 'nginx-helper'); ?></option>
322
+ <option value="INFO"<?php selected($rt_wp_nginx_helper->options['log_level'], 'INFO'); ?>><?php _e('Info', 'nginx-helper'); ?></option>
323
+ <option value="WARNING"<?php selected($rt_wp_nginx_helper->options['log_level'], 'WARNING'); ?>><?php _e('Warning', 'nginx-helper'); ?></option>
324
+ <option value="ERROR"<?php selected($rt_wp_nginx_helper->options['log_level'], 'ERROR'); ?>><?php _e('Error', 'nginx-helper'); ?></option>
325
+ </select>
326
+ </td>
327
+ </tr>
328
+ <tr>
329
+ <th><label for="log_filesize"><?php _e('Max log file size', 'nginx-helper'); ?></label></th>
330
+ <td>
331
+ <input id="log_filesize" class="small-text" type="text" name="log_filesize" value="<?php echo $rt_wp_nginx_helper->options['log_filesize'] ?>" /> <?php _e( 'Mb', 'nginx-helper' );
332
+ if ( $error_log_filesize ) { ?>
333
+ <p class="error fade" style="display: block;"><?php echo $error_log_filesize; ?></p><?php
334
+ } ?>
335
+ </td>
336
+ </tr>
337
+ </tbody>
338
+ </table>
339
+ </div> <!-- End of .inside -->
340
+ </div><?php
341
+
342
+ submit_button( __( 'Save All Changes', 'nginx-helper' ), 'primary large', 'smart_http_expire_save', true ); ?>
343
+ </form><!-- End of #post_form --><?php
344
+ }
345
+
346
+ }
admin/lib/nginx-sidebar.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace rtCamp\WP\Nginx {
4
+
5
+ function default_admin_sidebar() { ?>
6
+ <div class="postbox" id="support">
7
+ <h3 class="hndle">
8
+ <span><?php _e( 'Need Help?', 'nginx-helper' ); ?></span>
9
+ </h3>
10
+ <div class="inside">
11
+ <p><?php printf( __( 'Please use our <a href="%s">free support forum</a>.', 'nginx-helper' ), 'http://rtcamp.com/support/forum/wordpress-nginx/' ); ?></p>
12
+ </div>
13
+ </div>
14
+
15
+ <div class="postbox" id="social">
16
+ <h3 class="hndle">
17
+ <span><?php _e( 'Getting Social is Good', 'nginx-helper' ); ?></span>
18
+ </h3>
19
+ <div style="text-align:center;" class="inside">
20
+ <a class="nginx-helper-facebook" title="<?php _e( 'Become a fan on Facebook', 'nginx-helper' ); ?>" target="_blank" href="http://www.facebook.com/rtCamp.solutions/"></a>
21
+ <a class="nginx-helper-twitter" title="<?php _e( 'Follow us on Twitter', 'nginx-helper' ); ?>" target="_blank" href="https://twitter.com/rtcamp/"></a>
22
+ <a class="nginx-helper-gplus" title="<?php _e( 'Add to Circle', 'nginx-helper' ); ?>" target="_blank" href="https://plus.google.com/110214156830549460974/posts"></a>
23
+ <a class="nginx-helper-rss" title="<?php _e( 'Subscribe to our feeds', 'nginx-helper' ); ?>" target="_blank" href="http://feeds.feedburner.com/rtcamp/"></a>
24
+ </div>
25
+ </div>
26
+
27
+ <div class="postbox" id="useful-links">
28
+ <h3 class="hndle">
29
+ <span><?php _e( 'Useful Links', 'nginx-helper' ); ?></span>
30
+ </h3>
31
+ <div class="inside">
32
+ <ul role="list">
33
+ <li role="listitem">
34
+ <a href="https://rtcamp.com/wordpress-nginx/" title="<?php _e( 'WordPress-Nginx Solutions', 'nginx-helper' ); ?>"><?php _e( 'WordPress-Nginx Solutions', 'nginx-helper' ); ?></a>
35
+ </li>
36
+ <li role="listitem">
37
+ <a href="https://rtcamp.com/services/wordPress-themes-design-development/" title="<?php _e( 'WordPress Theme Devleopment', 'nginx-helper' ); ?>"><?php _e( 'WordPress Theme Devleopment', 'nginx-helper' ); ?></a>
38
+ </li>
39
+ <li role="listitem">
40
+ <a href="http://rtcamp.com/services/wordpress-plugins/" title="<?php _e( 'WordPress Plugin Development', 'nginx-helper' ); ?>"><?php _e( 'WordPress Plugin Development', 'nginx-helper' ); ?></a>
41
+ </li>
42
+ <li role="listitem">
43
+ <a href="http://rtcamp.com/services/custom-wordpress-solutions/" title="<?php _e( 'WordPress Consultancy', 'nginx-helper' ); ?>"><?php _e( 'WordPress Consultancy', 'nginx-helper' ); ?></a>
44
+ </li>
45
+ <li role="listitem">
46
+ <a href="https://rtcamp.com/easyengine/" title="<?php _e( 'easyengine (ee)', 'nginx-helper' ); ?>"><?php _e( 'easyengine (ee)', 'nginx-helper' ); ?></a>
47
+ </li>
48
+ </ul>
49
+ </div>
50
+ </div>
51
+
52
+ <div class="postbox" id="latest_news">
53
+ <div title="<?php _e( 'Click to toggle', 'nginx-helper' ); ?>" class="handlediv"><br /></div>
54
+ <h3 class="hndle"><span><?php _e( 'Latest News', 'nginx-helper' ); ?></span></h3>
55
+ <div class="inside"><img src ="<?php echo admin_url(); ?>/images/wpspin_light.gif" /><?php _e( 'Loading...', 'nginx-helper' ); ?></div>
56
+ </div><?php
57
+ } // End of default_admin_sidebar()
58
+ }
admin/lib/nginx-support.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace rtCamp\WP\Nginx {
4
+ function nginx_support_options_page() { ?>
5
+ <form id="support" action="" method="post" class="clearfix">
6
+ <div class="postbox">
7
+ <h3 class="hndle">
8
+ <span><?php _e( 'Support Forums', 'nginx-helper' ); ?></span>
9
+ </h3>
10
+ <div class="inside">
11
+ <table class="form-table">
12
+ <tr valign="top">
13
+ <th><?php _e( 'Free Support', 'nginx-helper' ); ?></th>
14
+ <td>
15
+ <a href="https://rtcamp.com/support/forum/wordpress-nginx/" title="<?php _e( 'Free Support Forum', 'nginx-helper' ); ?>" target="_blank"><?php _e( 'Link to forum', 'nginx-helper' ); ?></a>
16
+ </td>
17
+ </tr>
18
+ <tr valign="top">
19
+ <th><?php _e( 'Premium Support', 'nginx-helper' ); ?></th>
20
+ <td>
21
+ <a href="https://rtcamp.com/wordpress-nginx/pricing/" title="<?php _e( 'Premium Support Forum', 'nginx-helper' ); ?>" target="_blank"><?php _e( 'Link to forum', 'nginx-helper' ); ?></a>
22
+ </td>
23
+ </tr>
24
+ </table>
25
+ </div>
26
+ </div>
27
+ </form><?php
28
+ }
29
+ }
languages/nginx-helper.mo CHANGED
Binary file
languages/nginx-helper.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Nginx Helper 1.7.6\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-12-23 15:39+0530\n"
6
- "PO-Revision-Date: 2013-12-23 15:39+0530\n"
7
  "Last-Translator: rtCamp <support@rtcamp.com>\n"
8
  "Language-Team: rtCampers <support@rtcamp.com>\n"
9
  "Language: en\n"
@@ -13,10 +13,10 @@ msgstr ""
13
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
14
  "X-Poedit-Basepath: .\n"
15
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
- "X-Generator: Poedit 1.6.3\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
- #: ../nginx-helper.php:257
20
  msgid "Purge initiated"
21
  msgstr ""
22
 
@@ -190,235 +190,312 @@ msgstr ""
190
  msgid "Widget saved, moved or removed in a sidebar"
191
  msgstr ""
192
 
193
- #: ../admin/admin.php:19 ../admin/admin.php:24
 
 
 
 
 
 
 
 
194
  msgid "Nginx Helper"
195
  msgstr ""
196
 
197
- #: ../admin/admin.php:92
198
  msgid "Nginx Settings"
199
  msgstr ""
200
 
201
- #: ../admin/admin.php:97
202
- msgid "Plugin Options"
 
203
  msgstr ""
204
 
205
- #: ../admin/admin.php:103 ../admin/admin.php:376
206
- msgid "Purge Cache"
 
 
 
 
 
 
 
 
 
 
 
 
207
  msgstr ""
208
 
209
- #: ../admin/admin.php:114
210
- msgid "Enable Cache Purge (requires external settings for nginx)"
211
  msgstr ""
212
 
213
- #: ../admin/admin.php:121
 
 
 
 
 
 
 
214
  msgid "Enable Nginx Map."
215
  msgstr ""
216
 
217
- #: ../admin/admin.php:128
218
  msgid "Enable Logging"
219
  msgstr ""
220
 
221
- #: ../admin/admin.php:134
222
  msgid "Enable Nginx Timestamp in HTML"
223
  msgstr ""
224
 
225
- #: ../admin/admin.php:146
226
  msgid "Purging Options"
227
  msgstr ""
228
 
229
- #: ../admin/admin.php:152
230
  msgid "Purge Homepage:"
231
  msgstr ""
232
 
233
- #: ../admin/admin.php:156
234
  msgid "when a post/page/custom post is modified or added."
235
  msgstr ""
236
 
237
- #: ../admin/admin.php:160 ../admin/admin.php:223
238
  msgid ""
239
  "when a <strong>post</strong> (or page/custom post) is <strong>modified</"
240
  "strong> or <strong>added</strong>."
241
  msgstr ""
242
 
243
- #: ../admin/admin.php:165
244
  msgid "when an existing post/page/custom post is modified."
245
  msgstr ""
246
 
247
- #: ../admin/admin.php:169 ../admin/admin.php:232
248
  msgid ""
249
  "when a <strong>published post</strong> (or page/custom post) is "
250
  "<strong>trashed</strong>."
251
  msgstr ""
252
 
253
- #: ../admin/admin.php:177
254
  msgid "Purge Post/Page/Custom Post Type:"
255
  msgstr ""
256
 
257
- #: ../admin/admin.php:182
258
  msgid "when a post/page/custom post is published."
259
  msgstr ""
260
 
261
- #: ../admin/admin.php:186
262
  msgid "when a <strong>post</strong> is <strong>published</strong>."
263
  msgstr ""
264
 
265
- #: ../admin/admin.php:191
266
  msgid "when a comment is approved/published."
267
  msgstr ""
268
 
269
- #: ../admin/admin.php:195 ../admin/admin.php:242
270
  msgid "when a <strong>comment</strong> is <strong>approved/published</strong>."
271
  msgstr ""
272
 
273
- #: ../admin/admin.php:200
274
  msgid "when a comment is unapproved/deleted."
275
  msgstr ""
276
 
277
- #: ../admin/admin.php:204 ../admin/admin.php:251
278
  msgid "when a <strong>comment</strong> is <strong>unapproved/deleted</strong>."
279
  msgstr ""
280
 
281
- #: ../admin/admin.php:213
282
  msgid "Purge Archives:"
283
  msgstr ""
284
 
285
- #: ../admin/admin.php:214
286
  msgid "(date, category, tag, author, custom taxonomies)"
287
  msgstr ""
288
 
289
- #: ../admin/admin.php:219
290
  msgid "when an post/page/custom post is modified or added.</span>"
291
  msgstr ""
292
 
293
- #: ../admin/admin.php:228
294
  msgid "when an existing post/page/custom post is trashed.</span>"
295
  msgstr ""
296
 
297
- #: ../admin/admin.php:238
298
  msgid "when a comment is approved/published.</span>"
299
  msgstr ""
300
 
301
- #: ../admin/admin.php:247
302
  msgid "when a comment is unapproved/deleted.</span>"
303
  msgstr ""
304
 
305
- #: ../admin/admin.php:264
306
  msgid "Nginx Map"
307
  msgstr ""
308
 
309
- #: ../admin/admin.php:268
310
  #, php-format
311
  msgid ""
312
  "Can't write on map file.<br /><br />Check you have write permission on "
313
  "<strong>%s</strong>"
314
  msgstr ""
315
 
316
- #: ../admin/admin.php:273
317
  msgid ""
318
  "Nginx Map path to include in nginx settings<br /><small>(recommended)</small>"
319
  msgstr ""
320
 
321
- #: ../admin/admin.php:279
322
  msgid ""
323
  "Or,<br />Text to manually copy and paste in nginx settings<br /><small>(if "
324
  "your network is small and new sites are not added frequently)</small>"
325
  msgstr ""
326
 
327
- #: ../admin/admin.php:290
328
- msgid "Logging"
329
  msgstr ""
330
 
331
- #: ../admin/admin.php:309
332
  #, php-format
333
  msgid ""
334
  "Can't write on log file.<br /><br />Check you have write permission on "
335
  "<strong>%s</strong>"
336
  msgstr ""
337
 
338
- #: ../admin/admin.php:315
339
  msgid "Logs path"
340
  msgstr ""
341
 
342
- #: ../admin/admin.php:319
343
  msgid "View Log"
344
  msgstr ""
345
 
346
- #: ../admin/admin.php:320
347
  msgid "Log"
348
  msgstr ""
349
 
350
- #: ../admin/admin.php:323
351
  msgid "Log level"
352
  msgstr ""
353
 
354
- #: ../admin/admin.php:326
355
  msgid "None"
356
  msgstr ""
357
 
358
- #: ../admin/admin.php:327
359
  msgid "Info"
360
  msgstr ""
361
 
362
- #: ../admin/admin.php:328
363
  msgid "Warning"
364
  msgstr ""
365
 
366
- #: ../admin/admin.php:329
367
  msgid "Error"
368
  msgstr ""
369
 
370
- #: ../admin/admin.php:334
371
  msgid "Max log file size"
372
  msgstr ""
373
 
374
- #: ../admin/admin.php:336
375
  msgid "Mb"
376
  msgstr ""
377
 
378
- #: ../admin/admin.php:353
379
- msgid "Save"
380
- msgstr ""
381
-
382
- #: ../admin/admin.php:382 ../admin/admin.php:391 ../admin/admin.php:403
383
- msgid "Click to toggle"
384
  msgstr ""
385
 
386
- #: ../admin/admin.php:383
387
  msgid "Need Help?"
388
  msgstr ""
389
 
390
- #: ../admin/admin.php:386
391
  #, php-format
392
- msgid ""
393
- "Please use our <a href=\"%s\">free support forum</a>.<span class=\"nh-"
394
- "aligncenter\">OR</span><a href=\"%s\">Hire us!</a> for wordpress on nginx "
395
- "solutions."
396
  msgstr ""
397
 
398
- #: ../admin/admin.php:393
399
  msgid "Getting Social is Good"
400
  msgstr ""
401
 
402
- #: ../admin/admin.php:396
403
  msgid "Become a fan on Facebook"
404
  msgstr ""
405
 
406
- #: ../admin/admin.php:397
407
  msgid "Follow us on Twitter"
408
  msgstr ""
409
 
410
- #: ../admin/admin.php:398
 
 
 
 
411
  msgid "Subscribe to our feeds"
412
  msgstr ""
413
 
414
- #: ../admin/admin.php:404
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  msgid "Latest News"
416
  msgstr ""
417
 
418
- #: ../admin/admin.php:405
419
  msgid "Loading..."
420
  msgstr ""
421
 
422
- #: ../admin/install.php:22
423
- msgid "Sorry, you need to be an administrator to use Nginx Helper"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
  msgstr ""
2
  msgstr ""
3
  "Project-Id-Version: Nginx Helper 1.7.6\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2014-01-02 17:41+0530\n"
6
+ "PO-Revision-Date: 2014-01-02 17:41+0530\n"
7
  "Last-Translator: rtCamp <support@rtcamp.com>\n"
8
  "Language-Team: rtCampers <support@rtcamp.com>\n"
9
  "Language: en\n"
13
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
14
  "X-Poedit-Basepath: .\n"
15
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+ "X-Generator: Poedit 1.5.4\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
+ #: ../nginx-helper.php:254
20
  msgid "Purge initiated"
21
  msgstr ""
22
 
190
  msgid "Widget saved, moved or removed in a sidebar"
191
  msgstr ""
192
 
193
+ #: ../admin/admin.php:26
194
+ msgid "General"
195
+ msgstr ""
196
+
197
+ #: ../admin/admin.php:30
198
+ msgid "Support"
199
+ msgstr ""
200
+
201
+ #: ../admin/admin.php:40 ../admin/admin.php:47
202
  msgid "Nginx Helper"
203
  msgstr ""
204
 
205
+ #: ../admin/admin.php:78
206
  msgid "Nginx Settings"
207
  msgstr ""
208
 
209
+ #: ../admin/admin.php:123 ../admin/lib/nginx-general.php:79
210
+ #: ../admin/lib/nginx-general.php:89
211
+ msgid "Purge Cache"
212
  msgstr ""
213
 
214
+ #: ../admin/install.php:22
215
+ msgid "Sorry, you need to be an administrator to use Nginx Helper"
216
+ msgstr ""
217
+
218
+ #: ../admin/lib/nginx-general.php:26
219
+ msgid "Log file size must be a number"
220
+ msgstr ""
221
+
222
+ #: ../admin/lib/nginx-general.php:61
223
+ msgid "Settings saved."
224
+ msgstr ""
225
+
226
+ #: ../admin/lib/nginx-general.php:87
227
+ msgid "Purge All Cache"
228
  msgstr ""
229
 
230
+ #: ../admin/lib/nginx-general.php:99
231
+ msgid "Plugin Options"
232
  msgstr ""
233
 
234
+ #: ../admin/lib/nginx-general.php:109
235
+ #, php-format
236
+ msgid ""
237
+ "Enable Cache Purge (<a target=\"_blank\" href=\"%s\" title=\"External "
238
+ "settings for nginx\">requires external settings for nginx</a>)"
239
+ msgstr ""
240
+
241
+ #: ../admin/lib/nginx-general.php:117
242
  msgid "Enable Nginx Map."
243
  msgstr ""
244
 
245
+ #: ../admin/lib/nginx-general.php:124
246
  msgid "Enable Logging"
247
  msgstr ""
248
 
249
+ #: ../admin/lib/nginx-general.php:130
250
  msgid "Enable Nginx Timestamp in HTML"
251
  msgstr ""
252
 
253
+ #: ../admin/lib/nginx-general.php:139
254
  msgid "Purging Options"
255
  msgstr ""
256
 
257
+ #: ../admin/lib/nginx-general.php:145
258
  msgid "Purge Homepage:"
259
  msgstr ""
260
 
261
+ #: ../admin/lib/nginx-general.php:149
262
  msgid "when a post/page/custom post is modified or added."
263
  msgstr ""
264
 
265
+ #: ../admin/lib/nginx-general.php:153 ../admin/lib/nginx-general.php:216
266
  msgid ""
267
  "when a <strong>post</strong> (or page/custom post) is <strong>modified</"
268
  "strong> or <strong>added</strong>."
269
  msgstr ""
270
 
271
+ #: ../admin/lib/nginx-general.php:158
272
  msgid "when an existing post/page/custom post is modified."
273
  msgstr ""
274
 
275
+ #: ../admin/lib/nginx-general.php:162 ../admin/lib/nginx-general.php:225
276
  msgid ""
277
  "when a <strong>published post</strong> (or page/custom post) is "
278
  "<strong>trashed</strong>."
279
  msgstr ""
280
 
281
+ #: ../admin/lib/nginx-general.php:170
282
  msgid "Purge Post/Page/Custom Post Type:"
283
  msgstr ""
284
 
285
+ #: ../admin/lib/nginx-general.php:175
286
  msgid "when a post/page/custom post is published."
287
  msgstr ""
288
 
289
+ #: ../admin/lib/nginx-general.php:179
290
  msgid "when a <strong>post</strong> is <strong>published</strong>."
291
  msgstr ""
292
 
293
+ #: ../admin/lib/nginx-general.php:184
294
  msgid "when a comment is approved/published."
295
  msgstr ""
296
 
297
+ #: ../admin/lib/nginx-general.php:188 ../admin/lib/nginx-general.php:235
298
  msgid "when a <strong>comment</strong> is <strong>approved/published</strong>."
299
  msgstr ""
300
 
301
+ #: ../admin/lib/nginx-general.php:193
302
  msgid "when a comment is unapproved/deleted."
303
  msgstr ""
304
 
305
+ #: ../admin/lib/nginx-general.php:197 ../admin/lib/nginx-general.php:244
306
  msgid "when a <strong>comment</strong> is <strong>unapproved/deleted</strong>."
307
  msgstr ""
308
 
309
+ #: ../admin/lib/nginx-general.php:206
310
  msgid "Purge Archives:"
311
  msgstr ""
312
 
313
+ #: ../admin/lib/nginx-general.php:207
314
  msgid "(date, category, tag, author, custom taxonomies)"
315
  msgstr ""
316
 
317
+ #: ../admin/lib/nginx-general.php:212
318
  msgid "when an post/page/custom post is modified or added.</span>"
319
  msgstr ""
320
 
321
+ #: ../admin/lib/nginx-general.php:221
322
  msgid "when an existing post/page/custom post is trashed.</span>"
323
  msgstr ""
324
 
325
+ #: ../admin/lib/nginx-general.php:231
326
  msgid "when a comment is approved/published.</span>"
327
  msgstr ""
328
 
329
+ #: ../admin/lib/nginx-general.php:240
330
  msgid "when a comment is unapproved/deleted.</span>"
331
  msgstr ""
332
 
333
+ #: ../admin/lib/nginx-general.php:259
334
  msgid "Nginx Map"
335
  msgstr ""
336
 
337
+ #: ../admin/lib/nginx-general.php:263
338
  #, php-format
339
  msgid ""
340
  "Can't write on map file.<br /><br />Check you have write permission on "
341
  "<strong>%s</strong>"
342
  msgstr ""
343
 
344
+ #: ../admin/lib/nginx-general.php:268
345
  msgid ""
346
  "Nginx Map path to include in nginx settings<br /><small>(recommended)</small>"
347
  msgstr ""
348
 
349
+ #: ../admin/lib/nginx-general.php:274
350
  msgid ""
351
  "Or,<br />Text to manually copy and paste in nginx settings<br /><small>(if "
352
  "your network is small and new sites are not added frequently)</small>"
353
  msgstr ""
354
 
355
+ #: ../admin/lib/nginx-general.php:286
356
+ msgid "Logging Options"
357
  msgstr ""
358
 
359
+ #: ../admin/lib/nginx-general.php:304
360
  #, php-format
361
  msgid ""
362
  "Can't write on log file.<br /><br />Check you have write permission on "
363
  "<strong>%s</strong>"
364
  msgstr ""
365
 
366
+ #: ../admin/lib/nginx-general.php:310
367
  msgid "Logs path"
368
  msgstr ""
369
 
370
+ #: ../admin/lib/nginx-general.php:314
371
  msgid "View Log"
372
  msgstr ""
373
 
374
+ #: ../admin/lib/nginx-general.php:315
375
  msgid "Log"
376
  msgstr ""
377
 
378
+ #: ../admin/lib/nginx-general.php:318
379
  msgid "Log level"
380
  msgstr ""
381
 
382
+ #: ../admin/lib/nginx-general.php:321
383
  msgid "None"
384
  msgstr ""
385
 
386
+ #: ../admin/lib/nginx-general.php:322
387
  msgid "Info"
388
  msgstr ""
389
 
390
+ #: ../admin/lib/nginx-general.php:323
391
  msgid "Warning"
392
  msgstr ""
393
 
394
+ #: ../admin/lib/nginx-general.php:324
395
  msgid "Error"
396
  msgstr ""
397
 
398
+ #: ../admin/lib/nginx-general.php:329
399
  msgid "Max log file size"
400
  msgstr ""
401
 
402
+ #: ../admin/lib/nginx-general.php:331
403
  msgid "Mb"
404
  msgstr ""
405
 
406
+ #: ../admin/lib/nginx-general.php:342
407
+ msgid "Save All Changes"
 
 
 
 
408
  msgstr ""
409
 
410
+ #: ../admin/lib/nginx-sidebar.php:8
411
  msgid "Need Help?"
412
  msgstr ""
413
 
414
+ #: ../admin/lib/nginx-sidebar.php:11
415
  #, php-format
416
+ msgid "Please use our <a href=\"%s\">free support forum</a>."
 
 
 
417
  msgstr ""
418
 
419
+ #: ../admin/lib/nginx-sidebar.php:17
420
  msgid "Getting Social is Good"
421
  msgstr ""
422
 
423
+ #: ../admin/lib/nginx-sidebar.php:20
424
  msgid "Become a fan on Facebook"
425
  msgstr ""
426
 
427
+ #: ../admin/lib/nginx-sidebar.php:21
428
  msgid "Follow us on Twitter"
429
  msgstr ""
430
 
431
+ #: ../admin/lib/nginx-sidebar.php:22
432
+ msgid "Add to Circle"
433
+ msgstr ""
434
+
435
+ #: ../admin/lib/nginx-sidebar.php:23
436
  msgid "Subscribe to our feeds"
437
  msgstr ""
438
 
439
+ #: ../admin/lib/nginx-sidebar.php:29
440
+ msgid "Useful Links"
441
+ msgstr ""
442
+
443
+ #: ../admin/lib/nginx-sidebar.php:34
444
+ msgid "WordPress-Nginx Solutions"
445
+ msgstr ""
446
+
447
+ #: ../admin/lib/nginx-sidebar.php:37
448
+ msgid "WordPress Theme Devleopment"
449
+ msgstr ""
450
+
451
+ #: ../admin/lib/nginx-sidebar.php:40
452
+ msgid "WordPress Plugin Development"
453
+ msgstr ""
454
+
455
+ #: ../admin/lib/nginx-sidebar.php:43
456
+ msgid "WordPress Consultancy"
457
+ msgstr ""
458
+
459
+ #: ../admin/lib/nginx-sidebar.php:46
460
+ msgid "easyengine (ee)"
461
+ msgstr ""
462
+
463
+ #: ../admin/lib/nginx-sidebar.php:53
464
+ msgid "Click to toggle"
465
+ msgstr ""
466
+
467
+ #: ../admin/lib/nginx-sidebar.php:54
468
  msgid "Latest News"
469
  msgstr ""
470
 
471
+ #: ../admin/lib/nginx-sidebar.php:55
472
  msgid "Loading..."
473
  msgstr ""
474
 
475
+ #: ../admin/lib/nginx-support.php:8
476