Commit Graph

63 Commits

Author SHA1 Message Date
Scott Taylor
303d01869c Declare the $uploaded_headers and $default_headers properties for WP_Customize_Header_Image_Control.
See #30224.

Built from https://develop.svn.wordpress.org/trunk@30172


git-svn-id: http://core.svn.wordpress.org/trunk@30172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-01 23:18:23 +00:00
Dominik Schilling
3c962ee5d8 Improve/introduce Customizer JavaScript models for Controls, Sections, and Panels.
* Introduce models for panels and sections.
* Introduce API to expand and focus a control, section or panel.
* Allow deep-linking to panels, sections, and controls inside of the Customizer.
* Clean up `accordion.js`, removing all Customizer-specific logic.
* Add initial unit tests for `wp.customize.Class` in `customize-base.js`.

https://make.wordpress.org/core/2014/10/27/toward-a-complete-javascript-api-for-the-customizer/ provides an overview of how to use the JavaScript API.

props westonruter, celloexpressions, ryankienstra.
see #28032, #28579, #28580, #28650, #28709, #29758.
fixes #29529.


Built from https://develop.svn.wordpress.org/trunk@30102


git-svn-id: http://core.svn.wordpress.org/trunk@30102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-29 22:51:22 +00:00
John Blackbourn
d70744e95c Correct some logic to populate the defaultValue variable when data.defaultValue begins with a hash symbol.
Props antpb
Fixes #30125

Built from https://develop.svn.wordpress.org/trunk@30087


git-svn-id: http://core.svn.wordpress.org/trunk@30087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-29 02:43:22 +00:00
John Blackbourn
905b6a9d67 Add the ability for a customizer control to render its controls via a JavaScript template. Switches the default color picker control to a JavaScript template. See #29572. Props celloexpressions
Built from https://develop.svn.wordpress.org/trunk@30014


git-svn-id: http://core.svn.wordpress.org/trunk@30014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-24 16:32:18 +00:00
Dominik Schilling
61819a36ea Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific.
Also capitalize "Customizer".
See also https://make.wordpress.org/core/2014/07/08/customizer-improvements-in-4-0/.

props studionashvegas, tareq1988.
fixes #29947.
Built from https://develop.svn.wordpress.org/trunk@29903


git-svn-id: http://core.svn.wordpress.org/trunk@29658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 17:21:19 +00:00
Sergey Biryukov
1eb26d3ff3 Use https for apps.wordpress.org links.
props pento.
fixes #29595 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29721


git-svn-id: http://core.svn.wordpress.org/trunk@29495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-09 06:29:15 +00:00
Andrew Nacin
00fac0639d Link to apps.wordpress.org instead of wordpress.org/mobile.
props pento.
fixes #29496.

Built from https://develop.svn.wordpress.org/trunk@29703


git-svn-id: http://core.svn.wordpress.org/trunk@29477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-04 14:22:15 +00:00
Drew Jaynes
7b85adf989 Inline documentation cleanup for 4.0 audit.
phpDoc tweaks for methods, properties, and filters added in [29051]:
* `WP_Customize_Control->$active_callback` property
* `WP_Customize_Control::active()` method
* `WP_Customize_Control::active_callback()` method
* `WP_Widget_Area_Customize_Control::active_callback()` method
* `WP_Widget_Form_Customize_Control::active_callback()` method
* 'customize_control_active' filter

Added in [28930]:
* `WP_Customize_Control::input_attrs()` method

See #27993 and #28885.

Built from https://develop.svn.wordpress.org/trunk@29156


git-svn-id: http://core.svn.wordpress.org/trunk@28940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-14 00:32:16 +00:00
Sergey Biryukov
ad7bc20cb1 Customizer: Introduce WP_Customize_Control::active() method to determine whether the control is relevant to the current context (i.e. to the current URL being previewed).
Control can indicate its active state by a subclass overriding the 'active_callback' method, by supplying a callable 'active_callback' argument into the control's constructor, or by filtering 'customize_control_active'.

