Unyson - Version 2.1.0

Version Description

  • Moved major theme functionality from framework-customizations/theme/ to https://github.com/ThemeFuse/Theme-Includes , because the theme must work when the plugin is not installed.
  • Removed deprecated usage of the FW_Option_Type::_render() for enqueue scripts and style, use FW_Option_Type::_enqueue_static() for that
Download this release

Release Info

Developer Unyson
Plugin Icon 128x128 Unyson
Version 2.1.0
Comparing to
See all releases

Code changes from version 2.0.2 to 2.1.0

framework/core/class-fw-manifest.php CHANGED
@@ -389,7 +389,7 @@ class FW_Theme_Manifest extends FW_Manifest
389
  ) as $manifest_key => $stylesheet_header) {
390
  $header_value = trim($theme->get($stylesheet_header));
391
 
392
- if (is_child_theme()) {
393
  switch ($manifest_key) {
394
  case 'version':
395
  case 'uri':
389
  ) as $manifest_key => $stylesheet_header) {
390
  $header_value = trim($theme->get($stylesheet_header));
391
 
392
+ if ( is_child_theme() && $theme->parent() ) {
393
  switch ($manifest_key) {
394
  case 'version':
395
  case 'uri':
framework/core/components/extensions/manager/class--fw-extensions-manager.php CHANGED
@@ -1602,7 +1602,7 @@ final class _FW_Extensions_Manager
1602
  if (!FW_WP_Filesystem::mkdir_recursive($wp_fs_tmp_dir)) {
1603
  return new WP_Error(
1604
  $wp_error_id,
1605
- sprintf(__('Cannot create directory: %s', 'fw'), $wp_fs_tmp_dir)
1606
  );
1607
  }
1608
  }
1602
  if (!FW_WP_Filesystem::mkdir_recursive($wp_fs_tmp_dir)) {
1603
  return new WP_Error(
1604
  $wp_error_id,
1605
+ sprintf(__('Cannot create temporary directory: %s', 'fw'), $wp_fs_tmp_dir)
1606
  );
1607
  }
1608
  }
framework/core/components/extensions/manager/static/extensions-page.css CHANGED
@@ -90,6 +90,14 @@
90
  .fw-extensions-list .fw-extensions-list-item td:last-child {
91
  padding-bottom: 0;
92
  }
 
 
 
 
 
 
 
 
93
  }
94
 
95
 
@@ -129,10 +137,6 @@
129
  }
130
 
131
  @media (max-width: 782px) {
132
- .fw-extensions-list .fw-extensions-list-item .fw-extension-disabled .fw-extension-disabled-panel .fw-text-right {
133
- text-align: left;
134
- }
135
-
136
  .fw-extensions-list .fw-extensions-list-item.disabled > .inner {
137
  min-height: 320px;
138
  }
90
  .fw-extensions-list .fw-extensions-list-item td:last-child {
91
  padding-bottom: 0;
92
  }
93
+
94
+ .fw-extensions-list .fw-extensions-list-item .fw-text-center {
95
+ text-align: left;
96
+ }
97
+
98
+ body.rtl .fw-extensions-list .fw-extensions-list-item .fw-text-center {
99
+ text-align: right;
100
+ }
101
  }
102
 
103
 
137
  }
138
 
139
  @media (max-width: 782px) {
 
 
 
 
140
  .fw-extensions-list .fw-extensions-list-item.disabled > .inner {
141
  min-height: 320px;
142
  }
framework/core/components/theme.php CHANGED
@@ -24,61 +24,12 @@ final class _FW_Component_Theme
24
  }
25
  }
26
 
