| 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 |
?> |