props westonruter.
see #27993.
Built from https://develop.svn.wordpress.org/trunk@29051


git-svn-id: http://core.svn.wordpress.org/trunk@28839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-09 23:58:16 +00:00
Helen Hou-Sandí
fee65bacd7 Don't escape customizer control descriptions, just as section descriptions are not escaped. These are set programmatically, not via user input. props tollmanz. fixes #27981.
Built from https://develop.svn.wordpress.org/trunk@28980


git-svn-id: http://core.svn.wordpress.org/trunk@28769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 20:11:15 +00:00
Dominik Schilling
958ab24709 Customizer: Support textarea and commonly-used input types as control type in WP_Customize_Control.
Add `input_attrs` property to support custom input attributes.

(Demo plugin attached to ticket.)

props celloexpressions.
fixes #28477.
Built from https://develop.svn.wordpress.org/trunk@28930


git-svn-id: http://core.svn.wordpress.org/trunk@28728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 19:48:13 +00:00
Helen Hou-Sandí
e1db9240b7 Support descriptions for individual customizer controls.
* Control title (label) markup will also only be output if specified.
* Control section descriptions are no longer italicized for visual hierarchy / differentiation.

props celloexpressions. fixes #27981.

Built from https://develop.svn.wordpress.org/trunk@28927


git-svn-id: http://core.svn.wordpress.org/trunk@28725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 15:55:17 +00:00
Scott Taylor
3c209b6f56 Add missing access modifiers to methods/members in WP_Customize_*.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28509


git-svn-id: http://core.svn.wordpress.org/trunk@28335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:45:16 +00:00
Andrew Nacin
ea8635a465 Customizer: Correct reference to the 'Add new image' button.
props jjeaton.
see #27890, for trunk.

Built from https://develop.svn.wordpress.org/trunk@28170


git-svn-id: http://core.svn.wordpress.org/trunk@28001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-19 19:45:14 +00:00
Andrew Nacin
eb54438f17 Translate custom header customize control strings. Remove final added before beta to see what breakage we might cause by refactoring this class.
see #21785. fixes #27738.

Built from https://develop.svn.wordpress.org/trunk@28082


git-svn-id: http://core.svn.wordpress.org/trunk@27913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-11 23:25:16 +00:00
Dominik Schilling
fabc65b787 Widget Customizer: Move WidgetCustomizer to wp.customize.Widgets. First pass.
see #27690.
Built from https://develop.svn.wordpress.org/trunk@27985


git-svn-id: http://core.svn.wordpress.org/trunk@27815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 09:04:14 +00:00
Dominik Schilling
ed8132dedd Header images: Revert unnecessary tabindex="0" from [27947].
see #21785.
Built from https://develop.svn.wordpress.org/trunk@27971


git-svn-id: http://core.svn.wordpress.org/trunk@27801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-06 19:36:15 +00:00
Dominik Schilling
5f1c818477 Header images: Improve accessibility of Randomize buttons.
props ehg.
see #27598, #21785.
Built from https://develop.svn.wordpress.org/trunk@27970


git-svn-id: http://core.svn.wordpress.org/trunk@27800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-06 19:28:16 +00:00
Andrew Nacin
27c422364c Header images: Accessibility and style improvements. Headers no longer jump around when chosen.
props mcsf, ehg.
see #21785.

Built from https://develop.svn.wordpress.org/trunk@27947


git-svn-id: http://core.svn.wordpress.org/trunk@27777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-04 15:49:15 +00:00
Andrew Nacin
522d984a8d Add missing space between strings.
props rachelbaker.
fixes #27597.

Built from https://develop.svn.wordpress.org/trunk@27945


git-svn-id: http://core.svn.wordpress.org/trunk@27775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-04 13:17:15 +00:00
Andrew Nacin
f320b43587 Custom Headers: Simplify and consolidate the querying of custom headers for the customizer.
props mcsf.
see #21785.

