To check if the control has any potential tabs and headers, added:
* WP_Customize_Image_Control->prepare_control()
* WP_Customize_Header_Image_Control->prepare_control()
* WP_Customize_Header_Image_Control->default_headers
* WP_Customize_Header_Image_Control->uploaded_headers
git-svn-id: https://develop.svn.wordpress.org/trunk@21383 602fd350-edb4-49c9-b593-d223f7449a82
* Handle all set/get of header theme mod through these methods.
* Use these methods in the customizer.
Props kovshenin, nacin, SergeyBiryukov, koopersmith.
fixes#20871
git-svn-id: https://develop.svn.wordpress.org/trunk@21037 602fd350-edb4-49c9-b593-d223f7449a82
Also fixes uploader UIs on iOS and Kindle Fire by improving wp.Uploader.
Adds mobile viewport specifications.
Moves scrollbar back to fixed positioning.
git-svn-id: https://develop.svn.wordpress.org/trunk@21014 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20936 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20928 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20912 602fd350-edb4-49c9-b593-d223f7449a82
Move the color control from the switch statement to WP_Customize_Color_Control.
Markup improvements.
git-svn-id: https://develop.svn.wordpress.org/trunk@20598 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20545 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20319 602fd350-edb4-49c9-b593-d223f7449a82
This both better conforms to the CSS spec and prevents bugs from occurring in JavaScript selector engines.
git-svn-id: https://develop.svn.wordpress.org/trunk@20299 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20295 602fd350-edb4-49c9-b593-d223f7449a82