forked from a2hosting/a2-optimized-wp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
A2_Optimized_Plugin.php
728 lines (597 loc) · 24.5 KB
/
A2_Optimized_Plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
<?php
include_once('A2_Optimized_OptionsManager.php');
class A2_Optimized_Plugin extends A2_Optimized_OptionsManager {
const optionInstalled = '_installed';
const optionVersion = '_version';
private $config_pages = array(
'w3tc_dashboard',
'w3tc_general',
'w3tc_pgcache',
'w3tc_minify',
'w3tc_dbcache',
'w3tc_objectcache',
'w3tc_browsercache',
'w3tc_mobile',
'w3tc_mobile',
'w3tc_referer',
'w3tc_cdn',
'w3tc_monitoring',
'w3tc_extensions',
'w3tc_install',
'w3tc_about',
'w3tc_faq'
);
//list of plugins that may conflict, displays a notice on installation of these plugins
private $incompatible_plugins = array(
'wp-super-cache',
'wp-fastest-cache',
'wp-file-cache',
'better-wp-security',
'wordfence'
);
public function install() {
// Initialize Plugin Options
$this->initOptions();
// Initialize DB Tables used by the plugin
$this->installDatabaseTables();
// Other Plugin initialization - for the plugin writer to override as needed
//$this->otherInstall();
// Record the installed version
$this->saveInstalledVersion();
// To avoid running install() more then once
$this->markAsInstalled();
}
protected function initOptions() {
$options = $this->getOptionMetaData();
if (!empty($options)) {
foreach ($options as $key => $arr) {
if (is_array($arr) && count($arr) > 1) {
$this->addOption($key, $arr[1]);
}
}
}
}
public function getOptionMetaData()
{
// http://plugin.michael-simpson.com/?page_id=31
return array(
//'_version' => array('Installed Version'), // Leave this one commented-out. Uncomment to test upgrades.
'recaptcha' => array('reCaptcha'),
//'ATextInput' => array(__('Enter in some text', 'my-awesome-plugin')),
//'CanSeeSubmitData' => array(__('Can See Submission data', 'my-awesome-plugin'),
// 'Administrator', 'Editor', 'Author', 'Contributor', 'Subscriber', 'Anyone')
);
}
protected function installDatabaseTables()
{
// global $wpdb;
// $tableName = $this->prefixTableName('mytable');
// $wpdb->query("CREATE TABLE IF NOT EXISTS `$tableName` (
// `id` INTEGER NOT NULL");
}
protected function saveInstalledVersion()
{
$this->setVersionSaved($this->getVersion());
}
protected function setVersionSaved($version)
{
return $this->updateOption(self::optionVersion, $version);
}
public function getVersion()
{
return $this->getPluginHeaderValue('1.9.3.4');
}
public function getPluginHeaderValue($key)
{
// Read the string from the comment header of the main plugin file
$data = file_get_contents($this->getPluginDir() . DIRECTORY_SEPARATOR . $this->getMainPluginFileName());
$match = array();
preg_match('/' . $key . ':\s*(\S+)/', $data, $match);
if (count($match) >= 1) {
return $match[1];
}
return null;
}
protected function getPluginDir()
{
return dirname(__FILE__);
}
protected function getMainPluginFileName()
{
return 'a2-optimized.php';
}
protected function markAsInstalled()
{
return $this->updateOption(self::optionInstalled, true);
}
public function uninstall()
{
$this->markAsUnInstalled();
}
protected function markAsUnInstalled()
{
return $this->deleteOption(self::optionInstalled);
}
public function activate(){
touch(ABSPATH.'403.shtml');
$this->write_htaccess();
}
public function deactivate(){
//remove lines from .htaccess
$htaccess = file_get_contents(ABSPATH.'.htaccess');
$pattern = "/[\r\n]*# BEGIN WordPress Hardening.*# END WordPress Hardening[\r\n]*/msiU";
$htaccess = preg_replace($pattern,'',$htaccess);
//Write the rules to .htaccess
$fp = fopen(ABSPATH.'.htaccess', "c");
if (flock($fp, LOCK_EX)) {
ftruncate($fp, 0); // truncate file
fwrite($fp, $htaccess);
fflush($fp); // flush output before releasing the lock
flock($fp, LOCK_UN); // release the lock
}
else{
//no file lock :(
}
}
public function upgrade() {
}
function update_notice() {
global $code_version, $saved_version;
echo<<<HTML
<div class="updated">
<p>
HTML;
_e( "A2 Optimized has been Updated from {$saved_version} to {$code_version} !", 'a2-text-domain' );
echo<<<HTML
</p>
</div>
HTML;
}
public function login_captcha(){
if (file_exists("/opt/a2-optimized/wordpress/recaptchalib.php")) {
include_once("/opt/a2-optimized/wordpress/recaptchalib.php");
$a2_recaptcha = $this->getOption('recaptcha');
if ($a2_recaptcha == 1) {
$key = $this->get_public_key();
if (!is_null($key)) {
$captcha = a2recaptcha_get_html($key, null, true);
echo <<<HTML
<style>
#recaptcha_area, #recaptcha_table{
margin-left: -12px !important;
}
</style>
{$captcha}
HTML;
}
}
}
}
protected function get_public_key()
{
if ($key = get_option("a2_recaptcha_pubkey", false)) {
return $key;
}
if (file_exists("/opt/a2-optimized/wordpress/pubkey")) {
return file_get_contents("/opt/a2-optimized/wordpress/pubkey");
}
return null;
}
public function comment_captcha(){
if(!$this->checkUserCapability('moderate_comments', get_current_user_id() )){
if (file_exists("/opt/a2-optimized/wordpress/recaptchalib.php")) {
include_once("/opt/a2-optimized/wordpress/recaptchalib.php");
$a2_recaptcha = $this->getOption('recaptcha');
if ($a2_recaptcha == 1) {
$key = $this->get_public_key();
if (!is_null($key)) {
$captcha = a2recaptcha_get_html($key, null, true);
echo <<<HTML
<style>
#recaptcha_area{
margin: 10px auto !important;
}
</style>
{$captcha}
HTML;
}
}
}
}
}
public function captcha_authenticate($user, $username, $password)
{
if ($username != '' && !(defined('XMLRPC_REQUEST') && XMLRPC_REQUEST)) {
$a2_recaptcha = $this->getOption('recaptcha');
if ($a2_recaptcha == 1) {
if (file_exists("/opt/a2-optimized/wordpress/recaptchalib.php")) {
include_once("/opt/a2-optimized/wordpress/recaptchalib.php");
$privatekey = $this->get_private_key();
if (!is_null($key)) {
$resp = a2recaptcha_check_answer($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!empty($username)) {
if (!$resp->is_valid) {
remove_filter('authenticate', 'wp_authenticate_username_password', 20, 3);
//wp_die("<strong>The reCAPTCHA wasn't entered correctly. Go back and try it again.</strong>: (reCAPTCHA said: {$resp->error})");
return new WP_Error('recaptcha_error', "<strong>The reCAPTCHA wasn't entered correctly. Please try it again.</strong>");
}
}
}
}
}
}
}
protected function get_private_key()
{
if (file_exists("/opt/a2-optimized/wordpress/privkey")) {
return file_get_contents("/opt/a2-optimized/wordpress/privkey");
}
if ($key = get_option("a2_recaptcha_privkey", false)) {
return $key;
}
return null;
}
public function captcha_comment_authenticate($commentdata)
{
if (!$this->checkUserCapability('moderate_comments', get_current_user_id()) && !(defined('XMLRPC_REQUEST') && XMLRPC_REQUEST)) {
if (file_exists("/opt/a2-optimized/wordpress/recaptchalib.php")) {
include_once("/opt/a2-optimized/wordpress/recaptchalib.php");
$a2_recaptcha = $this->getOption('recaptcha');
if ($a2_recaptcha == 1) {
$privatekey = $this->get_private_key();
if (!is_null($key)) {
$resp = a2recaptcha_check_answer($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!empty($commentdata)) {
if (!$resp->is_valid) {
wp_die("<strong>The reCAPTCHA wasn't entered correctly. Please use your browsers back button and try again.</strong>");
}
} else {
wp_die("<strong>There was an error. Please try again.</strong>");
}
}
}
}
}
return $commentdata;
}
public function permalink_changed()
{
$cookie = "";
foreach ($_COOKIE as $name => $val) {
$cookie .= "{$name}={$val};";
}
rtrim($cookie, ';');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, get_admin_url() . 'admin.php?page=A2_Optimized_Plugin_admin');
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_REFERER, get_admin_url());
$result = curl_exec($ch);
curl_close($ch);
}
public function addActionsAndFilters()
{
add_action('permalink_structure_changed', array(&$this, 'permalink_changed'));
$date = date("Y-m-d");
if (strpos($_SERVER['REQUEST_URI'], "login-{$date}") > 0) {
add_action('template_redirect', array(&$this, 'get_moved_login'));
}
add_filter( 'allow_minor_auto_core_updates', '__return_true' );
add_filter('auto_update_translation', '__return_true');
/*add_filter( 'allow_major_auto_core_updates', '__return_true' );
add_filter( 'allow_minor_auto_core_updates', '__return_true' );
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
add_filter( 'auto_update_translation', '__return_true' );
*/
if (is_admin()) {
add_filter('admin_init', array(&$this, 'admin_init'));
add_action('admin_bar_menu', array(&$this, 'addAdminBar'), 8374);
add_action('admin_menu', array(&$this, 'addSettingsSubMenuPage'));
if (defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT) {
add_action('admin_menu', array(&$this, 'addLockedEditor'), 100, 100);
}
add_action('admin_print_styles', array(&$this, 'myStyleSheet'));
add_action('wp_dashboard_setup', array(&$this, 'dashboard_widget'));
$a2_plugin_basename = plugin_basename($GLOBALS['A2_Plugin_Dir'] . '/a2-optimized.php');
add_filter("plugin_action_links_{$a2_plugin_basename}", array(&$this, 'plugin_settings_link'));
}
if (get_option('A2_Optimized_Plugin_recaptcha', 0) == 1 && !is_admin()) {
add_action('woocommerce_login_form', array(&$this, 'login_captcha'));
add_action('login_form', array(&$this, 'login_captcha'));
add_filter('authenticate', array(&$this, 'captcha_authenticate'), 1, 3);
add_action('comment_form_after_fields', array(&$this, 'comment_captcha'));
add_filter('preprocess_comment', array(&$this, 'captcha_comment_authenticate'), 1, 3);
}
}
public function plugin_settings_link($links)
{
$settings_link = '<a href="admin.php?page=A2_Optimized_Plugin_admin">Settings</a>';
array_unshift($links, $settings_link);
return $links;
}
public function get_moved_login()
{
wp_redirect(wp_login_url(), 302);
exit();
}
public function myStyleSheet()
{
wp_enqueue_style('a2-optimized-css', plugins_url('/assets/css/style.css',__FILE__));
}
/**
* Add a widget to the dashboard.
*
* This function is hooked into the 'wp_dashboard_setup' action below.
*/
public function dashboard_widget()
{
$logo_url = plugins_url() . "/a2-optimized/resource/images/a2optimized.png";
wp_add_dashboard_widget(
'a2_optimized', // Widget slug.
"<a href=\"admin.php?page=A2_Optimized_Plugin_admin\"><img src=\"{$logo_url}\" /></a>", // Title.
array(&$this, 'a2_dashboard_widget') // Display function.
);
wp_add_dashboard_widget(
'a2_optimized_kb', // Widget slug.
"Have any questions? Search the A2 Hosting Knowledge Base for answers.", // Title.
array(&$this, 'kb_dashboard_widget') // Display function.
);
//force the widget to the top of the dashboard
global $wp_meta_boxes;
// Get the regular dashboard widgets array
// (which has our new widget already but at the end)
unset($wp_meta_boxes['dashboard']['normal']['core']['wp_welcome_widget']);
$normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
// Backup and delete our new dashboard widget from the end of the array
$example_widget_backup = array('a2_optimized' => $normal_dashboard['a2_optimized'], 'a2_optimized_kb' => $normal_dashboard['a2_optimized_kb']);
// Merge the two arrays together so our widget is at the beginning
$sorted_dashboard = array_merge($example_widget_backup, $normal_dashboard);
// Save the sorted array back into the original metaboxes
$wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
}
/**
* Create the function to output the contents of our Dashboard Widget.
*/
public function a2_dashboard_widget()
{
// Display whatever it is you want to show.
echo <<<HTML
<div style="font-size:14px">
<p style="font-size:14px">A2 Optimized will automatically configure your WordPress site for speed and security.</p>
<p>
<a class="button button-primary" href="admin.php?page=A2_Optimized_Plugin_admin">Optimize Your Site</a>
</p>
<p style="font-size:14px">A2 Optimized includes these features.</p>
<ul style="list-style-type:disc;list-style-position:inside">
<li>Page caching</li>
<li>Database caching</li>
<li>CSS/JS/HTML minification</li>
<li>reCAPTCHA on comment and login forms</li>
<li>Move the login page</li>
<li>Image compression</li>
<li>Compress pages with gzip</li>
</ul>
<p style="font-size:14px">To learn more about the A2 Optimized WordPress plugin: read this <a target="_blank" href="http://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/wordpress2/optimizing-wordpress-with-the-a2-optimized-plugin">Knowledge Base article</a></p>
</div>
HTML;
}
public function kb_dashboard_widget()
{
echo <<<HTML
<p>
<a class="button button-primary" href="http://www.a2hosting.com/kb" target="_blank">Search the Knowledge Base</a>
</p>
HTML;
}
public function locked_files_notice()
{
echo <<<HTML
<div id="editing-locked" class="updated" >
<p ><b style="color:#00CC00">Editing of plugin and theme files</b> in the wp-admin is <b style="color:#00CC00">disabled</b> by A2 Optimized<br>
<b style="color:#00CC00">This is recommended for security reasons</b>. You can modify this setting on the <a href="admin.php?page=A2_Optimized_Plugin_admin">A2 Optimized Configuration page</a></p>
</div>
HTML;
}
public function recaptcha_installed_notice()
{
echo <<<HTML
<div id="recaptcha-installed" class="error" >
<p ><b style="color:#00CC00">A ReCaptacha plugin is installed.</b><br>
Disable and delete any plugins using reCaptcha to use the reCaptcha functionality built into A2 Optimized.
<br> </p>
</div>
HTML;
}
public function not_locked_files_notice()
{
echo <<<HTML
<div id="editing-locked" class="error" >
<p ><b style="color:red">Editing of plugin and theme files</b> in the wp-admin is <b style="color:red">enabled</b><br>
<b style="color:red">This is not recommended for security reasons</b>. You can modify this setting on the <a href="admin.php?page=A2_Optimized_Plugin_admin">A2 Optimized Configuration page</a></p>
</div>
HTML;
}
public function rwl_notice()
{
$rwl_page = get_option('rwl_page');
$home_page = get_home_url();
$admin_url = get_admin_url();
if ($a2_login_page = get_option('a2_login_page')) {//synch rwl_page and a2_login_page
if ($a2_login_page != $rwl_page) {
update_option('a2_login_page', $rwl_page);
}
} else {
update_option('a2_login_page', $rwl_page);
}
$link = wp_login_url();
if (!(strpos(get_option('a2_login_bookmarked', ''), $link) === 0)) {
echo <<<HTML
<div id="bookmark-login" class="updated" >
<p>Your login page is now here: <a href="{$link}" >{$link}</a>. Bookmark this page!</p>
</div>
HTML;
}
}
public function admin_init()
{
if (!$this->checkUserCapability('manage_options', get_current_user_id())) {
return false;
}
$active_plugins = get_option('active_plugins');
if (in_array('rename-wp-login/rename-wp-login.php', $active_plugins)) {
if ($rwl_page = get_option('rwl_page')) {
if ($rwl_page != '') {
add_action('admin_notices', array(&$this, 'rwl_notice'));
if ($a2_login_page = get_option('a2_login_page')) {
if ($a2_login_page != $rwl_page) {
update_option('a2_login_page', $rwl_page);
}
} else {
update_option('a2_login_page', $rwl_page);
}
}
}
}
if (isset($_GET['page']) && in_array($_GET['page'], $this->config_pages)) {
add_action('admin_notices', array(&$this, 'config_page_notice'));
}
if (isset($_GET['action']) && $_GET['action'] == 'install-plugin') {
if (isset($_GET['plugin']) && in_array($_GET['plugin'], $this->incompatible_plugins)) {
add_action('admin_notices', array(&$this, 'incompatible_plugin_notice'));
}
}
//we don't need this function anymore since the new reCaptcha is now compatible with other recaptcha plugins
//if(function_exists('recaptcha_get_html')){
//add_action( 'admin_notices', array(&$this,'recaptcha_installed_notice'));
//}
if (!(strpos($_SERVER['SCRIPT_FILENAME'], 'plugins.php') === false) && defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT) {
add_action('admin_notices', array(&$this, 'locked_files_notice'));
} else if (!(strpos($_SERVER['SCRIPT_FILENAME'], 'plugins.php') === false)) {
add_action('admin_notices', array(&$this, 'not_locked_files_notice'));
}
}
/**
* Puts the configuration page in the Plugins menu by default.
* Override to put it elsewhere or create a set of submenus
* Override with an empty implementation if you don't want a configuration page
* @return void
*/
public function addSettingsSubMenuPage()
{
$this->addSettingsSubMenuPageToMenu();
}
protected function addSettingsSubMenuPageToMenu()
{
$this->requireExtraPluginFiles();
$displayName = $this->getPluginDisplayName();
add_menu_page($displayName,
$displayName,
'manage_options',
$this->getSettingsSlug(),
array(&$this, 'settingsPage'), null, 3.14159265359);
}
protected function requireExtraPluginFiles()
{
//require_once(ABSPATH . 'wp-includes/pluggable.php');
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
}
public function getPluginDisplayName()
{
return 'A2 Optimized';
}
protected function getSettingsSlug()
{
return get_class($this) . '_admin';
}
public function addAdminBar()
{
$this->requireExtraPluginFiles();
global $wp_admin_bar;
if (current_user_can('manage_options')) {
$wp_admin_bar->add_node(array(
'id' => 'a2-optimized-admin-bar',
'title' => 'A2 Optimized',
'href' => admin_url('admin.php?page=' . $this->getSettingsSlug())
));
}
}
public function addLockedEditor()
{
$this->requireExtraPluginFiles();
add_theme_page('<span style="color:red !important">Editor Locked</span>', '<span style="color:red !important">Editor Locked</span>', 'manage_options', 'editor-locked', array(&$this, 'settingsPage'));
}
/**
* @return bool indicating if the plugin is installed already
*/
public function isInstalled()
{
return $this->getOption(self::optionInstalled) == true;
}
protected function get_recaptcha_public_key()
{
if (file_exists("/opt/a2-optimized/wordpress_encoded/pk.php")) {
return file_get_contents("/opt/a2-optimized/wordpress_encoded/pk.php");
}
if ($key = get_option("a2_recaptcha_pubkey")) {
return $key;
}
return null;
}
protected function addSettingsSubMenuPageToPluginsMenu()
{
$this->requireExtraPluginFiles();
$displayName = $this->getPluginDisplayName();
add_submenu_page('plugins.php',
$displayName,
$displayName,
'manage_options',
$this->getSettingsSlug(),
array(&$this, 'settingsPage'));
}
protected function addSettingsSubMenuPageToDashboard()
{
$this->requireExtraPluginFiles();
$displayName = $this->getPluginDisplayName();
add_dashboard_page($displayName,
$displayName,
'manage_options',
$this->getSettingsSlug(),
array(&$this, 'settingsPage'));
}
protected function addSettingsSubMenuPageToSettingsMenu()
{
$this->requireExtraPluginFiles();
$displayName = $this->getPluginDisplayName();
add_options_page($displayName,
$displayName,
'manage_options',
$this->getSettingsSlug(),
array(&$this, 'settingsPage'));
}
public function incompatible_plugin_notice()
{
echo <<<HTML
<div class="error">
<p class="danger">Proceed with caution: The Plugin you just installed may be incompatible with A2 Optimized.</p>
</div>
HTML;
}
public function config_page_notice()
{
echo <<<HTML
<div class="updated">
<p>This site has been configured using the A2 Optimized plugin. We, at A2 Hosting, have spent quite a bit of time figuring out the best set of options for this plugin; however, if you think you need to customize configuration: by all means... Continue. If you have arrived here by mistake, you may use the <a href="admin.php?page=A2_Optimized_Plugin_admin">A2 Optimized administration page to configure this plugin</a>.</p>
</div>
HTML;
}
}