Built from https://develop.svn.wordpress.org/trunk@27849


git-svn-id: http://core.svn.wordpress.org/trunk@27680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 10:53:15 +00:00
Dominik Schilling
c707faa639 Widget Customizer: Convert static WP_Customize_Widgets class into instantiated class and merge Options_Transaction into WP_Customize_Widgets.
see #27504.
props westonruter.

Built from https://develop.svn.wordpress.org/trunk@27816


git-svn-id: http://core.svn.wordpress.org/trunk@27650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 14:07:14 +00:00
Andrew Nacin
5e526b9a94 Use dashicons in header images in the customizer.
props mcsf.
see #21785.

Built from https://develop.svn.wordpress.org/trunk@27722


git-svn-id: http://core.svn.wordpress.org/trunk@27559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-25 19:51:15 +00:00
Andrew Nacin
b933f954e3 Customizer header images: Fix randomizing headers.
props mcsf.
see #21785.

Built from https://develop.svn.wordpress.org/trunk@27688


git-svn-id: http://core.svn.wordpress.org/trunk@27527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 19:16:14 +00:00
Andrew Nacin
deb8779af5 More translation cleanups.
Affects widgets (see #27112), custom headers (see #21785), theme installer (see #27055, reverts [27614]), and some media stuff. Untranslates some complicated strings that need additional study.

see #27453.

Built from https://develop.svn.wordpress.org/trunk@27620


git-svn-id: http://core.svn.wordpress.org/trunk@27463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 08:18:14 +00:00
Andrew Nacin
a589d9d757 Add header image uploads with cropping to the customizer.
props mcsf, ehg, gcorne.
see #21785.

Built from https://develop.svn.wordpress.org/trunk@27497


git-svn-id: http://core.svn.wordpress.org/trunk@27339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-11 04:13:16 +00:00
Drew Jaynes
277d715d9e Inline documentation for hooks in wp-includes/class-wp-customize-control.php.
Fixes #27294.

Built from https://develop.svn.wordpress.org/trunk@27431


git-svn-id: http://core.svn.wordpress.org/trunk@27278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 13:51:14 +00:00
Andrew Nacin
e853a9cc57 Add widget management to the customizer.
This brings in the Widget Customizer plugin: https://wordpress.org/plugins/widget-customizer/.

props westonruter, shaunandrews, michael-arestad, johnregan3, akeda, topher1kenobe, topquarky, bobbravo2, ricardocorreia. And for good measure, props westonruter.
see #27112.

Built from https://develop.svn.wordpress.org/trunk@27419


git-svn-id: http://core.svn.wordpress.org/trunk@27266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 20:41:14 +00:00
Andrew Nacin
f31ac162f5 Update the Customizer API inline docs.
props ericlewis.
fixes #27065.

Built from https://develop.svn.wordpress.org/trunk@27398


git-svn-id: http://core.svn.wordpress.org/trunk@27246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-04 20:21:14 +00:00
Andrew Nacin
0c16c0477b Reference https://wordpress.org rather than http://wordpress.org in strings, links, comments, etc.
props Ipstenu, markjaquith.
see #27115.

Built from https://develop.svn.wordpress.org/trunk@27369


git-svn-id: http://core.svn.wordpress.org/trunk@27219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 02:34:27 +00:00
Andrew Nacin
797ee34bc3 Remove /extend/ from URLs to wordpress.org/plugins, /themes, and /mobile, as those are all now top-level. see #24389.
git-svn-id: http://core.svn.wordpress.org/trunk@24320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-22 21:01:57 +00:00
Sergey Biryukov
6f2d7d1d3b Add missing semicolon. props jcastaneda. fixes #24282.
git-svn-id: http://core.svn.wordpress.org/trunk@24200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 18:15:14 +00:00
Andrew Nacin
1429581c94 Customizer uploader control: Pass arrays of extensions around instead. see #22149.
git-svn-id: http://core.svn.wordpress.org/trunk@22519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 04:59:46 +00:00
Daryl Koopersmith
44314b715c Customizer: Restrict image control uploaders to only allow image file types. see #22149.
git-svn-id: http://core.svn.wordpress.org/trunk@22492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 05:47:02 +00:00
Andrew Nacin
abe7ee8ec8 Keyboard accessibility for the theme customizer. props lessbloat, jorbin, JustinSainton. fixes #21283.
git-svn-id: http://core.svn.wordpress.org/trunk@22400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 14:47:25 +00:00
Andrew Nacin
0b6cf76853 New color picker, props mattwiebe. see #21206.
Replaces Farbtastic. May change further in response to user testing.



git-svn-id: http://core.svn.wordpress.org/trunk@22030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 01:57:38 +00:00
Ryan Boren
1fd3c5471e Avoid fatal error in the customizer when the current theme doesn't support custom headers. Props c3mdigital. fixes #21515
git-svn-id: http://core.svn.wordpress.org/trunk@21497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-10 20:15:06 +00:00
koopersmith
29f2b5b903 Fix @since blocks... since we already released 3.4.1. see #21355.
git-svn-id: http://core.svn.wordpress.org/trunk@21386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-01 07:20:44 +00:00
koopersmith
eb7e421d69 Add @since documentation, see #21355.
git-svn-id: http://core.svn.wordpress.org/trunk@21385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-01 07:01:08 +00:00
koopersmith
86b352faea Remove the ability to upload custom headers in the customizer. Properly handle selecting the correct first tab, and removing the control/section if no tabs exist. see #21355.
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: http://core.svn.wordpress.org/trunk@21383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-01 06:45:54 +00:00
koopersmith
21d1ea5f85 Pinking shears.
git-svn-id: http://core.svn.wordpress.org/trunk@21381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-01 02:30:02 +00:00
ryan
564a7db2cb phpdoc for Customizer classes and methods. Props bananastalktome. see #21303
git-svn-id: http://core.svn.wordpress.org/trunk@21354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-26 21:45:33 +00:00
ryan
808ce796ae * Introduce remove_header_image(), reset_header_image(), set_header_image(), and get_header_image_data() for Custom_Image_Header.
* 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: http://core.svn.wordpress.org/trunk@21037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-10 00:32:19 +00:00
koopersmith
14f04132af Theme Customizer: Fix scrolling on iOS and Kindle Fire. props azaozz, helenyhou. fixes #20805.
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: http://core.svn.wordpress.org/trunk@21014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-06 21:45:17 +00:00
koopersmith
0df3218cc2 Theme Customizer: Ensure that JS color controls always use real color values, even if the server-side value is a hex value without a hash. fixes #20448, see #19910.
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
2012-05-26 18:44:31 +00:00
koopersmith
20f804ab8f Theme Customizer: Fix IE8 drag/drop uploader incompatibility. see #20582, #19910.
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
2012-05-26 05:55:40 +00:00
koopersmith
beb401b533 Theme Customizer: Improve background image control, add correct meta key to custom headers and backgrounds uploaded using the customizer. see #19910.
git-svn-id: http://core.svn.wordpress.org/trunk@20913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-25 20:26:25 +00:00
koopersmith
9a3b25de9d Theme Customizer: Section reorganization. see #19910.
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
2012-05-25 19:52:54 +00:00
ryan
15b9961b52 set_url_scheme() for header and background image srcs. see #20702
git-svn-id: http://core.svn.wordpress.org/trunk@20830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-18 20:22:57 +00:00
koopersmith
eb44b211af Theme Customizer: Flex-width friendly UI, improved typographical hierarchy. see #19910.
git-svn-id: http://core.svn.wordpress.org/trunk@20777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-12 00:48:20 +00:00