From a74960dc5c93a9cdf3a966b6559b476aae74f3e9 Mon Sep 17 00:00:00 2001 From: Benjamin Intal Date: Wed, 14 Jan 2015 21:22:17 +0800 Subject: [PATCH] Added `unit` param in Customizer number option --- class-option-number.php | 3 +++ css/admin-theme-customizer-styles.css | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/class-option-number.php b/class-option-number.php index d1bddeb4..a2ab80b2 100644 --- a/class-option-number.php +++ b/class-option-number.php @@ -168,6 +168,7 @@ public function registerCustomizerControl( $wp_customize, $section, $priority = 'min' => $this->settings['min'], 'max' => $this->settings['max'], 'step' => $this->settings['step'], + 'unit' => $this->settings['unit'], ) ) ); } } @@ -193,6 +194,7 @@ class TitanFrameworkOptionNumberControl extends WP_Customize_Control { public $min; public $max; public $step; + public $unit; private static $firstLoad = true; @@ -208,6 +210,7 @@ public function render_content() { label ); ?> link(); ?> /> + unit ) ?> description ) ) { diff --git a/css/admin-theme-customizer-styles.css b/css/admin-theme-customizer-styles.css index 0f15ad7b..58744e6f 100644 --- a/css/admin-theme-customizer-styles.css +++ b/css/admin-theme-customizer-styles.css @@ -129,7 +129,7 @@ border: 1px solid #ddd; border-radius: 3px; height: 15px; - width: 150px; + width: 120px; display: inline-block; vertical-align: middle; margin: 15px 15px 15px 0;