Andrea Fercia
8774b40dc8
Customizer: Make the widgets "Reorder" and "Add a Widget" buttons... buttons.
...
For accessibility, UI controls should preferably be native controls. Adds
ARIA attributes and labels to improve accessibility and pair these buttons
with the ones in the Menu Customizer.
Props obenland, TomHarrigan, sanket.parmar, metodiew, afercia.
Fixes #33327 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35304 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 20:14:51 +00:00
Scott Taylor
9b27952d46
Customizer: when available, show the description when rendering the dropdown-pages Control.
...
Props downstairsdev, MikeHansenMe, _smartik_.
Fixes #31540 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35275 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 03:47:34 +00:00
Sergey Biryukov
ddec8a1c2b
Customizer: WP_Customize_Cropped_Image_Control should extend WP_Customize_Image_Control, since Site Icon can only an image.
...
Props paulwilde.
Fixes #34250 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35018 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-10 23:24:46 +00:00
Scott Taylor
e04d0dd623
Customizer: make "Current header" clickable in the same way that "Background Image" is - will open the media modal.
...
Props umesh.nevase.
Fixes #33586 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34702 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 21:39:55 +00:00
Weston Ruter
78b73c8906
Customizer: Defer embedding widget controls to improve DOM performance and initial load time.
...
The Menu Customizer feature includes a performance technique whereby the controls for nav menu items are only embedded into the DOM once the containing menu section is expanded. This commit implements the same DOM deferral for widgets but goes a step further than just embedding the controls once the widget area's Customizer section is expanded: it also defers the embedding of the widget control's form until the widget is expanded, at which point the `widget-added` event also fires to allow any additional widget initialization to be done. The deferred DOM embedding can speed up initial load time by 10x or more. This DOM deferral also yields a reduction in overall memory usage in the browser process.
Includes changes to `wp_widget_control()` to facilitate separating out the widget form from the surrounding accordion container; also includes unit tests for this previously-untested function. Also included are initial QUnit tests (finally) for widgets in the Customizer.
Fixes #33901 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34563 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 21:01:46 +00:00
Scott Taylor
3b8c5529cb
foreach is a statement, not a function.
...
See #33491 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33734 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-25 20:27:56 +00:00
Helen Hou-Sandi
0999b0182b
Customizer: Rename WP_New_Menu_Customize_Control to WP_Customize_New_Menu_Control for consistency.
...
props DrewAPicture.
fixes #33324 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33602 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-10 18:06:01 +00:00
Dominik Schilling (ocean90)
8db3eeec7d
Customizer: Add an aria-expanded attribute to Edit menu item toggles.
...
props afercia.
fixes #33129 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33483 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 09:49:55 +00:00
Dominik Schilling (ocean90)
cac1d55621
Customizer: Add missing text or labels to some nav menu UI controls.
...
props afercia, celloexpressions, westonruter.
fixes #32715 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33413 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-24 20:27:04 +00:00
Weston Ruter
9e383a560a
Customizer: Introduce customize_nav_menu_available_item_types and customize_nav_menu_available_items filters.
...
Allows for new available menu item types/objects to be registered in addition to filtering the available items that are returned for each menu item type/object.
Props valendesigns, imath, westonruter.
See #32832 .
Fixes #32708 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33366 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-22 20:28:03 +00:00
Konstantin Obenland
5afdbfdb01
Customizer: Add label for menu names when editing a menu.
...
Props celloexpressions.
Fixes #32726 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33346 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-21 17:01:25 +00:00
Dominik Schilling (ocean90)
810ace4a5e
Customizer: Avoid duplicate IDs and remove role presentation from menu items reorder button. Follow-up to [33074].
...
props afercia.
fixes #32725 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33339 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-21 11:36:15 +00:00
Dion Hulse
534386fcaf
Allow HTML/entities in the Active Theme Name in the themes.php & Customizer templates.
...
Props iCaleb
Fixes #33036
git-svn-id: https://develop.svn.wordpress.org/trunk@33327 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-20 01:45:08 +00:00
Weston Ruter
d755a8d7f5
Customizer: Move "Menu options" heading outside of a nav menu auto-add control's label.
...
Standardizes capitalization. Amends [33189].
Props valendesigns.
Fixes #32820 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33317 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-17 22:41:56 +00:00
Konstantin Obenland
9352eb41fb
Customize: Provide a default way to save cropped images.
...
Allows plugins and themes to use `WP_Customize_Cropped_Image_Control` without
having to define their own way of saving the cropped image.
Props celloexpressions for initial patch.
Fixes #29211 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33280 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-15 19:53:23 +00:00
Drew Jaynes
19629bda41
Fix missing or inconsistent parameter descriptions for constructors in WP_Customize_Control, WP_Customize_Color_Control, WP_Customize_Media_Control, WP_Customize_Image_Control, WP_Customize_Background_Image_Control, WP_Customize_Site_Icon_Control, WP_Customizer_Header_Image_Control, and WP_Customize_Nav_Menu_Item_Control.
...
See #32891 . See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33216 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-13 20:24:29 +00:00
DrewAPicture
a4086a6432
Fix inline documentation syntax, and/or add missing @access tags for a variety of Customizer subclasses and methods added in 4.3.
...
See #32891 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33215 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-13 20:16:02 +00:00
Weston Ruter
4a849e7c24
Customizer: Disambiguate a menu's auto-add pages option from preceding menu location checkboxes.
...
Creates a separate `nav_menu_auto_add` control type following the pattern of the `nav_menu_name` control type.
Props valendesigns.
Fixes #32820 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33189 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-13 08:39:17 +00:00
Dominik Schilling (ocean90)
c9b863c636
Customizer: Merge two strings.
...
see #32576 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33164 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-11 20:04:53 +00:00
Konstantin Obenland
4f606c1bb3
Better context for autofocused elements for screen readers.
...
Props joedolson for initial patch.
Fixes #30706 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33158 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-10 22:22:32 +00:00
Konstantin Obenland
68cd0bc870
Site Icon: Add Customizer UI.
...
Second part of the Site Icon feature after [32994] introduced it for Settings.
Props celloexpressions.
See #16434 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33154 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-10 21:32:23 +00:00
Sergey Biryukov
345521666e
Merge two class attributes in WP_Customize_Media_Control::content_template() and wp_print_media_templates().
...
props nicholas_io.
fixes #32896 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33090 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-06 14:18:03 +00:00
Dominik Schilling (ocean90)
787016376a
Customizer: Improve descriptive text and focus for menu items reorder button.
...
props afercia.
fixes #32725 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33074 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-03 21:23:12 +00:00
Sergey Biryukov
5e3dcc772d
Customizer: Add an aria-label attribute to the Add Items button to improve accessibility.
...
props afercia.
fixes #32713 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32981 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-28 04:27:24 +00:00
Scott Taylor
550763988b
ob_get_contents() followed by ob_end_clean() can be replaced by ob_get_clean().
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32965 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-27 01:11:45 +00:00
Scott Taylor
5beca90d40
The query-attachments AJAX action immediately errors out if the user doesn't have the upload_files cap. As such, the Customizer shouldn't show buttons that launch the media modal when the user doesn't have the proper permissions to query attachments.
...
See #32654 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32913 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-23 18:19:43 +00:00
Dominik Schilling (ocean90)
799bc5ce79
Customizer: Fix live preview for menu item titles.
...
Show also a default label for menu items without a label which are assigned to a menu. This is currently only supported in the Customizer, see #24146 for nav menus screen.
see #32576 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32895 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-20 22:32:37 +00:00
Dominik Schilling (ocean90)
1bc98482f1
Customizer: Escape original title of menu items.
...
see #32576 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32893 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-20 19:54:47 +00:00
Dominik Schilling (ocean90)
21d76509c4
Customizer: Use valid markup for menu items.
...
Replace `<d(l|t)>` with `<div>` for `.menu-item-bar` and `.menu-item-handle`.
see #32724 , #32721 , #31817 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32889 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-20 18:46:16 +00:00
Dominik Schilling (ocean90)
798ea970d3
Customizer: Decode HTML entities in the label property of WP_Customize_Media_Control.
...
fixes #31631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32885 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-20 18:15:00 +00:00
Scott Taylor
fa99a8af6e
Add access modifier to WP_Customize_Nav_Menu_Item_Control::json()
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32873 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 21:54:37 +00:00
Scott Taylor
47068b95f7
Add access modifier to WP_Customize_Nav_Menu_Control::json()
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32872 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 21:53:59 +00:00
Konstantin Obenland
bfb8734652
Keep WP_Customize_Nav_Menus_Panel with other panels rather than controls.
...
Accidentally merged into the wrong file in [32806].
H/t celloexpressions for noticing.
See https://wordpress.slack.com/archives/core-customize/p1434696254000258 .
See #32576 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32855 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 08:36:37 +00:00
Dominik Schilling (ocean90)
413d24c47f
Customizer: Improve accessibility of Add Menu Items button and its panel.
...
props afercia, ocean90.
fixes #32682 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32848 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 20:51:48 +00:00
Dominik Schilling (ocean90)
c0a66eba79
Add menu management to the Customizer.
...
This brings in the Menu Customizer plugin: https://wordpress.org/plugins/menu-customizer/ .
props celloexpressions, westonruter, valendesigns, voldemortensen, ocean90, adamsilverstein, kucrut, jorbin, designsimply, afercia, davidakennedy, obenland.
see #32576 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32806 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 22:07:08 +00:00
Scott Taylor
ef6315a7a2
After [32656], add @access annotations to methods that have no doc block in wp-includes/*.
...
Makes it easier to search for no doc blocks via `}[\n\t\r ]+(protected|private|public)`.
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32657 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 21:36:38 +00:00
Scott Taylor
c8a44d437a
Add @static* annotations where they are missing.
...
Initialize all static vars that are not, most to `null`.
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32650 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 15:42:40 +00:00
Scott Taylor
39ef6a72c5
Use void instead of null where appropriate when pipe-delimiting @return types. If a @return only contains void, remove it.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32568 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 05:39:47 +00:00
Scott Taylor
febd12c957
Clean up @global doc blocks/imports for class-wp-customizer-*.php and friends.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32542 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-22 05:05:19 +00:00
Scott Taylor
9333337992
In class-wp-customize-*, clarify/add some @param/@return blocks. Disambiguate some functions that are trying to return the void response of another function they call internally.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32535 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-21 22:04:29 +00:00
Sergey Biryukov
5af9ac0ea2
Customizer: Use a semantic, accessible element for Remove Header Image button.
...
Make the button more noticeable on dark, light, and busy images.
props afercia, RDall, melchoyce.
fixes #32227 , #31325 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32382 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-06 10:53:07 +00:00
Dominik Schilling (ocean90)
f029572866
Theme Switcher: Provide an easier way to reset back to the current active theme.
...
* Add control for the active theme when doing a theme preview
* Highlight an active theme and move it to the top
props valendesigns, ocean90.
fixes #32002 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32265 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-22 16:15:01 +00:00
Dominik Schilling (ocean90)
7fba67e4b7
Customizer: Escape theme preview URLs.
...
props johnbillion, ocean90.
see #31896 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32134 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-15 16:32:03 +00:00
Dominik Schilling (ocean90)
e9196a321a
Customizer Theme Switcher: Lazy load theme screenshots.
...
props westonruter, ocean90.
fixes #31793 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32088 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-08 20:51:39 +00:00
Dominik Schilling (ocean90)
379393651b
Customizer Theme Switcher: Fix preview URL for subfolder installs.
...
Use `$_SERVER['HTTP_HOST']` and `$_SERVER['REQUEST_URI']` instead of `site_url()` and `$_SERVER['REQUEST_URI']`.
fixes #31896 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32086 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-08 18:58:08 +00:00
Drew Jaynes
88ccda8ae8
Add documentation for the $type and $theme properties in WP_Customize_Theme_Control.
...
Also add some missing `@access` tags to various DocBlocks.
See [31533]. See #31888 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32028 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-05 14:52:28 +00:00
Drew Jaynes
1463a2c88c
Add documentation for the $type, $mime_type, and $button_labels properties in WP_Customize_Media_Control.
...
See [31698]. See #31888 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32023 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-04 23:04:51 +00:00
Dominik Schilling (ocean90)
f6e4d76e5b
Customizer Theme Switcher: Update JavaScript template after [31975].
...
see #31289 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31976 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-01 23:05:41 +00:00
Dominik Schilling (ocean90)
365ed7a6cb
Customizer Theme Switcher: Remove "Add New" references.
...
The current iteration takes you out of the customizer context, which isn't great UX and doesn't really fit into the flows targeted by this particular UI.
fixes #31837 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31968 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-01 19:49:41 +00:00
Dominik Schilling (ocean90)
b194676876
Customizer Theme Switcher: Switch the details/live preview buttons.
...
props celloexpressions, ocean90.
fixes #31791 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31954 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-01 12:35:26 +00:00