Version Description
- Fixed #539
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.2.10 |
Comparing to | |
See all releases |
Code changes from version 2.2.9 to 2.2.10
- .travis.yml +25 -0
- README.md +2 -0
- framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php +5 -6
- framework/includes/option-types/typography/class-fw-option-type-typography.php +2 -2
- framework/manifest.php +1 -1
- readme.txt +4 -1
- tests/unit/bootstrap.php +7 -0
- tests/unit/main.php +20 -0
- tests/unit/phpunit.xml +7 -0
- unyson.php +1 -1
.travis.yml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
language: php
|
2 |
+
|
3 |
+
php:
|
4 |
+
- 5.2
|
5 |
+
- 5.3
|
6 |
+
- 5.4
|
7 |
+
|
8 |
+
env:
|
9 |
+
- WP_VERSION=4.0.5
|
10 |
+
- WP_VERSION=4.1.5
|
11 |
+
- WP_VERSION=4.2.2
|
12 |
+
|
13 |
+
before_script:
|
14 |
+
- wget https://raw.github.com/wp-cli/sample-plugin/master/bin/install-wp-tests.sh
|
15 |
+
- export WP_TESTS_DIR=wordpress
|
16 |
+
- bash install-wp-tests.sh wordpress root '' localhost $WP_VERSION
|
17 |
+
- cd wordpress
|
18 |
+
|
19 |
+
script:
|
20 |
+
- phpunit -c ../tests/unit/ --exclude-group invalid
|
21 |
+
|
22 |
+
notifications:
|
23 |
+
email:
|
24 |
+
on_success: never
|
25 |
+
on_failure: always
|
README.md
CHANGED
@@ -8,6 +8,8 @@ To get started, check out the [Scratch Theme](https://github.com/ThemeFuse/Scrat
|
|
8 |
|
9 |
If you are not a developer, please use the [Unyson plugin page](https://wordpress.org/plugins/unyson/) on WordPress.org.
|
10 |
|
|
|
|
|
11 |
## Table of contents
|
12 |
|
13 |
* [Installation](#installation)
|
8 |
|
9 |
If you are not a developer, please use the [Unyson plugin page](https://wordpress.org/plugins/unyson/) on WordPress.org.
|
10 |
|
11 |
+
[![Build Status](https://travis-ci.org/ThemeFuse/Unyson.svg?branch=master)](https://travis-ci.org/ThemeFuse/Unyson)
|
12 |
+
|
13 |
## Table of contents
|
14 |
|
15 |
* [Installation](#installation)
|
framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php
CHANGED
@@ -93,8 +93,8 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
93 |
"SELECT ID val, post_title title " .
|
94 |
"FROM $wpdb->posts " .
|
95 |
"WHERE post_title LIKE %s " .
|
96 |
-
"AND post_status
|
97 |
-
"AND NULLIF(post_password, '') IS NULL " .
|
98 |
"AND post_type IN ( " .
|
99 |
implode( ', ', array_fill( 1, count( $names ), '%s' ) ) .
|
100 |
" ) " .
|
@@ -228,7 +228,8 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
228 |
$posts = $wpdb->get_results(
|
229 |
"SELECT posts.ID, posts.post_title " .
|
230 |
"FROM $wpdb->posts as posts " .
|
231 |
-
"WHERE post_type IN ('" . implode( "', ", $source ) . "') " .
|
|
|
232 |
"ORDER BY post_date DESC LIMIT $number"
|
233 |
);
|
234 |
|
@@ -248,8 +249,6 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
248 |
}
|
249 |
$ids = implode( ', ', array_unique( $ids ) );
|
250 |
|
251 |
-
//$query = new WP_Query( array( 'post__in' => $ids ) );
|
252 |
-
|
253 |
$query = $wpdb->get_results(
|
254 |
"SELECT posts.ID, posts.post_title " .
|
255 |
"FROM $wpdb->posts as posts " .
|
@@ -470,7 +469,7 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
470 |
foreach ( $array as $key => $item ) {
|
471 |
$return[] = array(
|
472 |
'val' => $key,
|
473 |
-
'title' => $item,
|
474 |
);
|
475 |
}
|
476 |
|
93 |
"SELECT ID val, post_title title " .
|
94 |
"FROM $wpdb->posts " .
|
95 |
"WHERE post_title LIKE %s " .
|
96 |
+
"AND post_status IN ( 'publish', 'private' ) " .
|
97 |
+
//"AND NULLIF(post_password, '') IS NULL " . todo: review
|
98 |
"AND post_type IN ( " .
|
99 |
implode( ', ', array_fill( 1, count( $names ), '%s' ) ) .
|
100 |
" ) " .
|
228 |
$posts = $wpdb->get_results(
|
229 |
"SELECT posts.ID, posts.post_title " .
|
230 |
"FROM $wpdb->posts as posts " .
|
231 |
+
"WHERE post_type IN ('" . implode( "', '", $source ) . "') " .
|
232 |
+
"AND post_status IN ( 'publish', 'private' ) " .
|
233 |
"ORDER BY post_date DESC LIMIT $number"
|
234 |
);
|
235 |
|
249 |
}
|
250 |
$ids = implode( ', ', array_unique( $ids ) );
|
251 |
|
|
|
|
|
252 |
$query = $wpdb->get_results(
|
253 |
"SELECT posts.ID, posts.post_title " .
|
254 |
"FROM $wpdb->posts as posts " .
|
469 |
foreach ( $array as $key => $item ) {
|
470 |
$return[] = array(
|
471 |
'val' => $key,
|
472 |
+
'title' => ( $item ) ? $item : $key . ' (' . __( 'No title', 'fw' ) . ')',
|
473 |
);
|
474 |
}
|
475 |
|
framework/includes/option-types/typography/class-fw-option-type-typography.php
CHANGED
@@ -107,7 +107,7 @@ class FW_Option_Type_Typography extends FW_Option_Type
|
|
107 |
$values = array(
|
108 |
'size' => ( ! empty( $components['size'] ) ) ? ( isset( $input_value['size'] ) ) ? intval( $input_value['size'] ) : intval( $option['value']['size'] ) : false,
|
109 |
'family' => ( ! empty( $components['family'] ) ) ? ( isset( $input_value['family'] ) ) ? $input_value['family'] : $option['value']['family'] : false,
|
110 |
-
'style' => ( ! empty( $components['
|
111 |
'color' => ( ! empty( $components['color'] ) ) ? ( isset( $input_value['color'] ) && preg_match( '/^#[a-f0-9]{6}$/i', $input_value['color'] ) ) ? $input_value['color'] : $option['value']['color'] : false,
|
112 |
);
|
113 |
|
@@ -140,4 +140,4 @@ class FW_Option_Type_Typography extends FW_Option_Type
|
|
140 |
}
|
141 |
}
|
142 |
|
143 |
-
FW_Option_Type::register('FW_Option_Type_Typography');
|
107 |
$values = array(
|
108 |
'size' => ( ! empty( $components['size'] ) ) ? ( isset( $input_value['size'] ) ) ? intval( $input_value['size'] ) : intval( $option['value']['size'] ) : false,
|
109 |
'family' => ( ! empty( $components['family'] ) ) ? ( isset( $input_value['family'] ) ) ? $input_value['family'] : $option['value']['family'] : false,
|
110 |
+
'style' => ( ! empty( $components['family'] ) ) ? ( isset( $input_value['style'] ) ) ? $input_value['style'] : $option['value']['style'] : false,
|
111 |
'color' => ( ! empty( $components['color'] ) ) ? ( isset( $input_value['color'] ) && preg_match( '/^#[a-f0-9]{6}$/i', $input_value['color'] ) ) ? $input_value['color'] : $option['value']['color'] : false,
|
112 |
);
|
113 |
|
140 |
}
|
141 |
}
|
142 |
|
143 |
+
FW_Option_Type::register('FW_Option_Type_Typography');
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.2.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.2.10';
|
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, framework
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.2
|
6 |
-
Stable tag: 2.2.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -86,6 +86,9 @@ Yes; Unyson will work with any theme.
|
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
89 |
= 2.2.9 =
|
90 |
* Fixed [#530](https://github.com/ThemeFuse/Unyson/issues/530), [#529](https://github.com/ThemeFuse/Unyson/issues/529), [#502](https://github.com/ThemeFuse/Unyson/issues/502)
|
91 |
* Fixes for [#520](https://github.com/ThemeFuse/Unyson/issues/520)
|
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, framework
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.2
|
6 |
+
Stable tag: 2.2.10
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 2.2.10 =
|
90 |
+
* Fixed [#539](https://github.com/ThemeFuse/Unyson/issues/539)
|
91 |
+
|
92 |
= 2.2.9 =
|
93 |
* Fixed [#530](https://github.com/ThemeFuse/Unyson/issues/530), [#529](https://github.com/ThemeFuse/Unyson/issues/529), [#502](https://github.com/ThemeFuse/Unyson/issues/502)
|
94 |
* Fixes for [#520](https://github.com/ThemeFuse/Unyson/issues/520)
|
tests/unit/bootstrap.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require 'includes/bootstrap.php';
|
4 |
+
|
5 |
+
define( 'FW_DOING_TESTS', true );
|
6 |
+
|
7 |
+
require dirname( __FILE__ ) . '/../../unyson.php';
|
tests/unit/main.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Tests_Unyson_Main extends WP_UnitTestCase {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Activate the plugin, mock all the things
|
7 |
+
*/
|
8 |
+
public function setUp() {
|
9 |
+
parent::setUp();
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Start the framework
|
13 |
+
*/
|
14 |
+
_action_init_framework();
|
15 |
+
}
|
16 |
+
|
17 |
+
public function test_helpers_existence() {
|
18 |
+
$this->assertTrue(function_exists('fw_print'));
|
19 |
+
}
|
20 |
+
}
|
tests/unit/phpunit.xml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<phpunit bootstrap="bootstrap.php" colors="true">
|
2 |
+
<testsuites>
|
3 |
+
<testsuite>
|
4 |
+
<directory suffix=".php">.</directory>
|
5 |
+
</testsuite>
|
6 |
+
</testsuites>
|
7 |
+
</phpunit>
|
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.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.2.10
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|