| 1 |
<h2>Flying Scripts by WP Speed Matters Settings</h2> |
| 2 |
|
| 3 |
<?php |
| 4 |
include('scripts.php'); |
| 5 |
include('faq.php'); |
| 6 |
include('optimize-more.php'); |
| 7 |
|
| 8 |
$active_tab = isset($_GET['tab']) ? $_GET['tab'] : "scripts"; |
| 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=scripts" class="nav-tab <?php echo $active_tab == 'scripts' ? 'nav-tab-active' : ''; ?>">Scripts</a> |
| 17 |
<a href="?page=flying-scripts&tab=faq" class="nav-tab <?php echo $active_tab == 'faq' ? 'nav-tab-active' : ''; ?>">FAQ</a> |
| 18 |
<a href="?page=flying-scripts&tab=optimize-more" class="nav-tab <?php echo $active_tab == 'optimize-more' ? 'nav-tab-active' : ''; ?>">Optimize More!</a> |
| 19 |
</h2> |
| 20 |
|
| 21 |
<?php |
| 22 |
switch ($active_tab) { |
| 23 |
case 'scripts': |
| 24 |
flying_scripts_settings_scripts(); |
| 25 |
break; |
| 26 |
case 'faq': |
| 27 |
flying_scripts_settings_faq(); |
| 28 |
break; |
| 29 |
case 'optimize-more': |
| 30 |
flying_scripts_settings_optimize_more(); |
| 31 |
break; |
| 32 |
default: |
| 33 |
flying_scripts_settings_optimize_more(); |
| 34 |
} |
| 35 |
?> |