| 1 |
<?php |
| 2 |
/** |
| 3 |
* Settings screen for FancyBox for WordPress. |
| 4 |
* |
| 5 |
* @package FancyBox_For_WordPress |
| 6 |
*/ |
| 7 |
|
| 8 |
defined( 'ABSPATH' ) || exit; |
| 9 |
|
| 10 |
function mfbfw_options_page() { |
| 11 |
|
| 12 |
if ( ! current_user_can( 'manage_options' ) ) { |
| 13 |
wp_die( esc_html__( 'You do not have permission to access this page.', 'fancybox-for-wordpress' ) ); |
| 14 |
} |
| 15 |
|
| 16 |
require_once FBFW_PATH . 'lib/admin-head.php'; |
| 17 |
|
| 18 |
?> |
| 19 |
|
| 20 |
<div class="wrap about-wrap fbfw-wrap"> |
| 21 |
<div id="icon-plugins" class="icon32"></div> |
| 22 |
<div class="inlined"> |
| 23 |
<div id="pluginDescription"> |
| 24 |
<h1> |
| 25 |
<?php |
| 26 |
printf( |
| 27 |
/* translators: %s: Plugin version number. */ |
| 28 |
esc_html__( 'Fancybox for WordPress (version %s)', 'fancybox-for-wordpress' ), |
| 29 |
esc_html( FBFW_VERSION ) |
| 30 |
); |
| 31 |
?> |
| 32 |
</h1> |
| 33 |
<p class="about-text"><?php esc_html_e( 'Seamlessly integrates FancyBox into your blog: Upload, activate, and you\'re done. Additional configuration optional.', 'fancybox-for-wordpress' ); ?></p> |
| 34 |
</div> |
| 35 |
</div> |
| 36 |
|
| 37 |
<br/> |
| 38 |
|
| 39 |
<form method="post" action="options.php" id="options"> |
| 40 |
|
| 41 |
<?php settings_fields( 'mfbfw-options' ); ?> |
| 42 |
|
| 43 |
<div id="fbfwTabs"> |
| 44 |
<ul class="nav-tab-wrapper wp-clearfix"> |
| 45 |
<li><a href="#fbfw-appearance"><?php esc_html_e( 'Appearance', 'fancybox-for-wordpress' ); ?></a></li> |
| 46 |
<li><a href="#fbfw-animations"><?php esc_html_e( 'Animations', 'fancybox-for-wordpress' ); ?></a></li> |
| 47 |
<li><a href="#fbfw-behaviour"><?php esc_html_e( 'Behaviour', 'fancybox-for-wordpress' ); ?></a></li> |
| 48 |
<li><a href="#fbfw-galleries"><?php esc_html_e( 'Galleries', 'fancybox-for-wordpress' ); ?></a></li> |
| 49 |
<li><a href="#fbfw-other"><?php esc_html_e( 'Misc.', 'fancybox-for-wordpress' ); ?></a></li> |
| 50 |
<li><a href="#fbfw-support" style="color:green;"><?php esc_html_e( 'Support', 'fancybox-for-wordpress' ); ?></a></li> |
| 51 |
</ul> |
| 52 |
|
| 53 |
<div id="fbfw-appearance"> |
| 54 |
<?php require FBFW_PATH . 'lib/admin-tab-appearance.php'; ?> |
| 55 |
</div> |
| 56 |
|
| 57 |
<div id="fbfw-animations"> |
| 58 |
<?php require FBFW_PATH . 'lib/admin-tab-animations.php'; ?> |
| 59 |
</div> |
| 60 |
|
| 61 |
<div id="fbfw-behaviour"> |
| 62 |
<?php require FBFW_PATH . 'lib/admin-tab-behaviour.php'; ?> |
| 63 |
</div> |
| 64 |
|
| 65 |
<div id="fbfw-galleries"> |
| 66 |
<?php require FBFW_PATH . 'lib/admin-tab-galleries.php'; ?> |
| 67 |
</div> |
| 68 |
|
| 69 |
<div id="fbfw-other"> |
| 70 |
<?php require FBFW_PATH . 'lib/admin-tab-other.php'; ?> |
| 71 |
</div> |
| 72 |
|
| 73 |
<div id="fbfw-support"> |
| 74 |
<?php require FBFW_PATH . 'lib/admin-tab-support.php'; ?> |
| 75 |
</div> |
| 76 |
|
| 77 |
</div> |
| 78 |
|
| 79 |
<p class="submit" style="text-align:center;"> |
| 80 |
<input type="submit" name="mfbfw_update" class="button-primary" |
| 81 |
value="<?php esc_attr_e( 'Save Changes', 'fancybox-for-wordpress' ); ?>"/> |
| 82 |
</p> |
| 83 |
|
| 84 |
</form> |
| 85 |
|
| 86 |
<form method="post" action=""> |
| 87 |
<div style="text-align:center;padding:0 0 1.5em;margin:-15px 0 5px;"> |
| 88 |
<?php wp_nonce_field( 'mfbfw-options-reset' ); ?> |
| 89 |
<input type="submit" name="mfbfw_update" id="reset" |
| 90 |
class="button-secondary" value="<?php esc_attr_e( 'Revert to defaults', 'fancybox-for-wordpress' ); ?>"/> |
| 91 |
<input type="hidden" name="action" value="reset"/> |
| 92 |
</div> |
| 93 |
</form> |
| 94 |
|
| 95 |
<div id="mfbfwd" |
| 96 |
style="border-top:1px dashed #DDDDDD;margin:20px 0 40px;overflow:hidden;padding-top:25px;width:100%;float:left;display:block !important;"> |
| 97 |
<?php |
| 98 |
printf( |
| 99 |
/* translators: %s: Colorlib link. */ |
| 100 |
esc_html__( 'Plugin developed and supported by %s', 'fancybox-for-wordpress' ), |
| 101 |
'<a href="https://colorlib.com">Colorlib</a>' |
| 102 |
); |
| 103 |
?> |
| 104 |
</div> |
| 105 |
|
| 106 |
</div> |
| 107 |
|
| 108 |
<?php |
| 109 |
} |
| 110 |
|