Skip to content

Commit

Permalink
Merge pull request #748 from aristath/develop
Browse files Browse the repository at this point in the history
2.2.4
  • Loading branch information
aristath committed Mar 20, 2016
2 parents 9795801 + bf560cf commit b264549
Show file tree
Hide file tree
Showing 27 changed files with 729 additions and 126 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Donate link:** http://kirki.org/
**Requires at least:** 4.4
**Tested up to:** 4.5
**Stable tag:** 2.2.3
**Stable tag:** 2.2.4
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -37,6 +37,16 @@ If you want to integrate Kirki in your theme or plugin, please read the instruct

## Changelog ##

### 2.2.4 ###

March 20, 2016, dev time: 6 hours

* FIX: Removed unnecessary CSS echoed by the `typography` control
* FIX: Color Calculation class improvements
* FIX: CSS improvement for `toggle` controls
* NEW: Added `dashicons` field
* NEW: Added the ability to limit the number of rows in `repeater` controls (props @fovoc)

### 2.2.3 ###

March 19, 2016
Expand Down
31 changes: 28 additions & 3 deletions assets/css/customizer.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions assets/css/customizer.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/customizer.min.css

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions assets/js/controls/dashicons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* KIRKI CONTROL: RADIO-IMAGE
*/
wp.customize.controlConstructor['dashicons'] = wp.customize.Control.extend( {
ready: function() {
var control = this;
this.container.on( 'click', 'input', function() {
control.setting.set( jQuery( this ).val() );
});
}
});
11 changes: 11 additions & 0 deletions assets/js/customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ wp.customize.controlConstructor['color-alpha'] = wp.customize.Control.extend( {
});
}
});
/**
* KIRKI CONTROL: RADIO-IMAGE
*/
wp.customize.controlConstructor['dashicons'] = wp.customize.Control.extend( {
ready: function() {
var control = this;
this.container.on( 'click', 'input', function() {
control.setting.set( jQuery( this ).val() );
});
}
});
/**
* KIRKI CONTROL: DIMENSION
*/
Expand Down
2 changes: 1 addition & 1 deletion assets/js/customizer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/customizer.min.js.map

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions assets/scss/controls/dashicons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/////////////////////
// dashicons controls
/////////////////////
.customize-control-dashicons {
label {
position: relative;
display: inline-block;
}
.icons-wrapper {
max-height: 300px;
overflow-y: scroll;
h4 {
font-weight: 300;
margin: .7em 0;
}
.dashicons {
padding: 3px;
font-size: 25px;
width: 25px;
height: 25px;
border: 1px solid transparent;
}
input {
display: none;
&:checked {
+ label {
.dashicons {
border: 1px solid #3498DB;
color: #000;
}
}
}
}
}
}
19 changes: 14 additions & 5 deletions assets/scss/controls/toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
// toggle controls
/////////////////////
.customize-control-toggle {

label {
display: flex;
flex-wrap: wrap;

.customize-control-title {
width: calc(100% - 55px);
}

.description {
order: 99;
}

}
input[type="checkbox"] {
display: none;
}
Expand Down Expand Up @@ -62,9 +76,4 @@
}
}
}

.no-description .customize-control-title {
width: calc(100% - 50px);
float: left;
}
}
1 change: 1 addition & 0 deletions assets/scss/customizer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

@import "controls/checkbox";
@import "controls/code";
@import "controls/dashicons";
@import "controls/dimension";
@import "controls/number";
@import "controls/palette";
Expand Down
1 change: 1 addition & 0 deletions includes/class-kirki-control.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ final private function set_control_types() {
'code' => 'Kirki_Controls_Code_Control',
'color-alpha' => 'Kirki_Controls_Color_Alpha_Control',
'custom' => 'Kirki_Controls_Custom_Control',
'dashicons' => 'Kirki_Controls_Dashicons_Control',
'dimension' => 'Kirki_Controls_Dimension_Control',
'editor' => 'Kirki_Controls_Editor_Control',
'multicheck' => 'Kirki_Controls_MultiCheck_Control',
Expand Down
Loading

0 comments on commit b264549

Please sign in to comment.