27
- /**
28
- * Include file from child and parent theme
29
- * @param string $rel_path
30
- */
31
- private static function include_file_all($rel_path)
32
- {
33
- if (is_child_theme()) {
34
- fw_include_file_isolated(fw_get_stylesheet_customizations_directory('/theme'. $rel_path));
35
- }
36
-
37
- fw_include_file_isolated(fw_get_template_customizations_directory('/theme'. $rel_path));
38
- }
39
-
40
- /**
41
- * Include all files from directory, from parent and child theme
42
- * @param string $rel_path
43
- */
44
- private static function include_directory_all($rel_path)
45
- {
46
- $paths = array();
47
-
48
- if (is_child_theme()) {
49
- $paths[] = fw_get_stylesheet_customizations_directory('/theme'. $rel_path);
50
- }
51
-
52
- $paths[] = fw_get_template_customizations_directory('/theme'. $rel_path);
53
-
54
- foreach ($paths as $path) {
55
- if ($files = glob($path .'/*.php')) {
56
- foreach ($files as $dir_file_path) {
57
- fw_include_file_isolated($dir_file_path);
58
- }
59
- }
60
- }
61
- }
62
-
63
  /**
64
  * @internal
65
  */
66
  public function _init()
67
  {
68
- self::include_file_all('/hooks.php');
69
-
70
- add_action('init', array($this, '_action_init'));
71
- add_action('widgets_init', array($this, '_action_widgets_init'));
72
- add_action('fw_extensions_init', array($this, '_action_fw_extensions_init'));
73
-
74
- /**
75
- * Include static.php later than all other static.php (for e.g. all extensions)
76
- * to be able to make some changes, for e.g. to wp_dequeue_style() some extension style
77
- */
78
- {
79
- add_action('wp_enqueue_scripts', array($this, '_action_enqueue_scripts'), 20);
80
- add_action('admin_enqueue_scripts', array($this, '_action_enqueue_scripts'), 20);
81
- }
82
  }
83
 
84
  /**
@@ -86,64 +37,6 @@ final class _FW_Component_Theme
86
  */
87
  public function _after_components_init()
88
  {
89
- self::include_file_all('/helpers.php');
90
- self::include_directory_all('/includes');
91
- }
92
-
93
- /**
94
- * @internal
95
- */
96
- public function _action_init()
97
- {
98
- self::include_file_all('/posts.php');
99
- self::include_file_all('/menus.php');
100
- }
101
-
102
- /**
103
- * @internal
104
- */
105
- public function _action_enqueue_scripts()
106
- {
107
- self::include_file_all('/static.php');
108
- }
109
-
110
- /**
111
- * @internal
112
- */
113
- public function _action_widgets_init()
114
- {
115
- $paths = array();
116
-
117
- if (is_child_theme()) {
118
- $paths[] = fw_get_stylesheet_customizations_directory('/theme/widgets');
119
- }
120
-
121
- $paths[] = fw_get_template_customizations_directory('/theme/widgets');
122
-
123
- $included_widgets = array();
124
-
125
- foreach ($paths as $path) {
126
- $dirs = glob($path .'/*', GLOB_ONLYDIR);
127
-
128
- if (!$dirs) {
129
- continue;
130
- }
131
-
132
- foreach ($dirs as $dir_path) {
133
- $dirname = basename($dir_path);
134
-
135
- if (isset($included_widgets[$dirname])) {
136
- // this happens when a widget in child theme wants to overwrite the widget from parent theme
137
- continue;
138
- } else {
139
- $included_widgets[$dirname] = true;
140
- }
141
-
142
- fw_include_file_isolated($dir_path .'/class-fw-widget-'. $dirname .'.php');
143
-
144
- register_widget('FW_Widget_'. fw_dirname_to_classname($dirname));
145
- }
146
- }
147
  }
148
 
149
  /**
24
  }
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  /**
28
  * @internal
29
  */
30
  public function _init()
