PluginProbe
Flying Scripts: Delay JavaScript to Improve Site Speed & Performance / trunk
Flying Scripts: Delay JavaScript to Improve Site Speed & Performance vtrunk
trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4
flying-scripts / settings / view.php

view.php in Flying Scripts: Delay JavaScript to Improve Site Speed & Performance trunk, at settings/view.php

38 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <h2>Flying Scripts settings</h2>
2
3 <?php
4 include('settings.php');
5 include('faq.php');
6 include('optimize-more.php');
7
8 $active_tab = isset($_GET['tab']) ? $_GET['tab'] : "settings";
9
10 if (isset($_POST['submit'])) {
11 echo '<div class="notice notice-success is-dismissible"><p>Settings have been saved! Please clear cache if you\'re using a cache plugin</p></div>';
12 }
13 ?>
14
15 <h2 class="nav-tab-wrapper">
16 <a href="?page=flying-scripts&tab=settings"
17 class="nav-tab <?php echo $active_tab == 'settings' ? 'nav-tab-active' : ''; ?>">Settings</a>
18 <a href="?page=flying-scripts&tab=faq"
19 class="nav-tab <?php echo $active_tab == 'faq' ? 'nav-tab-active' : ''; ?>">FAQ</a>
20 <a href="?page=flying-scripts&tab=optimize-more"
21 class="nav-tab <?php echo $active_tab == 'optimize-more' ? 'nav-tab-active' : ''; ?>">Optimize More!</a>
22 </h2>
23
24 <?php
25 switch ($active_tab) {
26 case 'settings':
27 flying_scripts_view_settings();
28 break;
29 case 'faq':
30 flying_scripts_view_faq();
31 break;
32 case 'optimize-more':
33 flying_scripts_view_optimize_more();
34 break;
35 default:
36 flying_scripts_view_settings();
37 }
38 ?>