Version Description
- 2012-02-25, dev time: 1 hours==
- Fix: Sortables controls had a JS conflict
- Fix: Switches & Toggles were not properly working
=
Download this release
Release Info
| Developer | aristath |
| Plugin | |
| Version | 0.6.1 |
| Comparing to | |
| See all releases | |
Code changes from version 0.6.0 to 0.6.1
- README.md +7 -4
- includes/class-kirki-scripts.php +22 -36
- includes/controls/class-kirki-customize-sortable-control.php +0 -1
- kirki.php +1 -1
- readme.txt +96 -92
README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: aristath, fovoc
|
| 3 |
Donate link: http://kirki.org
|
| 4 |
Tags: customizer
|
| 5 |
-
Requires at least:
|
| 6 |
-
Tested up to: 4.1
|
| 7 |
Stable tag: 0.6.0
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
@@ -42,8 +42,11 @@ In addition you can also automatically generate the CSS for a lot of controls an
|
|
| 42 |
Just install this plugin and activate it.
|
| 43 |
For configuration instructions please visit http://kirki.org/#configuration
|
| 44 |
|
| 45 |
-
== 0.6.
|
| 46 |
-
*
|
|
|
|
|
|
|
|
|
|
| 47 |
* Fix: Tooltips now properly working
|
| 48 |
* New: Added checkbox switches
|
| 49 |
* New: Added checkbox toggles
|
| 2 |
Contributors: aristath, fovoc
|
| 3 |
Donate link: http://kirki.org
|
| 4 |
Tags: customizer
|
| 5 |
+
Requires at least: 4.0
|
| 6 |
+
Tested up to: 4.1.1
|
| 7 |
Stable tag: 0.6.0
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 42 |
Just install this plugin and activate it.
|
| 43 |
For configuration instructions please visit http://kirki.org/#configuration
|
| 44 |
|
| 45 |
+
== 0.6.1 - 2012-02-25, dev time: 1 hours==
|
| 46 |
+
* Fix: Sortables controls had a JS conflict
|
| 47 |
+
* Fix: Switches & Toggles were not properly working
|
| 48 |
+
|
| 49 |
+
== 0.6.0 - 2012-02-25, dev time: 9 hours==
|
| 50 |
* Fix: Tooltips now properly working
|
| 51 |
* New: Added checkbox switches
|
| 52 |
* New: Added checkbox toggles
|
includes/class-kirki-scripts.php
CHANGED
|
@@ -3,7 +3,8 @@
|
|
| 3 |
class Kirki_Scripts {
|
| 4 |
|
| 5 |
function __construct() {
|
| 6 |
-
|
|
|
|
| 7 |
add_action( 'customize_controls_print_styles', array( $this, 'googlefonts' ) );
|
| 8 |
add_action( 'customize_controls_print_scripts', array( $this, 'custom_js' ), 999 );
|
| 9 |
add_action( 'customize_controls_print_styles', array( $this, 'custom_css' ), 999 );
|
|
@@ -11,15 +12,14 @@ class Kirki_Scripts {
|
|
| 11 |
add_action( 'customize_controls_print_footer_scripts', array( $this, 'postmessage' ), 21 );
|
| 12 |
|
| 13 |
add_action( 'wp_enqueue_scripts', array( $this, 'frontend_styles' ) );
|
| 14 |
-
add_action( '
|
| 15 |
-
|
| 16 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'sortable_script' ) );
|
| 17 |
}
|
| 18 |
|
| 19 |
/**
|
| 20 |
-
* Enqueue the stylesheets
|
| 21 |
*/
|
| 22 |
-
function
|
| 23 |
|
| 24 |
global $kirki;
|
| 25 |
$options = $kirki->get_config();
|
|
@@ -30,7 +30,20 @@ class Kirki_Scripts {
|
|
| 30 |
wp_enqueue_style( 'hint-css', $kirki_url . 'assets/css/hint.css', NULL, '1.3.3' );
|
| 31 |
wp_enqueue_style( 'kirki-customizer-ui', $kirki_url . 'assets/css/jquery-ui-1.10.0.custom.css', NULL, '1.10.0' );
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
wp_enqueue_script( 'serialize-js', $kirki_url . 'assets/js/serialize.js');
|
| 35 |
wp_enqueue_script( 'jquery-ui-core' );
|
| 36 |
wp_enqueue_script( 'jquery-ui-tooltip' );
|
|
@@ -86,36 +99,9 @@ class Kirki_Scripts {
|
|
| 86 |
|
| 87 |
}
|
| 88 |
|
| 89 |
-
function sortable_script() { ?>
|
| 90 |
-
<script>jQuery(document).ready(function($) {"use strict";
|
| 91 |
-
// initialize
|
| 92 |
-
$('.kirki-sortable > ul ~ input').each(function() {var value = $(this).val();
|
| 93 |
-
try { value = unserialize( value ); } catch (err) { return; }
|
| 94 |
-
var ul = $(this).siblings('ul:eq(0)');
|
| 95 |
-
ul.find('li').addClass('invisible').find('i.visibility').toggleClass('dashicons-visibility-faint');
|
| 96 |
-
$.each(value, function(i, val) { ul.find('li[data-value=' + val + ']').removeClass('invisible').find('i.visibility').toggleClass('dashicons-visibility-faint'); });
|
| 97 |
-
});
|
| 98 |
-
|
| 99 |
-
$('.kirki-sortable > ul').each(function() {
|
| 100 |
-
$(this).sortable()
|
| 101 |
-
.disableSelection()
|
| 102 |
-
.on( "sortstop", function( event, ui ) { kirkiUpdateSortable(ui.item.parent()); })
|
| 103 |
-
.find('li').each(function() { $(this).find('i.visibility').click(function() { $(this).toggleClass('dashicons-visibility-faint').parents('li:eq(0)').toggleClass('invisible'); }); })
|
| 104 |
-
.click(function() { kirkiUpdateSortable( $(this).parents('ul:eq(0)') ); })
|
| 105 |
-
});
|
| 106 |
-
});
|
| 107 |
-
|
| 108 |
-
function kirkiUpdateSortable(ul) { "use strict"; var $ = jQuery; var values = [];
|
| 109 |
-
ul.find('li').each(function() { if ( ! $(this).is('.invisible') ) { values.push( $(this).attr('data-value') ); } });
|
| 110 |
-
ul.siblings('input').eq(0).val( serialize( values ) ).trigger('change');
|
| 111 |
-
}
|
| 112 |
-
</script>
|
| 113 |
-
<?php
|
| 114 |
-
}
|
| 115 |
-
|
| 116 |
/**
|
| 117 |
-
|
| 118 |
-
|
| 119 |
public static function admin_colors() {
|
| 120 |
|
| 121 |
// Get the active admin theme
|
| 3 |
class Kirki_Scripts {
|
| 4 |
|
| 5 |
function __construct() {
|
| 6 |
+
|
| 7 |
+
add_action( 'customize_controls_print_styles', array( $this, 'styles' ) );
|
| 8 |
add_action( 'customize_controls_print_styles', array( $this, 'googlefonts' ) );
|
| 9 |
add_action( 'customize_controls_print_scripts', array( $this, 'custom_js' ), 999 );
|
| 10 |
add_action( 'customize_controls_print_styles', array( $this, 'custom_css' ), 999 );
|
| 12 |
add_action( 'customize_controls_print_footer_scripts', array( $this, 'postmessage' ), 21 );
|
| 13 |
|
| 14 |
add_action( 'wp_enqueue_scripts', array( $this, 'frontend_styles' ) );
|
| 15 |
+
add_action( 'customize_controls_enqueue_scripts', array( $this, 'scripts' ) );
|
| 16 |
+
|
|
|
|
| 17 |
}
|
| 18 |
|
| 19 |
/**
|
| 20 |
+
* Enqueue the stylesheets required.
|
| 21 |
*/
|
| 22 |
+
function styles() {
|
| 23 |
|
| 24 |
global $kirki;
|
| 25 |
$options = $kirki->get_config();
|
| 30 |
wp_enqueue_style( 'hint-css', $kirki_url . 'assets/css/hint.css', NULL, '1.3.3' );
|
| 31 |
wp_enqueue_style( 'kirki-customizer-ui', $kirki_url . 'assets/css/jquery-ui-1.10.0.custom.css', NULL, '1.10.0' );
|
| 32 |
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
/**
|
| 37 |
+
* Enqueue the scripts required.
|
| 38 |
+
*/
|
| 39 |
+
function scripts() {
|
| 40 |
+
|
| 41 |
+
global $kirki;
|
| 42 |
+
$options = $kirki->get_config();
|
| 43 |
+
|
| 44 |
+
$kirki_url = isset( $options['url_path'] ) ? $options['url_path'] : KIRKI_URL;
|
| 45 |
+
|
| 46 |
+
wp_enqueue_script( 'kirki_customizer_js', $kirki_url . 'assets/js/customizer.js', array( 'jquery', 'customize-controls' ) );
|
| 47 |
wp_enqueue_script( 'serialize-js', $kirki_url . 'assets/js/serialize.js');
|
| 48 |
wp_enqueue_script( 'jquery-ui-core' );
|
| 49 |
wp_enqueue_script( 'jquery-ui-tooltip' );
|
| 99 |
|
| 100 |
}
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
/**
|
| 103 |
+
* Get the admin color theme
|
| 104 |
+
*/
|
| 105 |
public static function admin_colors() {
|
| 106 |
|
| 107 |
// Get the active admin theme
|
includes/controls/class-kirki-customize-sortable-control.php
CHANGED
|
@@ -15,7 +15,6 @@ class Kirki_Customize_Sortable_Control extends Kirki_Customize_Control {
|
|
| 15 |
|
| 16 |
public function render_content() {
|
| 17 |
global $kirki;
|
| 18 |
-
$kirki->scripts->sortable_script();
|
| 19 |
|
| 20 |
if ( ! is_array( $this->choices ) ) {
|
| 21 |
return;
|
| 15 |
|
| 16 |
public function render_content() {
|
| 17 |
global $kirki;
|
|
|
|
| 18 |
|
| 19 |
if ( ! is_array( $this->choices ) ) {
|
| 20 |
return;
|
kirki.php
CHANGED
|
@@ -5,7 +5,7 @@ Plugin URI: http://kirki.org
|
|
| 5 |
Description: An options framework using and extending the WordPress Customizer
|
| 6 |
Author: Aristeides Stathopoulos
|
| 7 |
Author URI: http://press.codes
|
| 8 |
-
Version: 0.6.
|
| 9 |
*/
|
| 10 |
|
| 11 |
// Load Kirki_Fonts before everything else
|
| 5 |
Description: An options framework using and extending the WordPress Customizer
|
| 6 |
Author: Aristeides Stathopoulos
|
| 7 |
Author URI: http://press.codes
|
| 8 |
+
Version: 0.6.1
|
| 9 |
*/
|
| 10 |
|
| 11 |
// Load Kirki_Fonts before everything else
|
readme.txt
CHANGED
|
@@ -1,92 +1,96 @@
|
|
| 1 |
-
=== Kirki ===
|
| 2 |
-
Contributors: aristath, fovoc
|
| 3 |
-
Donate link: http://kirki.org
|
| 4 |
-
Tags: customizer
|
| 5 |
-
Requires at least: 4.0
|
| 6 |
-
Tested up to: 4.1.1
|
| 7 |
-
Stable tag: 0.6.
|
| 8 |
-
License: GPLv2 or later
|
| 9 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
-
|
| 11 |
-
Tired of all the bloated options frameworks? You can use the WordPress Customizer instead, and extend it using Kirki!
|
| 12 |
-
|
| 13 |
-
== Description ==
|
| 14 |
-
|
| 15 |
-
Kirki allows developers to add advanced controls to their customizer as well as customize the way the customizer looks and feels.
|
| 16 |
-
|
| 17 |
-
The following controls are included:
|
| 18 |
-
|
| 19 |
-
* Buttonset
|
| 20 |
-
* Checkbox
|
| 21 |
-
* Color
|
| 22 |
-
* Image
|
| 23 |
-
* Background
|
| 24 |
-
* Image Radio
|
| 25 |
-
* Multicheck
|
| 26 |
-
* Radio
|
| 27 |
-
* Select
|
| 28 |
-
* Slider
|
| 29 |
-
* Text
|
| 30 |
-
* Textarea
|
| 31 |
-
* Upload
|
| 32 |
-
* Switch
|
| 33 |
-
* Toggle
|
| 34 |
-
* Sortable
|
| 35 |
-
|
| 36 |
-
For documentation and examples on how to use these controls, please visit [kirki.org](http://kirki.org/#fields).
|
| 37 |
-
|
| 38 |
-
In addition you can also automatically generate the CSS for a lot of controls and have it added to the head of your document without writing any custom functions and code for that. [Learn more about automatic output of CSS here](http://kirki.org/#output)
|
| 39 |
-
|
| 40 |
-
== Installation ==
|
| 41 |
-
|
| 42 |
-
Just install this plugin and activate it.
|
| 43 |
-
For configuration instructions please visit http://kirki.org/#configuration
|
| 44 |
-
|
| 45 |
-
== 0.6.
|
| 46 |
-
* Fix:
|
| 47 |
-
*
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
* Fix:
|
| 51 |
-
*
|
| 52 |
-
* New:
|
| 53 |
-
*
|
| 54 |
-
* Fix:
|
| 55 |
-
*
|
| 56 |
-
*
|
| 57 |
-
* New:
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
* Fix:
|
| 61 |
-
*
|
| 62 |
-
|
| 63 |
-
== 0.5 ==
|
| 64 |
-
*
|
| 65 |
-
*
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
*
|
| 69 |
-
*
|
| 70 |
-
*
|
| 71 |
-
* New:
|
| 72 |
-
* Fix:
|
| 73 |
-
* Fix:
|
| 74 |
-
* Fix:
|
| 75 |
-
*
|
| 76 |
-
* Fix:
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
* Fix:
|
| 80 |
-
*
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
* Fix:
|
| 84 |
-
*
|
| 85 |
-
*
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
*
|
| 89 |
-
*
|
| 90 |
-
|
| 91 |
-
= 0.
|
| 92 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
=== Kirki ===
|
| 2 |
+
Contributors: aristath, fovoc
|
| 3 |
+
Donate link: http://kirki.org
|
| 4 |
+
Tags: customizer
|
| 5 |
+
Requires at least: 4.0
|
| 6 |
+
Tested up to: 4.1.1
|
| 7 |
+
Stable tag: 0.6.1
|
| 8 |
+
License: GPLv2 or later
|
| 9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
+
|
| 11 |
+
Tired of all the bloated options frameworks? You can use the WordPress Customizer instead, and extend it using Kirki!
|
| 12 |
+
|
| 13 |
+
== Description ==
|
| 14 |
+
|
| 15 |
+
Kirki allows developers to add advanced controls to their customizer as well as customize the way the customizer looks and feels.
|
| 16 |
+
|
| 17 |
+
The following controls are included:
|
| 18 |
+
|
| 19 |
+
* Buttonset
|
| 20 |
+
* Checkbox
|
| 21 |
+
* Color
|
| 22 |
+
* Image
|
| 23 |
+
* Background
|
| 24 |
+
* Image Radio
|
| 25 |
+
* Multicheck
|
| 26 |
+
* Radio
|
| 27 |
+
* Select
|
| 28 |
+
* Slider
|
| 29 |
+
* Text
|
| 30 |
+
* Textarea
|
| 31 |
+
* Upload
|
| 32 |
+
* Switch
|
| 33 |
+
* Toggle
|
| 34 |
+
* Sortable
|
| 35 |
+
|
| 36 |
+
For documentation and examples on how to use these controls, please visit [kirki.org](http://kirki.org/#fields).
|
| 37 |
+
|
| 38 |
+
In addition you can also automatically generate the CSS for a lot of controls and have it added to the head of your document without writing any custom functions and code for that. [Learn more about automatic output of CSS here](http://kirki.org/#output)
|
| 39 |
+
|
| 40 |
+
== Installation ==
|
| 41 |
+
|
| 42 |
+
Just install this plugin and activate it.
|
| 43 |
+
For configuration instructions please visit http://kirki.org/#configuration
|
| 44 |
+
|
| 45 |
+
== 0.6.1 - 2012-02-25, dev time: 1 hours==
|
| 46 |
+
* Fix: Sortables controls had a JS conflict
|
| 47 |
+
* Fix: Switches & Toggles were not properly working
|
| 48 |
+
|
| 49 |
+
== 0.6.0 - 2012-02-25, dev time: 9 hours==
|
| 50 |
+
* Fix: Tooltips now properly working
|
| 51 |
+
* New: Added checkbox switches
|
| 52 |
+
* New: Added checkbox toggles
|
| 53 |
+
* Fix: Generated CSS is not properly combined & minified
|
| 54 |
+
* Fix: Re-structuring files hierarchy
|
| 55 |
+
* Fix: Simplify the way controls are loaded
|
| 56 |
+
* New: Only load control classes when they are needed
|
| 57 |
+
* New: Introducing Kirki_Customize_Control class
|
| 58 |
+
* Fix: CSS tweaks
|
| 59 |
+
* New: Sortable control (creating one is identical to a select control, but with `'type' => 'sortable'`)
|
| 60 |
+
* Fix: Double output CSS (props @agusmu)
|
| 61 |
+
* New: Google fonts now parsed from a json file.
|
| 62 |
+
|
| 63 |
+
== 0.5.1 ==
|
| 64 |
+
* Fix: Transport defaults to refresh instead of postMessage
|
| 65 |
+
* Fix: undefined index notice.
|
| 66 |
+
|
| 67 |
+
== 0.5 ==
|
| 68 |
+
* New: Automatic output of styles for generic controls.
|
| 69 |
+
* New: Automatic output of styles + scripts for fonts (including googlefonts )
|
| 70 |
+
* New: The 'output' argument on background controls is now an array for consistency with other controls. Older syntax is still compatible though. :)
|
| 71 |
+
* New: Add the ability to auto-generate styles for colors.
|
| 72 |
+
* Fix: Add a blank stylesheet if we need one and no stylesheet_id has been defined in the config options.
|
| 73 |
+
* Fix: CSS-only tooltips. Fixes issue with tooltips now showing up on WP >= 4.1
|
| 74 |
+
* Fix: Code cleanups
|
| 75 |
+
* New: Added support for WordPress's transport arguments
|
| 76 |
+
* Fix: All controls now have a sanitization callback. Users can override the default sanitizations by adding their own 'sanitize_callback' argument.
|
| 77 |
+
* Fix: OOP rewrite
|
| 78 |
+
* Fix: Strip protocol from Google API link
|
| 79 |
+
* Fix: Loading order for some files
|
| 80 |
+
* Fix: Removed deprecated less_var argument
|
| 81 |
+
|
| 82 |
+
= 0.4 =
|
| 83 |
+
* Fix: bugfix for selector
|
| 84 |
+
* New: Change the Kirki theme based on which admin theme is selected.
|
| 85 |
+
* Fix: Tranlsation domain issue
|
| 86 |
+
* New: Added a "group_title" control
|
| 87 |
+
* Fix: Updated the required script
|
| 88 |
+
* Fix: Updating CSS
|
| 89 |
+
* Other minor improvements and bugfixes
|
| 90 |
+
|
| 91 |
+
= 0.3 =
|
| 92 |
+
* new: added background field
|
| 93 |
+
* new: added 'output' argument to directly output the CSS
|
| 94 |
+
|
| 95 |
+
= 0.2 =
|
| 96 |
+
* Initial version
|
