Version Description
- Fix! - Dynamic CSS Bug
Download this release
Release Info
Developer | takanakui |
Plugin | WP Mobile Menu |
Version | 2.7.2 |
Comparing to | |
See all releases |
Code changes from version 2.7.1 to 2.7.2
- changelog.txt +3 -0
- includes/class-wp-mobile-menu-core.php +4 -10
- includes/dynamic-style.php +1 -2
- mobmenu.php +1 -2
- readme.txt +5 -2
- vendor/titan-framework/inc/edd-licensing/EDD_SL_Plugin_Updater.php +0 -381
- vendor/titan-framework/inc/edd-licensing/theme-updater-class.php +0 -149
- vendor/titan-framework/lib/class-option-font.php +0 -1
- vendor/titan-framework/lib/functions-googlefonts.php +0 -44
- vendor/titan-framework/readme.txt +0 -1
- vendor/titan-framework/titan-framework.php +0 -1
changelog.txt
CHANGED
@@ -121,4 +121,7 @@ Version 2.7
|
|
121 |
|
122 |
Version 2.7.1
|
123 |
- Fix! - Retina Logo Bug
|
|
|
|
|
|
|
124 |
-----------------------------------------------------------
|
121 |
|
122 |
Version 2.7.1
|
123 |
- Fix! - Retina Logo Bug
|
124 |
+
|
125 |
+
Version 2.7.2
|
126 |
+
- Fix! - Dynamic CSS Bug
|
127 |
-----------------------------------------------------------
|
includes/class-wp-mobile-menu-core.php
CHANGED
@@ -47,16 +47,10 @@ class WP_Mobile_Menu_Core {
|
|
47 |
* Load dynamic CSS.
|
48 |
*/
|
49 |
public function load_dynamic_css_style() {
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
if ( ! file_exists( $generated_css ) ) {
|
56 |
-
echo '<style>';
|
57 |
-
include_once 'dynamic-style.php';
|
58 |
-
echo '</style>';
|
59 |
-
}
|
60 |
|
61 |
}
|
62 |
|
47 |
* Load dynamic CSS.
|
48 |
*/
|
49 |
public function load_dynamic_css_style() {
|
50 |
+
|
51 |
+
echo '<style>';
|
52 |
+
include_once 'dynamic-style.php';
|
53 |
+
echo '</style>';
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
}
|
56 |
|
includes/dynamic-style.php
CHANGED
@@ -82,7 +82,6 @@ $header_height = $titan->getOption( 'header_height' );
|
|
82 |
$total_header_height = $header_height;
|
83 |
|
84 |
?>
|
85 |
-
/* Hide WP Mobile Menu outside the width of trigger */
|
86 |
@media only screen and (min-width:<?php echo $trigger_res; ?>px) {
|
87 |
|
88 |
.mob_menu, .mob_menu_left_panel, .mob_menu_right_panel, .mobmenu {
|
@@ -341,7 +340,7 @@ $total_header_height = $header_height;
|
|
341 |
$border_menu_color = $titan->getOption( 'menu_items_border_color' );
|
342 |
$border_style = $border_menu_size . 'px solid ' . $border_menu_color; ?>
|
343 |
|
344 |
-
.mobmenu_content li
|
345 |
border-top: <?php echo $border_style; ?>;
|
346 |
}
|
347 |
|
82 |
$total_header_height = $header_height;
|
83 |
|
84 |
?>
|
|
|
85 |
@media only screen and (min-width:<?php echo $trigger_res; ?>px) {
|
86 |
|
87 |
.mob_menu, .mob_menu_left_panel, .mob_menu_right_panel, .mobmenu {
|
340 |
$border_menu_color = $titan->getOption( 'menu_items_border_color' );
|
341 |
$border_style = $border_menu_size . 'px solid ' . $border_menu_color; ?>
|
342 |
|
343 |
+
.mobmenu_content li {
|
344 |
border-top: <?php echo $border_style; ?>;
|
345 |
}
|
346 |
|
mobmenu.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Plugin URI: https://www.wpmobilemenu.com/
|
6 |
* Description: An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.
|
7 |
* Author: Takanakui
|
8 |
-
* Version: 2.7.
|
9 |
* Author URI: https://www.wpmobilemenu.com/
|
10 |
* Tested up to: 4.9
|
11 |
* Text Domain: mobile-menu
|
@@ -76,7 +76,6 @@ if ( ! class_exists( 'WP_Mobile_Menu' ) ) {
|
|
76 |
// Register Menus.
|
77 |
add_action( 'init', array( $this->mobmenu_core, 'register_menus' ) );
|
78 |
|
79 |
-
|
80 |
// Load frontend assets.
|
81 |
if ( ! is_admin() ) {
|
82 |
$this->load_frontend_assets();
|
5 |
* Plugin URI: https://www.wpmobilemenu.com/
|
6 |
* Description: An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.
|
7 |
* Author: Takanakui
|
8 |
+
* Version: 2.7.2
|
9 |
* Author URI: https://www.wpmobilemenu.com/
|
10 |
* Tested up to: 4.9
|
11 |
* Text Domain: mobile-menu
|
76 |
// Register Menus.
|
77 |
add_action( 'init', array( $this->mobmenu_core, 'register_menus' ) );
|
78 |
|
|
|
79 |
// Load frontend assets.
|
80 |
if ( ! is_admin() ) {
|
81 |
$this->load_frontend_assets();
|
readme.txt
CHANGED
@@ -4,11 +4,11 @@ link: http://profiles.wordpress.org/takanakui
|
|
4 |
Tags: mobile, navigation, responsive, menu, responsive menu, mobile menu, tablet menu, hamburger menu, hamburger, wordpress responsive menu, wordpress mobile menu, canvas menu
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.0
|
7 |
-
Stable tag: 2.7
|
8 |
Requires PHP: 5.2.4
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
-
Donate link:
|
12 |
|
13 |
|
14 |
== Description ==
|
@@ -92,6 +92,9 @@ Not available at the moment
|
|
92 |
Not available at the moment
|
93 |
|
94 |
== Changelog ==
|
|
|
|
|
|
|
95 |
= 2.7.1 =
|
96 |
* Fix! - Retina logo bug
|
97 |
|
4 |
Tags: mobile, navigation, responsive, menu, responsive menu, mobile menu, tablet menu, hamburger menu, hamburger, wordpress responsive menu, wordpress mobile menu, canvas menu
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.0
|
7 |
+
Stable tag: 2.7.2
|
8 |
Requires PHP: 5.2.4
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
Donate link: https://www.buymeacoffee.com/ruiguerreiro
|
12 |
|
13 |
|
14 |
== Description ==
|
92 |
Not available at the moment
|
93 |
|
94 |
== Changelog ==
|
95 |
+
= 2.7.2 =
|
96 |
+
* Fix! - Dynamic CSS Bug
|
97 |
+
|
98 |
= 2.7.1 =
|
99 |
* Fix! - Retina logo bug
|
100 |
|
vendor/titan-framework/inc/edd-licensing/EDD_SL_Plugin_Updater.php
DELETED
@@ -1,381 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// uncomment this line for testing
|
4 |
-
//set_site_transient( 'update_plugins', null );
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Allows plugins to use their own update API.
|
11 |
-
*
|
12 |
-
* @author Pippin Williamson
|
13 |
-
* @version 1.6.4
|
14 |
-
*/
|
15 |
-
class TITAN_EDD_SL_Plugin_Updater {
|
16 |
-
|
17 |
-
private $api_url = '';
|
18 |
-
private $api_data = array();
|
19 |
-
private $name = '';
|
20 |
-
private $slug = '';
|
21 |
-
private $version = '';
|
22 |
-
private $wp_override = false;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class constructor.
|
26 |
-
*
|
27 |
-
* @uses plugin_basename()
|
28 |
-
* @uses hook()
|
29 |
-
*
|
30 |
-
* @param string $_api_url The URL pointing to the custom API endpoint.
|
31 |
-
* @param string $_plugin_file Path to the plugin file.
|
32 |
-
* @param array $_api_data Optional data to send with API calls.
|
33 |
-
*/
|
34 |
-
public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
|
35 |
-
|
36 |
-
global $edd_plugin_data;
|
37 |
-
|
38 |
-
$this->api_url = trailingslashit( $_api_url );
|
39 |
-
$this->api_data = $_api_data;
|
40 |
-
$this->name = plugin_basename( $_plugin_file );
|
41 |
-
$this->slug = basename( $_plugin_file, '.php' );
|
42 |
-
$this->version = $_api_data['version'];
|
43 |
-
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
44 |
-
|
45 |
-
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
46 |
-
|
47 |
-
// Set up hooks.
|
48 |
-
$this->init();
|
49 |
-
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Set up WordPress filters to hook into WP's update process.
|
54 |
-
*
|
55 |
-
* @uses add_filter()
|
56 |
-
*
|
57 |
-
* @return void
|
58 |
-
*/
|
59 |
-
public function init() {
|
60 |
-
|
61 |
-
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
62 |
-
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
63 |
-
remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10, 2 );
|
64 |
-
add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
|
65 |
-
add_action( 'admin_init', array( $this, 'show_changelog' ) );
|
66 |
-
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Check for Updates at the defined API endpoint and modify the update array.
|
71 |
-
*
|
72 |
-
* This function dives into the update API just when WordPress creates its update array,
|
73 |
-
* then adds a custom API call and injects the custom plugin data retrieved from the API.
|
74 |
-
* It is reassembled from parts of the native WordPress plugin update code.
|
75 |
-
* See wp-includes/update.php line 121 for the original wp_update_plugins() function.
|
76 |
-
*
|
77 |
-
* @uses api_request()
|
78 |
-
*
|
79 |
-
* @param array $_transient_data Update array build by WordPress.
|
80 |
-
* @return array Modified update array with custom plugin data.
|
81 |
-
*/
|
82 |
-
public function check_update( $_transient_data ) {
|
83 |
-
|
84 |
-
global $pagenow;
|
85 |
-
|
86 |
-
if ( ! is_object( $_transient_data ) ) {
|
87 |
-
$_transient_data = new stdClass;
|
88 |
-
}
|
89 |
-
|
90 |
-
if ( 'plugins.php' == $pagenow && is_multisite() ) {
|
91 |
-
return $_transient_data;
|
92 |
-
}
|
93 |
-
|
94 |
-
if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
|
95 |
-
return $_transient_data;
|
96 |
-
}
|
97 |
-
|
98 |
-
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
|
99 |
-
|
100 |
-
if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
|
101 |
-
|
102 |
-
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
103 |
-
|
104 |
-
$_transient_data->response[ $this->name ] = $version_info;
|
105 |
-
|
106 |
-
}
|
107 |
-
|
108 |
-
$_transient_data->last_checked = time();
|
109 |
-
$_transient_data->checked[ $this->name ] = $this->version;
|
110 |
-
|
111 |
-
}
|
112 |
-
|
113 |
-
return $_transient_data;
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
|
118 |
-
*
|
119 |
-
* @param string $file
|
120 |
-
* @param array $plugin
|
121 |
-
*/
|
122 |
-
public function show_update_notification( $file, $plugin ) {
|
123 |
-
|
124 |
-
if( ! current_user_can( 'update_plugins' ) ) {
|
125 |
-
return;
|
126 |
-
}
|
127 |
-
|
128 |
-
if( ! is_multisite() ) {
|
129 |
-
return;
|
130 |
-
}
|
131 |
-
|
132 |
-
if ( $this->name != $file ) {
|
133 |
-
return;
|
134 |
-
}
|
135 |
-
|
136 |
-
// Remove our filter on the site transient
|
137 |
-
remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
|
138 |
-
|
139 |
-
$update_cache = get_site_transient( 'update_plugins' );
|
140 |
-
|
141 |
-
$update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
|
142 |
-
|
143 |
-
if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
|
144 |
-
|
145 |
-
$cache_key = md5( 'edd_plugin_' . sanitize_key( $this->name ) . '_version_info' );
|
146 |
-
$version_info = get_transient( $cache_key );
|
147 |
-
|
148 |
-
if( false === $version_info ) {
|
149 |
-
|
150 |
-
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
|
151 |
-
|
152 |
-
set_transient( $cache_key, $version_info, 3600 );
|
153 |
-
}
|
154 |
-
|
155 |
-
if( ! is_object( $version_info ) ) {
|
156 |
-
return;
|
157 |
-
}
|
158 |
-
|
159 |
-
if( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
160 |
-
|
161 |
-
$update_cache->response[ $this->name ] = $version_info;
|
162 |
-
|
163 |
-
}
|
164 |
-
|
165 |
-
$update_cache->last_checked = time();
|
166 |
-
$update_cache->checked[ $this->name ] = $this->version;
|
167 |
-
|
168 |
-
set_site_transient( 'update_plugins', $update_cache );
|
169 |
-
|
170 |
-
} else {
|
171 |
-
|
172 |
-
$version_info = $update_cache->response[ $this->name ];
|
173 |
-
|
174 |
-
}
|
175 |
-
|
176 |
-
// Restore our filter
|
177 |
-
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
178 |
-
|
179 |
-
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
180 |
-
|
181 |
-
// build a plugin list row, with update notification
|
182 |
-
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
183 |
-
echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
|
184 |
-
|
185 |
-
$changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
|
186 |
-
|
187 |
-
if ( empty( $version_info->download_link ) ) {
|
188 |
-
printf(
|
189 |
-
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'easy-digital-downloads' ),
|
190 |
-
esc_html( $version_info->name ),
|
191 |
-
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
192 |
-
esc_html( $version_info->new_version ),
|
193 |
-
'</a>'
|
194 |
-
);
|
195 |
-
} else {
|
196 |
-
printf(
|
197 |
-
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'easy-digital-downloads' ),
|
198 |
-
esc_html( $version_info->name ),
|
199 |
-
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
200 |
-
esc_html( $version_info->new_version ),
|
201 |
-
'</a>',
|
202 |
-
'<a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) ) .'">',
|
203 |
-
'</a>'
|
204 |
-
);
|
205 |
-
}
|
206 |
-
|
207 |
-
do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );
|
208 |
-
|
209 |
-
echo '</div></td></tr>';
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
|
214 |
-
/**
|
215 |
-
* Updates information on the "View version x.x details" page with custom data.
|
216 |
-
*
|
217 |
-
* @uses api_request()
|
218 |
-
*
|
219 |
-
* @param mixed $_data
|
220 |
-
* @param string $_action
|
221 |
-
* @param object $_args
|
222 |
-
* @return object $_data
|
223 |
-
*/
|
224 |
-
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
225 |
-
|
226 |
-
|
227 |
-
if ( $_action != 'plugin_information' ) {
|
228 |
-
|
229 |
-
return $_data;
|
230 |
-
|
231 |
-
}
|
232 |
-
|
233 |
-
if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
|
234 |
-
|
235 |
-
return $_data;
|
236 |
-
|
237 |
-
}
|
238 |
-
|
239 |
-
$to_send = array(
|
240 |
-
'slug' => $this->slug,
|
241 |
-
'is_ssl' => is_ssl(),
|
242 |
-
'fields' => array(
|
243 |
-
'banners' => false, // These will be supported soon hopefully
|
244 |
-
'reviews' => false
|
245 |
-
)
|
246 |
-
);
|
247 |
-
|
248 |
-
$api_response = $this->api_request( 'plugin_information', $to_send );
|
249 |
-
|
250 |
-
if ( false !== $api_response ) {
|
251 |
-
$_data = $api_response;
|
252 |
-
}
|
253 |
-
|
254 |
-
return $_data;
|
255 |
-
}
|
256 |
-
|
257 |
-
|
258 |
-
/**
|
259 |
-
* Disable SSL verification in order to prevent download update failures
|
260 |
-
*
|
261 |
-
* @param array $args
|
262 |
-
* @param string $url
|
263 |
-
* @return object $array
|
264 |
-
*/
|
265 |
-
public function http_request_args( $args, $url ) {
|
266 |
-
// If it is an https request and we are performing a package download, disable ssl verification
|
267 |
-
if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
|
268 |
-
$args['sslverify'] = false;
|
269 |
-
}
|
270 |
-
return $args;
|
271 |
-
}
|
272 |
-
|
273 |
-
/**
|
274 |
-
* Calls the API and, if successfull, returns the object delivered by the API.
|
275 |
-
*
|
276 |
-
* @uses get_bloginfo()
|
277 |
-
* @uses wp_remote_post()
|
278 |
-
* @uses is_wp_error()
|
279 |
-
*
|
280 |
-
* @param string $_action The requested action.
|
281 |
-
* @param array $_data Parameters for the API action.
|
282 |
-
* @return false|object
|
283 |
-
*/
|
284 |
-
private function api_request( $_action, $_data ) {
|
285 |
-
|
286 |
-
global $wp_version;
|
287 |
-
|
288 |
-
$data = array_merge( $this->api_data, $_data );
|
289 |
-
|
290 |
-
if ( $data['slug'] != $this->slug ) {
|
291 |
-
return;
|
292 |
-
}
|
293 |
-
|
294 |
-
if( $this->api_url == trailingslashit (home_url() ) ) {
|
295 |
-
return false; // Don't allow a plugin to ping itself
|
296 |
-
}
|
297 |
-
|
298 |
-
$api_params = array(
|
299 |
-
'edd_action' => 'get_version',
|
300 |
-
'license' => ! empty( $data['license'] ) ? $data['license'] : '',
|
301 |
-
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
302 |
-
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
303 |
-
'slug' => $data['slug'],
|
304 |
-
'author' => $data['author'],
|
305 |
-
'url' => home_url()
|
306 |
-
);
|
307 |
-
|
308 |
-
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
309 |
-
|
310 |
-
if ( ! is_wp_error( $request ) ) {
|
311 |
-
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
312 |
-
}
|
313 |
-
|
314 |
-
if ( $request && isset( $request->sections ) ) {
|
315 |
-
$request->sections = maybe_unserialize( $request->sections );
|
316 |
-
} else {
|
317 |
-
$request = false;
|
318 |
-
}
|
319 |
-
|
320 |
-
return $request;
|
321 |
-
}
|
322 |
-
|
323 |
-
public function show_changelog() {
|
324 |
-
|
325 |
-
global $edd_plugin_data;
|
326 |
-
|
327 |
-
if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
|
328 |
-
return;
|
329 |
-
}
|
330 |
-
|
331 |
-
if( empty( $_REQUEST['plugin'] ) ) {
|
332 |
-
return;
|
333 |
-
}
|
334 |
-
|
335 |
-
if( empty( $_REQUEST['slug'] ) ) {
|
336 |
-
return;
|
337 |
-
}
|
338 |
-
|
339 |
-
if( ! current_user_can( 'update_plugins' ) ) {
|
340 |
-
wp_die( __( 'You do not have permission to install plugin updates', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
|
341 |
-
}
|
342 |
-
|
343 |
-
$data = $edd_plugin_data[ $_REQUEST['slug'] ];
|
344 |
-
$cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_version_info' );
|
345 |
-
$version_info = get_transient( $cache_key );
|
346 |
-
|
347 |
-
if( false === $version_info ) {
|
348 |
-
|
349 |
-
$api_params = array(
|
350 |
-
'edd_action' => 'get_version',
|
351 |
-
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
352 |
-
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
353 |
-
'slug' => $_REQUEST['slug'],
|
354 |
-
'author' => $data['author'],
|
355 |
-
'url' => home_url()
|
356 |
-
);
|
357 |
-
|
358 |
-
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
359 |
-
|
360 |
-
if ( ! is_wp_error( $request ) ) {
|
361 |
-
$version_info = json_decode( wp_remote_retrieve_body( $request ) );
|
362 |
-
}
|
363 |
-
|
364 |
-
if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
|
365 |
-
$version_info->sections = maybe_unserialize( $version_info->sections );
|
366 |
-
} else {
|
367 |
-
$version_info = false;
|
368 |
-
}
|
369 |
-
|
370 |
-
set_transient( $cache_key, $version_info, 3600 );
|
371 |
-
|
372 |
-
}
|
373 |
-
|
374 |
-
if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
|
375 |
-
echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
|
376 |
-
}
|
377 |
-
|
378 |
-
exit;
|
379 |
-
}
|
380 |
-
|
381 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/titan-framework/inc/edd-licensing/theme-updater-class.php
DELETED
@@ -1,149 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Theme updater class.
|
4 |
-
*
|
5 |
-
* @package EDD Sample Theme
|
6 |
-
*/
|
7 |
-
|
8 |
-
class TITAN_EDD_Theme_Updater {
|
9 |
-
|
10 |
-
private $remote_api_url;
|
11 |
-
private $request_data;
|
12 |
-
private $response_key;
|
13 |
-
private $theme_slug;
|
14 |
-
private $license_key;
|
15 |
-
private $version;
|
16 |
-
private $author;
|
17 |
-
protected $strings = null;
|
18 |
-
|
19 |
-
function __construct( $args = array(), $strings = array() ) {
|
20 |
-
|
21 |
-
$args = wp_parse_args( $args, array(
|
22 |
-
'remote_api_url' => 'http://easydigitaldownloads.com',
|
23 |
-
'request_data' => array(),
|
24 |
-
'theme_slug' => get_template(),
|
25 |
-
'item_name' => '',
|
26 |
-
'license' => '',
|
27 |
-
'version' => '',
|
28 |
-
'author' => ''
|
29 |
-
) );
|
30 |
-
extract( $args );
|
31 |
-
|
32 |
-
$this->license = $license;
|
33 |
-
$this->item_name = $item_name;
|
34 |
-
$this->version = $version;
|
35 |
-
$this->theme_slug = sanitize_key( $theme_slug );
|
36 |
-
$this->author = $author;
|
37 |
-
$this->remote_api_url = $remote_api_url;
|
38 |
-
$this->response_key = $this->theme_slug . '-update-response';
|
39 |
-
$this->strings = $strings;
|
40 |
-
|
41 |
-
add_filter( 'site_transient_update_themes', array( &$this, 'theme_update_transient' ) );
|
42 |
-
add_filter( 'delete_site_transient_update_themes', array( &$this, 'delete_theme_update_transient' ) );
|
43 |
-
add_action( 'load-update-core.php', array( &$this, 'delete_theme_update_transient' ) );
|
44 |
-
add_action( 'load-themes.php', array( &$this, 'delete_theme_update_transient' ) );
|
45 |
-
add_action( 'load-themes.php', array( &$this, 'load_themes_screen' ) );
|
46 |
-
}
|
47 |
-
|
48 |
-
function load_themes_screen() {
|
49 |
-
add_thickbox();
|
50 |
-
add_action( 'admin_notices', array( &$this, 'update_nag' ) );
|
51 |
-
}
|
52 |
-
|
53 |
-
function update_nag() {
|
54 |
-
|
55 |
-
$strings = $this->strings;
|
56 |
-
|
57 |
-
$theme = wp_get_theme( $this->theme_slug );
|
58 |
-
|
59 |
-
$api_response = get_transient( $this->response_key );
|
60 |
-
|
61 |
-
if ( false == $api_response ) {
|
62 |
-
return;
|
63 |
-
}
|
64 |
-
|
65 |
-
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->theme_slug ), 'upgrade-theme_' . $this->theme_slug );
|
66 |
-
$update_onclick = ' onclick="if ( confirm(\'' . esc_js( $strings['update-notice'] ) . '\') ) {return true;}return false;"';
|
67 |
-
|
68 |
-
if ( version_compare( $this->version, $api_response->new_version, '<' ) ) {
|
69 |
-
|
70 |
-
echo '<div id="update-nag">';
|
71 |
-
printf(
|
72 |
-
$strings['update-available'],
|
73 |
-
$theme->get( 'Name' ),
|
74 |
-
$api_response->new_version,
|
75 |
-
'#TB_inline?width=640&inlineId=' . $this->theme_slug . '_changelog',
|
76 |
-
$theme->get( 'Name' ),
|
77 |
-
$update_url,
|
78 |
-
$update_onclick
|
79 |
-
);
|
80 |
-
echo '</div>';
|
81 |
-
echo '<div id="' . $this->theme_slug . '_' . 'changelog" style="display:none;">';
|
82 |
-
echo wpautop( $api_response->sections['changelog'] );
|
83 |
-
echo '</div>';
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
function theme_update_transient( $value ) {
|
88 |
-
$update_data = $this->check_for_update();
|
89 |
-
if ( $update_data ) {
|
90 |
-
$value->response[ $this->theme_slug ] = $update_data;
|
91 |
-
}
|
92 |
-
return $value;
|
93 |
-
}
|
94 |
-
|
95 |
-
function delete_theme_update_transient() {
|
96 |
-
delete_transient( $this->response_key );
|
97 |
-
}
|
98 |
-
|
99 |
-
function check_for_update() {
|
100 |
-
|
101 |
-
$update_data = get_transient( $this->response_key );
|
102 |
-
|
103 |
-
if ( false == $update_data ) {
|
104 |
-
$failed = false;
|
105 |
-
|
106 |
-
$api_params = array(
|
107 |
-
'edd_action' => 'get_version',
|
108 |
-
'license' => $this->license,
|
109 |
-
'name' => $this->item_name,
|
110 |
-
'slug' => $this->theme_slug,
|
111 |
-
'author' => $this->author
|
112 |
-
);
|
113 |
-
|
114 |
-
$response = wp_remote_post( $this->remote_api_url, array( 'timeout' => 15, 'body' => $api_params ) );
|
115 |
-
|
116 |
-
// Make sure the response was successful
|
117 |
-
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
118 |
-
$failed = true;
|
119 |
-
}
|
120 |
-
|
121 |
-
$update_data = json_decode( wp_remote_retrieve_body( $response ) );
|
122 |
-
|
123 |
-
if ( ! is_object( $update_data ) ) {
|
124 |
-
$failed = true;
|
125 |
-
}
|
126 |
-
|
127 |
-
// If the response failed, try again in 30 minutes
|
128 |
-
if ( $failed ) {
|
129 |
-
$data = new stdClass;
|
130 |
-
$data->new_version = $this->version;
|
131 |
-
set_transient( $this->response_key, $data, strtotime( '+30 minutes' ) );
|
132 |
-
return false;
|
133 |
-
}
|
134 |
-
|
135 |
-
// If the status is 'ok', return the update arguments
|
136 |
-
if ( ! $failed ) {
|
137 |
-
$update_data->sections = maybe_unserialize( $update_data->sections );
|
138 |
-
set_transient( $this->response_key, $update_data, strtotime( '+12 hours' ) );
|
139 |
-
}
|
140 |
-
}
|
141 |
-
|
142 |
-
if ( version_compare( $this->version, $update_data->new_version, '>=' ) ) {
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
|
146 |
-
return (array) $update_data;
|
147 |
-
}
|
148 |
-
|
149 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/titan-framework/lib/class-option-font.php
CHANGED
@@ -76,7 +76,6 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
|
|
76 |
// We need to do this since we want to gather all the fonts first then enqueue only the unique fonts
|
77 |
private static $optionsToEnqueue = array();
|
78 |
|
79 |
-
|
80 |
/**
|
81 |
* Constructor
|
82 |
*
|
76 |
// We need to do this since we want to gather all the fonts first then enqueue only the unique fonts
|
77 |
private static $optionsToEnqueue = array();
|
78 |
|
|
|
79 |
/**
|
80 |
* Constructor
|
81 |
*
|
vendor/titan-framework/lib/functions-googlefonts.php
CHANGED
@@ -1,49 +1,5 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
// if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
-
/*
|
5 |
-
// We use this function to generate the fonts.
|
6 |
-
bfi_get_googlefonts_from_json(file_get_contents("https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyB7JMGpC3uyoLm6XfFIU3rSndRQnnfr27M"));
|
7 |
-
function bfi_get_googlefonts_from_json($json) {
|
8 |
-
$res = json_decode( $json );
|
9 |
-
$allFonts = array();
|
10 |
-
|
11 |
-
foreach ($res->items as $item) {
|
12 |
-
// $fontName = urlencode($item->family);
|
13 |
-
$fontFamily = $item->family;
|
14 |
-
$fontSubsets = $item->subsets;
|
15 |
-
$fontVariants = $item->variants;
|
16 |
-
|
17 |
-
foreach ( $fontVariants as $key => $variant ) {
|
18 |
-
if ( $variant == 'regular' ) {
|
19 |
-
$fontVariants[$key] = '400';
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
$allFonts[] = array(
|
24 |
-
'name' => $fontFamily,
|
25 |
-
'subsets' => $fontSubsets,
|
26 |
-
'variants' => $fontVariants
|
27 |
-
);
|
28 |
-
}
|
29 |
-
|
30 |
-
// print an array so we can paste it below
|
31 |
-
foreach ( $allFonts as $font ) {
|
32 |
-
echo "array( 'name' => '{$font['name']}', 'subsets' => array(";
|
33 |
-
foreach ( $font['subsets'] as $key => $subset ) {
|
34 |
-
echo $key == 0 ? "" : ",";
|
35 |
-
echo "'$subset'";
|
36 |
-
}
|
37 |
-
echo "), 'variants' => array(";
|
38 |
-
foreach ( $font['variants'] as $key => $variant ) {
|
39 |
-
echo $key == 0 ? "" : ",";
|
40 |
-
echo "'$variant'";
|
41 |
-
}
|
42 |
-
echo ") ),\n";
|
43 |
-
}
|
44 |
-
}
|
45 |
-
*/
|
46 |
-
|
47 |
// All possible google fonts
|
48 |
// List created on Sept 19, 2015
|
49 |
if ( ! function_exists( 'titan_get_googlefonts' ) ) {
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
// All possible google fonts
|
4 |
// List created on Sept 19, 2015
|
5 |
if ( ! function_exists( 'titan_get_googlefonts' ) ) {
|
vendor/titan-framework/readme.txt
CHANGED
@@ -63,7 +63,6 @@ The generated theme comes with sample pre-created options in the admin and theme
|
|
63 |
* Color picker
|
64 |
* Custom
|
65 |
* Date
|
66 |
-
* EDD License (Easy Digital Downloads license)
|
67 |
* Editor (WYSIWYG)
|
68 |
* Enable
|
69 |
* File upload
|
63 |
* Color picker
|
64 |
* Custom
|
65 |
* Date
|
|
|
66 |
* Editor (WYSIWYG)
|
67 |
* Enable
|
68 |
* File upload
|
vendor/titan-framework/titan-framework.php
CHANGED
@@ -43,7 +43,6 @@ require_once( TF_PATH . 'lib/class-option-checkbox.php' );
|
|
43 |
require_once( TF_PATH . 'lib/class-option-code.php' );
|
44 |
require_once( TF_PATH . 'lib/class-option-color.php' );
|
45 |
require_once( TF_PATH . 'lib/class-option-custom.php' );
|
46 |
-
require_once( TF_PATH . 'lib/class-option-edd-license.php' );
|
47 |
require_once( TF_PATH . 'lib/class-option-date.php' );
|
48 |
require_once( TF_PATH . 'lib/class-option-enable.php' );
|
49 |
require_once( TF_PATH . 'lib/class-option-editor.php' );
|
43 |
require_once( TF_PATH . 'lib/class-option-code.php' );
|
44 |
require_once( TF_PATH . 'lib/class-option-color.php' );
|
45 |
require_once( TF_PATH . 'lib/class-option-custom.php' );
|
|
|
46 |
require_once( TF_PATH . 'lib/class-option-date.php' );
|
47 |
require_once( TF_PATH . 'lib/class-option-enable.php' );
|
48 |
require_once( TF_PATH . 'lib/class-option-editor.php' );
|