Adds WP_Customize_Setting->sanitize_js_callback and 'customize_sanitize_js_$settingID' filter, to filter values before they're passed to JS using WP_Customize_Setting->js_value().
Adds support for regular hex colors to the color picker.
Changes color methods:
* sanitize_hex_color() accepts 3 and 6 digit hex colors (with hashes) and the empty string.
* sanitize_hex_color_no_hash() accepts 3 and 6 digit hex colors (without hashes) and the empty string.
* maybe_hash_hex_color() ensures that a hex color has a hash, and otherwise leaves the value untouched.
git-svn-id: http://core.svn.wordpress.org/trunk@20936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Bind drag/drop support checks to individual plupload instances.
Add drag-over classes to wp.Uploader and corresponding styles to customize image controls.
git-svn-id: http://core.svn.wordpress.org/trunk@20928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Now that sections are organized in accordions, group items by size and usage.
Move header/background controls into colors, header image, background image, and title/tagline sections.
git-svn-id: http://core.svn.wordpress.org/trunk@20912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Move the color control from the switch statement to WP_Customize_Color_Control.
Markup improvements.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Overhauled image pickers:
* Add support for drag and drop uploads to image controls.
* Improve the 'uploaded' tab in image controls: automatically add images uploaded during the current session, hide the tab when no uploaded images exist.
* Move the header image control to the WP_Customize_Header_Image_Control class. Remove wp_customize_print_uploaded_headers() and wp_customize_print_uploaded_headers() functions.
* Abstract the dropdown functionality from the color picker to the .dropdown class.
* In wp.Uploader, unset element keys if passed an empty jQuery collection.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Instead of grouping together every control parameter into a single array and passing them all to the JS, use subclasses with custom parameters to implement additional PHP functionality and the parameter to send only the necessary variables to the JavaScript control.
Replaces WP_Customize_Control->control_params with WP_Customize_Control->json and WP_Customize_Control->to_json(). The to_json() method refreshes the json array passed to the JavaScript control (set to control.param by default).
Creates WP_Customize_Upload_Control and WP_Customize_Image_Control.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This both better conforms to the CSS spec and prevents bugs from occurring in JavaScript selector engines.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Many-to-many mapping between settings and controls.
* Settings and controls have been separated in both the PHP (WP_Customize_Setting, WP_Customize_Control) and the JS (wp.customize.Setting, wp.customize.Control).
* While most settings are tied to a single control, some require multiple controls. The 'header_textcolor' control is a good example: to hide the header text, header_textcolor is set to 'blank'.
Add 'Display Header Text' control.
A handful of miscellaneous bugfixes along the way.
Notes:
* Controls should be separated out a bit more; juggling type-specific arguments in the switch statement is rather inelegant.
* Page dropdowns are currently inactive and need to be re-linked.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20295 1a063a9b-81f0-0310-95a4-ce76da25c4cd