31
  {
32
+ add_action('fw_extensions_init', array($this, '_action_fw_extensions_init'));
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
 
35
  /**
37
  */
38
  public function _after_components_init()
39
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
 
42
  /**
framework/core/extends/class-fw-option-type.php CHANGED
@@ -14,8 +14,6 @@ abstract class FW_Option_Type
14
  /**
15
  * Overwrite this method to enqueue scripts and styles
16
  *
17
- * Enqueue scripts and styles in the _render() method is deprecated.
18
- *
19
  * This method would be abstract but was added after the framework release,
20
  * and to prevent fatal errors from new option types created by users we can't make it abstract.
21
  *
@@ -28,16 +26,6 @@ abstract class FW_Option_Type
28
  */
29
  protected function _enqueue_static($id, $option, $data)
30
  {
31
- /**
32
- * @deprecated
33
- *
34
- * Call the _render() method to enqueue styles and scripts for option types created before this method was added
35
- *
36
- * For example this option type
37
- * https://github.com/ThemeFuse/Unyson/blob/e650bf083dde23ae2842344e70a16d5c335bf876/scratch-parent/framework-customizations/theme/shortcodes/table/includes/fw-option-type-table-builder/class-fw-option-type-table-builder.php#L13
38
- * is located in the theme and will remain there forever because the theme is not affected by the framework update
39
- */
40
- $this->_render($id, $option, $data);
41
  }
42
 
43
  /**
14
  /**
15
  * Overwrite this method to enqueue scripts and styles
16
  *
 
 
17
  * This method would be abstract but was added after the framework release,
18
  * and to prevent fatal errors from new option types created by users we can't make it abstract.
19
  *
26
  */
27
  protected function _enqueue_static($id, $option, $data)
28
  {
 
 
 
 
 
 
 
 
 
 
29
  }
30
 
31
  /**
framework/helpers/class-fw-wp-filesystem.php CHANGED
@@ -12,7 +12,7 @@ class FW_WP_Filesystem
12
  * false - if user submitted wrong credentials
13
  * true - if we have filesystem access
14
  */
15
- final public static function request_access($context, $url, $extra_fields = array())
16
  {
17
  /** @var WP_Filesystem_Base $wp_filesystem */
18
  global $wp_filesystem;
@@ -22,6 +22,10 @@ class FW_WP_Filesystem
22
  return true;
23
  }
24
 
 
 
 
 
25
  if (get_filesystem_method() === 'direct') {
26
  // in case if direct access is available
27
 
12
  * false - if user submitted wrong credentials
13
  * true - if we have filesystem access
14
  */
15
+ final public static function request_access($context = null, $url = null, $extra_fields = array())
16
  {
17
  /** @var WP_Filesystem_Base $wp_filesystem */
18
  global $wp_filesystem;
22
  return true;
23
  }
24
 
25
+ if (empty($url)) {
26
+ $url = fw_current_url();
27
+ }
28
+
29
  if (get_filesystem_method() === 'direct') {
30
  // in case if direct access is available
31
 
framework/includes/option-types/background-image/static/css/styles.css CHANGED
@@ -1,14 +1,14 @@
1
  .fw-option-type-background-image .type .fw-option-type-radio div {
2
- display: inline-block;
3
- margin-left: 15px;
4
  }
5
 
6
  .fw-option-type-background-image .predefined,
7
  .fw-option-type-background-image .custom {
8
- margin-top: 15px;
9
  }
10
 
11
  .fw-option-type-background-image div.fw-option-type-radio {
12
- margin: 0 0 9px -15px;
13
- font-size: 14px;
14
  }
1
  .fw-option-type-background-image .type .fw-option-type-radio div {
2
+ display: inline-block;
3
+ margin-left: 15px;
4
  }
5
 
6
  .fw-option-type-background-image .predefined,
7
  .fw-option-type-background-image .custom {
8
+ margin-top: 15px;
9
  }
10
 
11
  .fw-option-type-background-image div.fw-option-type-radio {
12
+ margin: 0 0 9px -15px;
13
+ font-size: 14px;
14
  }
framework/includes/option-types/multi-upload/static/css/images-only.css CHANGED
@@ -1,6 +1,6 @@
1
  /* thumb */
2
  .fw-option-type-multi-upload.images-only .thumbs-container {
3
- font-size: 0;
4
  line-height: 0;
5
  }
6
  .fw-option-type-multi-upload.images-only .thumb {
@@ -41,7 +41,7 @@
41
  display: block;
42
  background-color: #fff;
43
  border-radius: 50%;
44
- z-index: 10;
45
  }
46
  .fw-option-type-multi-upload.images-only .thumb.ui-sortable-helper a {
47
  display: none;
@@ -59,7 +59,7 @@
59
 
60
  /* Option is set in right sidebar */
61
  .fw-force-xs .fw-option-type-multi-upload.images-only .thumb.no-image {
62
- display: none;
63
  }
64
 
65
  .fw-option-type-multi-upload.images-only .no-image-img {
1
  /* thumb */
2
  .fw-option-type-multi-upload.images-only .thumbs-container {
3
+ font-size: 0;
4
  line-height: 0;
5
  }
6
  .fw-option-type-multi-upload.images-only .thumb {
41
  display: block;
42
  background-color: #fff;
43
  border-radius: 50%;
44
+ z-index: 10;
45
  }
46
  .fw-option-type-multi-upload.images-only .thumb.ui-sortable-helper a {
47
  display: none;
59
 
60
  /* Option is set in right sidebar */
61
  .fw-force-xs .fw-option-type-multi-upload.images-only .thumb.no-image {
62
+ display: none;
63
  }
64
 
65
  .fw-option-type-multi-upload.images-only .no-image-img {
framework/manifest.php CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
- $manifest['version'] = '2.0.2';
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
+ $manifest['version'] = '2.1.0';
framework/static/js/fw.js CHANGED
@@ -873,7 +873,7 @@ fw.getQueryString = function(name) {
873
 
874
  // This is another fix for vertical scroll bar issue
875
  $frame.css('overflow-y', 'hidden');
876
- }
877
  });
878
 
879
  })();
873
 
874
  // This is another fix for vertical scroll bar issue
875
  $frame.css('overflow-y', 'hidden');
876
+ }
877
  });
