Version Description
- Added
intval()
to allwp_remote_retrieve_response_code()
. On some servers this function returns a string instead of int and the `$code ==
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.1.5 |
Comparing to | |
See all releases |
Code changes from version 2.1.4 to 2.1.5
- framework/core/components/extensions/manager/class--fw-extensions-manager.php +2 -2
- framework/extensions/update/class-fw-extension-update.php +13 -13
- framework/extensions/update/extensions/github-update/class-fw-extension-github-update.php +3 -3
- framework/extensions/update/manifest.php +2 -1
- framework/manifest.php +1 -1
- readme.txt +4 -1
- unyson.php +1 -1
framework/core/components/extensions/manager/class--fw-extensions-manager.php
CHANGED
@@ -1704,7 +1704,7 @@ final class _FW_Extensions_Manager
|
|
1704 |
|
1705 |
unset($http);
|
1706 |
|
1707 |
-
$response_code = wp_remote_retrieve_response_code($response);
|
1708 |
|
1709 |
if ($response_code !== 200) {
|
1710 |
if ($response_code === 403) {
|
@@ -1767,7 +1767,7 @@ final class _FW_Extensions_Manager
|
|
1767 |
|
1768 |
unset($http);
|
1769 |
|
1770 |
-
if (($response_code = wp_remote_retrieve_response_code($response)) !== 200) {
|
1771 |
if ($response_code) {
|
1772 |
return new WP_Error(
|
1773 |
$wp_error_id,
|
1704 |
|
1705 |
unset($http);
|
1706 |
|
1707 |
+
$response_code = intval(wp_remote_retrieve_response_code($response));
|
1708 |
|
1709 |
if ($response_code !== 200) {
|
1710 |
if ($response_code === 403) {
|
1767 |
|
1768 |
unset($http);
|
1769 |
|
1770 |
+
if (($response_code = intval(wp_remote_retrieve_response_code($response))) !== 200) {
|
1771 |
if ($response_code) {
|
1772 |
return new WP_Error(
|
1773 |
$wp_error_id,
|
framework/extensions/update/class-fw-extension-update.php
CHANGED
@@ -73,7 +73,7 @@ class FW_Extension_Update extends FW_Extension
|
|
73 |
private function get_wp_fs_tmp_dir()
|
74 |
{
|
75 |
return FW_WP_Filesystem::real_path_to_filesystem_path(
|
76 |
-
apply_filters('fw_tmp_dir', fw_fix_path(WP_CONTENT_DIR) .'/tmp')
|
77 |
);
|
78 |
}
|
79 |
|
@@ -290,14 +290,14 @@ class FW_Extension_Update extends FW_Extension
|
|
290 |
|
291 |
if ($wp_filesystem->exists($file_path)) {
|
292 |
if (!$wp_filesystem->delete($file_path)) {
|
293 |
-
trigger_error(__('Cannot delete:', 'fw') .
|
294 |
}
|
295 |
}
|
296 |
|
297 |
if ($enable) {
|
298 |
// Create maintenance file to signal that we are upgrading
|
299 |
if (!$wp_filesystem->put_contents($file_path, '<?php $upgrading = ' . time() . '; ?>', FS_CHMOD_FILE)) {
|
300 |
-
trigger_error(__('Cannot create:', 'fw') .
|
301 |
}
|
302 |
}
|
303 |
}
|
@@ -375,13 +375,13 @@ class FW_Extension_Update extends FW_Extension
|
|
375 |
if ($wp_filesystem->exists($tmp_download_dir)) {
|
376 |
// just in case it already exists, clear everything, it may contain old files
|
377 |
if (!$wp_filesystem->rmdir($tmp_download_dir, true)) {
|
378 |
-
$error = __('Cannot remove old temporary directory:', 'fw') .
|
379 |
break;
|
380 |
}
|
381 |
}
|
382 |
|
383 |
if (!FW_WP_Filesystem::mkdir_recursive($tmp_download_dir)) {
|
384 |
-
$error = __('Cannot create directory:', 'fw') .
|
385 |
break;
|
386 |
}
|
387 |
}
|
@@ -407,7 +407,7 @@ class FW_Extension_Update extends FW_Extension
|
|
407 |
{
|
408 |
$dir_files = $wp_filesystem->dirlist($wp_fs_destination_dir, true);
|
409 |
if ($dir_files === false) {
|
410 |
-
$error =__('Cannot access directory:', 'fw') .
|
411 |
break;
|
412 |
}
|
413 |
|
@@ -426,7 +426,7 @@ class FW_Extension_Update extends FW_Extension
|
|
426 |
$file_path = $wp_fs_destination_dir .'/'. $file['name'];
|
427 |
|
428 |
if (!$wp_filesystem->delete($file_path, true, $file['type'])) {
|
429 |
-
$error = __('Cannot remove:', 'fw') .
|
430 |
break 2;
|
431 |
}
|
432 |
}
|
@@ -436,7 +436,7 @@ class FW_Extension_Update extends FW_Extension
|
|
436 |
{
|
437 |
$dir_files = $wp_filesystem->dirlist($downloaded_dir, true);
|
438 |
if ($dir_files === false) {
|
439 |
-
$error = __('Cannot access directory:', 'fw') .
|
440 |
break;
|
441 |
}
|
442 |
|
@@ -536,7 +536,7 @@ class FW_Extension_Update extends FW_Extension
|
|
536 |
$source_ext_dirs = $wp_filesystem->dirlist($source_dir, true);
|
537 |
if ($source_ext_dirs === false) {
|
538 |
return new WP_Error($wp_error_id,
|
539 |
-
__('Cannot access directory:', 'fw') .
|
540 |
);
|
541 |
}
|
542 |
|
@@ -559,7 +559,7 @@ class FW_Extension_Update extends FW_Extension
|
|
559 |
if (!$wp_filesystem->exists($destination_extension_dir)) {
|
560 |
if (!FW_WP_Filesystem::mkdir_recursive($destination_extension_dir)) {
|
561 |
return new WP_Error($wp_error_id,
|
562 |
-
__('Cannot create directory:', 'fw') .
|
563 |
);
|
564 |
}
|
565 |
}
|
@@ -569,7 +569,7 @@ class FW_Extension_Update extends FW_Extension
|
|
569 |
$dest_ext_files = $wp_filesystem->dirlist($destination_extension_dir, true);
|
570 |
if ($dest_ext_files === false) {
|
571 |
return new WP_Error($wp_error_id,
|
572 |
-
__('Cannot access directory:', 'fw') .
|
573 |
);
|
574 |
}
|
575 |
|
@@ -589,7 +589,7 @@ class FW_Extension_Update extends FW_Extension
|
|
589 |
|
590 |
if (!$wp_filesystem->delete($dest_ext_file_path, true, $dest_ext_file['type'])) {
|
591 |
return new WP_Error($wp_error_id,
|
592 |
-
__('Cannot delete:', 'fw') .
|
593 |
);
|
594 |
}
|
595 |
}
|
@@ -601,7 +601,7 @@ class FW_Extension_Update extends FW_Extension
|
|
601 |
$source_ext_files = $wp_filesystem->dirlist($source_extension_dir, true);
|
602 |
if ($source_ext_files === false) {
|
603 |
return new WP_Error($wp_error_id,
|
604 |
-
__('Cannot access directory:', 'fw') .
|
605 |
);
|
606 |
}
|
607 |
|
73 |
private function get_wp_fs_tmp_dir()
|
74 |
{
|
75 |
return FW_WP_Filesystem::real_path_to_filesystem_path(
|
76 |
+
apply_filters('fw_tmp_dir', fw_fix_path(WP_CONTENT_DIR) .'/tmp')
|
77 |
);
|
78 |
}
|
79 |
|
290 |
|
291 |
if ($wp_filesystem->exists($file_path)) {
|
292 |
if (!$wp_filesystem->delete($file_path)) {
|
293 |
+
trigger_error(__('Cannot delete: ', 'fw') . $file_path, E_USER_WARNING);
|
294 |
}
|
295 |
}
|
296 |
|
297 |
if ($enable) {
|
298 |
// Create maintenance file to signal that we are upgrading
|
299 |
if (!$wp_filesystem->put_contents($file_path, '<?php $upgrading = ' . time() . '; ?>', FS_CHMOD_FILE)) {
|
300 |
+
trigger_error(__('Cannot create: ', 'fw') . $file_path, E_USER_WARNING);
|
301 |
}
|
302 |
}
|
303 |
}
|
375 |
if ($wp_filesystem->exists($tmp_download_dir)) {
|
376 |
// just in case it already exists, clear everything, it may contain old files
|
377 |
if (!$wp_filesystem->rmdir($tmp_download_dir, true)) {
|
378 |
+
$error = __('Cannot remove old temporary directory: ', 'fw') . $tmp_download_dir;
|
379 |
break;
|
380 |
}
|
381 |
}
|
382 |
|
383 |
if (!FW_WP_Filesystem::mkdir_recursive($tmp_download_dir)) {
|
384 |
+
$error = __('Cannot create directory: ', 'fw') . $tmp_download_dir;
|
385 |
break;
|
386 |
}
|
387 |
}
|
407 |
{
|
408 |
$dir_files = $wp_filesystem->dirlist($wp_fs_destination_dir, true);
|
409 |
if ($dir_files === false) {
|
410 |
+
$error =__('Cannot access directory: ', 'fw') . $wp_fs_destination_dir;
|
411 |
break;
|
412 |
}
|
413 |
|
426 |
$file_path = $wp_fs_destination_dir .'/'. $file['name'];
|
427 |
|
428 |
if (!$wp_filesystem->delete($file_path, true, $file['type'])) {
|
429 |
+
$error = __('Cannot remove: ', 'fw') . $file_path;
|
430 |
break 2;
|
431 |
}
|
432 |
}
|
436 |
{
|
437 |
$dir_files = $wp_filesystem->dirlist($downloaded_dir, true);
|
438 |
if ($dir_files === false) {
|
439 |
+
$error = __('Cannot access directory: ', 'fw') . $downloaded_dir;
|
440 |
break;
|
441 |
}
|
442 |
|
536 |
$source_ext_dirs = $wp_filesystem->dirlist($source_dir, true);
|
537 |
if ($source_ext_dirs === false) {
|
538 |
return new WP_Error($wp_error_id,
|
539 |
+
__('Cannot access directory: ', 'fw') . $source_dir
|
540 |
);
|
541 |
}
|
542 |
|
559 |
if (!$wp_filesystem->exists($destination_extension_dir)) {
|
560 |
if (!FW_WP_Filesystem::mkdir_recursive($destination_extension_dir)) {
|
561 |
return new WP_Error($wp_error_id,
|
562 |
+
__('Cannot create directory: ', 'fw') . $destination_extension_dir
|
563 |
);
|
564 |
}
|
565 |
}
|
569 |
$dest_ext_files = $wp_filesystem->dirlist($destination_extension_dir, true);
|
570 |
if ($dest_ext_files === false) {
|
571 |
return new WP_Error($wp_error_id,
|
572 |
+
__('Cannot access directory: ', 'fw') . $destination_extension_dir
|
573 |
);
|
574 |
}
|
575 |
|
589 |
|
590 |
if (!$wp_filesystem->delete($dest_ext_file_path, true, $dest_ext_file['type'])) {
|
591 |
return new WP_Error($wp_error_id,
|
592 |
+
__('Cannot delete: ', 'fw') . $dest_ext_file_path
|
593 |
);
|
594 |
}
|
595 |
}
|
601 |
$source_ext_files = $wp_filesystem->dirlist($source_extension_dir, true);
|
602 |
if ($source_ext_files === false) {
|
603 |
return new WP_Error($wp_error_id,
|
604 |
+
__('Cannot access directory: ', 'fw') . $source_extension_dir
|
605 |
);
|
606 |
}
|
607 |
|
framework/extensions/update/extensions/github-update/class-fw-extension-github-update.php
CHANGED
@@ -70,7 +70,7 @@ class FW_Extension_Github_Update extends FW_Ext_Update_Service
|
|
70 |
return $response;
|
71 |
}
|
72 |
|
73 |
-
if (wp_remote_retrieve_response_code($response) !== 200) {
|
74 |
return new WP_Error('fw_ext_update_github_fetch_failed', __('Failed to contact Github.', 'fw'));
|
75 |
}
|
76 |
|
@@ -173,7 +173,7 @@ class FW_Extension_Github_Update extends FW_Ext_Update_Service
|
|
173 |
|
174 |
unset($http);
|
175 |
|
176 |
-
$response_code = wp_remote_retrieve_response_code($response);
|
177 |
|
178 |
if ($response_code !== 200) {
|
179 |
if ($response_code === 403) {
|
@@ -246,7 +246,7 @@ class FW_Extension_Github_Update extends FW_Ext_Update_Service
|
|
246 |
|
247 |
unset($http);
|
248 |
|
249 |
-
if (wp_remote_retrieve_response_code($response) !== 200) {
|
250 |
return new WP_Error(
|
251 |
'fw_ext_update_github_download_failed',
|
252 |
sprintf(__('Cannot download %s zip.', 'fw'), $title)
|
70 |
return $response;
|
71 |
}
|
72 |
|
73 |
+
if (intval(wp_remote_retrieve_response_code($response)) !== 200) {
|
74 |
return new WP_Error('fw_ext_update_github_fetch_failed', __('Failed to contact Github.', 'fw'));
|
75 |
}
|
76 |
|
173 |
|
174 |
unset($http);
|
175 |
|
176 |
+
$response_code = intval(wp_remote_retrieve_response_code($response));
|
177 |
|
178 |
if ($response_code !== 200) {
|
179 |
if ($response_code === 403) {
|
246 |
|
247 |
unset($http);
|
248 |
|
249 |
+
if (intval(wp_remote_retrieve_response_code($response)) !== 200) {
|
250 |
return new WP_Error(
|
251 |
'fw_ext_update_github_download_failed',
|
252 |
sprintf(__('Cannot download %s zip.', 'fw'), $title)
|
framework/extensions/update/manifest.php
CHANGED
@@ -5,5 +5,6 @@ $manifest = array();
|
|
5 |
$manifest['name'] = __('Update', 'fw');
|
6 |
$manifest['description'] = __('Keep you framework, extensions and theme up to date.', 'fw');
|
7 |
$manifest['standalone'] = true;
|
8 |
-
|
|
|
9 |
$manifest['github_update'] = 'ThemeFuse/Unyson-Update-Extension';
|
5 |
$manifest['name'] = __('Update', 'fw');
|
6 |
$manifest['description'] = __('Keep you framework, extensions and theme up to date.', 'fw');
|
7 |
$manifest['standalone'] = true;
|
8 |
+
|
9 |
+
$manifest['version'] = '1.0.2';
|
10 |
$manifest['github_update'] = 'ThemeFuse/Unyson-Update-Extension';
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.1.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.1.5';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson, themefusecom
|
|
3 |
Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.0.1
|
6 |
-
Stable tag: 2.1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -84,6 +84,9 @@ Yes; Unyson will work with any theme.
|
|
84 |
|
85 |
== Changelog ==
|
86 |
|
|
|
|
|
|
|
87 |
= 2.1.4 =
|
88 |
* Improvements for the `fw_google_fonts` filter used to expand the list of available Google fonts. [#100](https://github.com/ThemeFuse/Unyson/issues/100)
|
89 |
|
3 |
Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.0.1
|
6 |
+
Stable tag: 2.1.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 2.1.5 =
|
88 |
+
* Added `intval()` to all `wp_remote_retrieve_response_code()`. On some servers this function returns a string instead of int and the `$code === 200` verification fails.
|
89 |
+
|
90 |
= 2.1.4 =
|
91 |
* Improvements for the `fw_google_fonts` filter used to expand the list of available Google fonts. [#100](https://github.com/ThemeFuse/Unyson/issues/100)
|
92 |
|
unyson.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Unyson
|
4 |
* Plugin URI: http://unyson.themefuse.com/
|
5 |
* Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
|
6 |
-
* Version: 2.1.
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|
3 |
* Plugin Name: Unyson
|
4 |
* Plugin URI: http://unyson.themefuse.com/
|
5 |
* Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
|
6 |
+
* Version: 2.1.5
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|