Skip to content

Commit cc996fd

Browse files
Merge pull request #28 from MachoThemes/master
Update to v3.1.0 (latest w.org version)
2 parents 3148bf9 + 1865a38 commit cc996fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+9389
-3093
lines changed

admin.php

Lines changed: 140 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,150 @@
11
<?php
22

33
function mfbfw_options_page() {
4-
5-
global $mfbfw, $mfbfw_version;
6-
74
require_once( FBFW_PATH . 'lib/admin-head.php' );
85

96
?>
107

11-
<div class="wrap">
12-
13-
<div id="icon-plugins" class="icon32"></div><h2><?php printf( __('Fancybox for WordPress (version %s)', 'mfbfw'), $mfbfw_version ); ?></h2>
14-
15-
<br />
16-
17-
<form method="post" action="options.php" id="options">
18-
19-
<?php settings_fields( 'mfbfw-options' ); ?>
20-
21-
<div id="fbfwTabs">
22-
23-
<h2 class="nav-tab-wrapper">
24-
<ul id="fbfw_tabs">
25-
<li><a class="nav-tab selected" href="#fbfw-info"><?php _e( 'Info', 'mfbfw' ); ?></a></li>
26-
<li><a class="nav-tab" href="#fbfw-appearance"><?php _e( 'Appearance', 'mfbfw' ); ?></a></li>
27-
<li><a class="nav-tab" href="#fbfw-animations"><?php _e( 'Animations', 'mfbfw' ); ?></a></li>
28-
<li><a class="nav-tab" href="#fbfw-behaviour"><?php _e( 'Behaviour', 'mfbfw' ); ?></a></li>
29-
<li><a class="nav-tab" href="#fbfw-galleries"><?php _e( 'Galleries', 'mfbfw' ); ?></a></li>
30-
<li><a class="nav-tab" href="#fbfw-other"><?php _e( 'Miscellaneous', 'mfbfw' ); ?></a></li>
31-
<li><a class="nav-tab" href="#fbfw-calls"><?php _e( 'Extra Calls', 'mfbfw' ); ?></a></li>
32-
<li><a class="nav-tab" href="#fbfw-troubleshooting"><?php _e( 'Troubleshooting', 'mfbfw' ); ?></a></li>
33-
<li><a class="nav-tab" href="#fbfw-support" style="color:green;"><?php _e( 'Support', 'mfbfw' ); ?></a></li>
34-
<li><a class="nav-tab" href="#fbfw-uninstall" style="color:red;"><?php _e ('Uninstall', 'mfbfw' ); ?></a></li>
35-
</ul>
36-
</h2>
37-
38-
<div id="fbfw-info">
39-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-info.php' ); ?>
40-
</div>
41-
42-
<div id="fbfw-appearance">
43-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-appearance.php' ); ?>
44-
</div>
45-
46-
<div id="fbfw-animations">
47-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-animations.php' ); ?>
48-
</div>
49-
50-
<div id="fbfw-behaviour">
51-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-behaviour.php' ); ?>
52-
</div>
53-
54-
<div id="fbfw-galleries">
55-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-galleries.php' ); ?>
56-
</div>
57-
58-
<div id="fbfw-other">
59-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-other.php' ); ?>
60-
</div>
61-
62-
<div id="fbfw-calls">
63-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-calls.php' ); ?>
64-
</div>
65-
66-
<div id="fbfw-troubleshooting">
67-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-troubleshooting.php' ); ?>
68-
</div>
69-
70-
<div id="fbfw-support">
71-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-support.php' ); ?>
72-
</div>
73-
74-
<div id="fbfw-uninstall">
75-
<?php require_once ( FBFW_PATH . 'lib/admin-tab-uninstall.php' ); ?>
76-
</div>
77-
78-
</div>
79-
80-
<p class="submit" style="text-align:center;">
81-
<input type="submit" name="mfbfw_update" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'mfbfw' ); ?>" />
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" onClick="return confirmDefaults();" class="button-secondary" value="<?php esc_attr_e( 'Revert to defaults', 'mfbfw' ); ?>" />
90-
<input type="hidden" name="action" value="reset" />
91-
</div>
92-
</form>
93-
94-
<div id="mfbfwd">
95-
96-
<div class="mfbfw_box_yellow">
97-
<p style="line-height:1.5em;"><?php _e( 'If you use FancyBox and like it, buy the author a beer!', 'mfbfw' ); ?></p>
98-
<form id="donate_form" action="https://www.paypal.com/cgi-bin/webscr" method="post">
99-
<input name="cmd" value="_donations" type="hidden">
100-
<input name="business" value="[email protected]" type="hidden">
101-
<input name="item_name" value="FancyBox" type="hidden">
102-
<input name="amount" value="10.00" type="hidden">
103-
<input name="no_shipping" value="0" type="hidden">
104-
<input name="no_note" value="1" type="hidden">
105-
<input name="currency_code" value="EUR" type="hidden">
106-
<input name="tax" value="0" type="hidden">
107-
<input name="lc" value="LV" type="hidden">
108-
<input name="bn" value="PP-DonationsBF" type="hidden">
109-
<input type="image" style="margin:0;padding:0" border="0" src="<?php echo FBFW_URL ?>css/img/extra_donate.png" name="submit" alt="PayPal - The safer, easier way to pay online!"/>
110-
</form>
111-
</div>
112-
113-
<div class="mfbfw_box_yellow">
114-
<p style="line-height:1.5em;"><?php _e( 'The author of this WordPress Plugin also likes beer :P', 'mfbfw' ); ?></p>
115-
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
116-
<input type="hidden" name="cmd" value="_s-xclick"/>
117-
<input type="hidden" name="hosted_button_id" value="3878319"/>
118-
<input type="image" style="margin:0;padding:0" border="0" src="<?php echo FBFW_URL ?>css/img/extra_donate.png" name="submit" alt="PayPal - The safer, easier way to pay online!"/>
119-
<img height="1" width="1" border="0" alt="" src="https://www.paypal.com/es_ES/i/scr/pixel.gif" />
120-
</form>
121-
</div>
122-
123-
<div class="mfbfw_box_blue">
124-
<p style="line-height:1.5em;"><a href="http://twitter.com/moskis/"><?php _e( 'Follow me on Twitter for more WordPress Plugins and Themes', 'mfbfw' ); ?></a></p>
125-
<img height="16" width="16" border="0" alt="" src="<?php echo FBFW_URL ?>css/img/extra_twitter.png" />
126-
</div>
127-
128-
</div>
129-
130-
</div>
131-
132-
<?php
133-
8+
<div class="wrap about-wrap fbfw-wrap">
9+
<div id="icon-plugins" class="icon32"></div>
10+
<div class="inlined">
11+
<div id="pluginDescription">
12+
<h1><?php printf( __( 'Fancybox for WordPress (version %s)', 'mfbfw' ), FBFW_VERSION ); ?></h1>
13+
<p class="about-text">Seamlessly integrates FancyBox into your blog: Upload, activate, and you’re done. Additional configuration optional.</p>
14+
</div>
15+
</div>
16+
17+
<br/>
18+
19+
<form method="post" action="options.php" id="options">
20+
21+
<?php settings_fields( 'mfbfw-options' ); ?>
22+
23+
<div id="fbfwTabs">
24+
<ul class="nav-tab-wrapper wp-clearfix">
25+
<li><a href="#fbfw-appearance"><?php _e( 'Appearance', 'mfbfw' ); ?></a></li>
26+
<li><a href="#fbfw-animations"><?php _e( 'Animations', 'mfbfw' ); ?></a></li>
27+
<li><a href="#fbfw-behaviour"><?php _e( 'Behaviour', 'mfbfw' ); ?></a></li>
28+
<li><a href="#fbfw-galleries"><?php _e( 'Galleries', 'mfbfw' ); ?></a></li>
29+
<li><a href="#fbfw-other"><?php _e( 'Misc.', 'mfbfw' ); ?></a></li>
30+
<li><a href="#fbfw-support" style="color:green;"><?php _e( 'Support', 'mfbfw' ); ?></a></li>
31+
</ul>
32+
33+
<div id="fbfw-appearance">
34+
<?php require_once( FBFW_PATH . 'lib/admin-tab-appearance.php' ); ?>
35+
</div>
36+
37+
<div id="fbfw-animations">
38+
<?php require_once( FBFW_PATH . 'lib/admin-tab-animations.php' ); ?>
39+
</div>
40+
41+
<div id="fbfw-behaviour">
42+
<?php require_once( FBFW_PATH . 'lib/admin-tab-behaviour.php' ); ?>
43+
</div>
44+
45+
<div id="fbfw-galleries">
46+
<?php require_once( FBFW_PATH . 'lib/admin-tab-galleries.php' ); ?>
47+
</div>
48+
49+
<div id="fbfw-other">
50+
<?php require_once( FBFW_PATH . 'lib/admin-tab-other.php' ); ?>
51+
</div>
52+
53+
<div id="fbfw-support">
54+
<?php require_once( FBFW_PATH . 'lib/admin-tab-support.php' ); ?>
55+
</div>
56+
57+
</div>
58+
59+
<p class="submit" style="text-align:center;">
60+
<input type="submit" name="mfbfw_update" class="button-primary"
61+
value="<?php esc_attr_e( 'Save Changes', 'mfbfw' ); ?>"/>
62+
</p>
63+
64+
</form>
65+
66+
<form method="post" action="">
67+
<div style="text-align:center;padding:0 0 1.5em;margin:-15px 0 5px;">
68+
<?php wp_nonce_field( 'mfbfw-options-reset' ); ?>
69+
<input type="submit" name="mfbfw_update" id="reset" onClick="return confirmDefaults();"
70+
class="button-secondary" value="<?php esc_attr_e( 'Revert to defaults', 'mfbfw' ); ?>"/>
71+
<input type="hidden" name="action" value="reset"/>
72+
</div>
73+
74+
<div id="mfbfwd"
75+
style="border-top:1px dashed #DDDDDD;margin:20px 0 40px;overflow:hidden;padding-top:25px;width:100%;float:left;display:block !important;">
76+
77+
Plugin developed and supported by <a href="https://colorlib.com">Colorlib</a>
78+
79+
</div>
80+
81+
</div>
82+
83+
<div class="modula-wrap">
84+
<a target="_blank" href="http://wp-modula.com/?utm_source=fancybox-for-wp&utm_medium=options-page&utm_campaign=Modula%20Lite" class="modula-link">
85+
<img src="<?php echo FBFW_URL; ?>assets/images/modula-300x300.jpg"/>
86+
<h2>Easy Image Gallery for WP</h2>
87+
<p>Modula is creative! Modula is dynamic! Modula doesn’t always look the same. Just have fun with it! Modula uses a new concept to build its internal grid. The result is a dynamic, creative, interesting and attractive gallery.</p>
88+
89+
<?php
90+
91+
$plugin_slug = 'modula-best-grid-gallery';
92+
$plugin_path = 'modula-best-grid-gallery/Modula.php';
93+
94+
$installed = false;
95+
$activated = false;
96+
if ( file_exists( ABSPATH . 'wp-content/plugins/' . $plugin_slug ) ) {
97+
$installed = true;
98+
}
99+
100+
if ( file_exists( ABSPATH . 'wp-content/plugins/' . $plugin_path ) ) {
101+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
102+
if ( is_plugin_active( $plugin_path ) ) {
103+
$activated = true;
104+
}
105+
}
106+
107+
if ( ! $activated ) {
108+
109+
if ( ! $installed ) {
110+
$label = esc_html__( 'Install & Activate Modula', 'mfbfw' );
111+
$link = wp_nonce_url(
112+
add_query_arg(
113+
array(
114+
'action' => 'install-plugin',
115+
'plugin' => $plugin_slug,
116+
),
117+
network_admin_url( 'update.php' )
118+
),
119+
'install-plugin_' . $plugin_slug
120+
);
121+
$action = 'install';
122+
}else{
123+
$label = esc_html__( 'Activate Modula', 'mfbfw' );
124+
$link = add_query_arg(
125+
array(
126+
'action' => 'activate',
127+
'plugin' => rawurlencode( $plugin_path ),
128+
'plugin_status' => 'all',
129+
'paged' => '1',
130+
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_path ),
131+
),
132+
admin_url( 'plugins.php' )
133+
);
134+
$action = 'activate';
135+
}
136+
137+
echo '<a href="' . esc_url( $link ) . '" class="mfbfw-modula-link button button-primary button-large" data-action="' . esc_attr( $action ) . '">' . esc_html( $label ) . '</a>';
138+
139+
}
140+
141+
?>
142+
143+
</a>
144+
</div>
145+
146+
147+
<?php
134148
}
135149

136150
?>

0 commit comments

Comments
 (0)