878
 
879
  })();
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.0.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -32,7 +32,7 @@ A simple and easy way to build a powerful website.
32
 
33
  Developers can contribute to the source code on the [Unyson GitHub Repository](https://github.com/ThemeFuse/Unyson/blob/master/CONTRIBUTING.md).
34
 
35
- Translators can contribute new languages to Unyson through [Transifex](https://www.transifex.com/projects/p/unuyson/).
36
 
37
 
38
  == Installation ==
@@ -82,6 +82,10 @@ Yes; Unyson will work with any theme.
82
 
83
  == Changelog ==
84
 
 
 
 
 
85
  = 2.0.2 =
86
  * Removed the `base64` functions from the `addable-option`, `addable-box` and `addable-popup` option types
87
  * Replaced `file_get_contents()` with `include()` in `helpers/general.php`
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.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
32
 
33
  Developers can contribute to the source code on the [Unyson GitHub Repository](https://github.com/ThemeFuse/Unyson/blob/master/CONTRIBUTING.md).
34
 
35
+ Translators can contribute new languages to Unyson through [Transifex](https://www.transifex.com/projects/p/unyson/).
36
 
37
 
38
  == Installation ==
82
 
83
  == Changelog ==
84
 
85
+ = 2.1.0 =
86
+ * Moved major theme functionality from `framework-customizations/theme/` to https://github.com/ThemeFuse/Theme-Includes , because the theme must work when the plugin is not installed.
87
+ * Removed deprecated usage of the `FW_Option_Type::_render()` for enqueue scripts and style, use `FW_Option_Type::_enqueue_static()` for that
88
+
89
  = 2.0.2 =
90
  * Removed the `base64` functions from the `addable-option`, `addable-box` and `addable-popup` option types
91
  * Replaced `file_get_contents()` with `include()` in `helpers/general.php`
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.0.2
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.0
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+