Commit Graph

174 Commits

Author SHA1 Message Date
John Blackbourn 5a573f28f2 Docs: Miscellaneous docblock fixes.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 14:54:05 +00:00
John Blackbourn 4ff1233e75 Docs: Correct and improve inline docs for parameters that accept a callback function.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48473


git-svn-id: http://core.svn.wordpress.org/trunk@48242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-14 11:56:04 +00:00
Sergey Biryukov 8c5a8f1811 Docs: Add a reference to `WP_Customize_Setting::__construct()` for information on accepted arguments in `WP_Customize_Manager::add_setting()`.
Synchronize the documentation between two places, use `WP_Customize_Setting::__construct()` as the canonical source.

Props tmanoilov, marekdedic.
Fixes #48347.
Built from https://develop.svn.wordpress.org/trunk@47384


git-svn-id: http://core.svn.wordpress.org/trunk@47171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-27 20:09:06 +00:00
Sergey Biryukov d51c720d2f Docs: Add a reference to `WP_Customize_Control::__construct()` for information on accepted arguments in `WP_Customize_Manager::add_control()`.
Synchronize the documentation between two places, use `WP_Customize_Control::__construct()` as the canonical source.

Props hAmpzter, marekdedic, SergeyBiryukov.
Fixes #48343.
Built from https://develop.svn.wordpress.org/trunk@47364


git-svn-id: http://core.svn.wordpress.org/trunk@47151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-25 16:41:07 +00:00
Sergey Biryukov 47ed56f38f Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.
Built from https://develop.svn.wordpress.org/trunk@47198


git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 06:33:11 +00:00
Sergey Biryukov e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Sergey Biryukov b026fde152 Docs: Remove `@static` notations from property DocBlocks in `wp-admin/*` and `wp-includes/*` classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42747


git-svn-id: http://core.svn.wordpress.org/trunk@42577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:32:30 +00:00
Sergey Biryukov ef4f47d00f Customize: Avoid extra tabs in a textarea in `WP_Customize_Control::render_content()`.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42673


git-svn-id: http://core.svn.wordpress.org/trunk@42501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:59:30 +00:00
Gary Pendergast aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Weston Ruter 685e3c1a67 Customize: Deprecate nav menu classes that are no longer used, instead of removing them immediately.
* Deprecate PHP classes `WP_Customize_New_Menu_Section` and `WP_Customize_New_Menu_Control`.
* Deprecate JS class `wp.customize.Menus.NewMenuControl`.
* Also introduce `wp.customize.Menus.createNavMenu()` for logic to create nav menus separately from the logic for handling UI interactions.

Amends [41768].
See #40104, #42364.
Fixes #42357.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 05:48:47 +00:00
Weston Ruter f8d16c8aed Customize: Move control's fallback selection of default content template to `renderContent` method to align with sections and panels.
* Only use default control content template when a more specific template doesn't exist.
* Remove extraneous whitespace from being output in `WP_Customize_Control::render()` method.
* Move Custom Header template printing to `customize_controls_print_footer_scripts` action.

See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 03:04:49 +00:00
Weston Ruter 36f8e77b49 Customize: Prevent outputting `value` attribute if already supplied among `input_attrs`.
This allows for `input[type=button]` controls to be added without producing illegal HTML.

Amends [41740].
See #30738, #33085.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 04:26:48 +00:00
Weston Ruter 9d6134a88c Customize: Add default control template for standard input types.
Re-use default template instead of introducing custom one for the Discard Changes button.

See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:56:47 +00:00
Weston Ruter 275f4713a5 Customize: Improve the menu creation flow.
Often, folks run into two issues when they create new menus: they click "Add a Menu" thinking it will add a new page to their menu, or they forget to assign their new menu to a location, and then wonder why it doesn't show up on their site.

This commit rearranges the order of items in the menu panel, and updates the flow for creating a menu by breaking it up into steps. Additionally, more help text has been added to guide people through the process of creating a menu.

Also adds default `type` lookups for Panel and Section instances. See #30741.

Props bpayton, obenland, westonruter, celloexpessions, afercia, melchoyce, zoonini, michelleweber.
Fixes #40104.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:22:49 +00:00
Weston Ruter f5bc1d1f52 Customize: Allow controls to be created with pre-instantiated `Setting` object(s), or even with plain `Value` object(s).
* Allow passing settings in keyed object (e.g. `settings: { default: 'id' }  ), or as an array (e.g. `settings: [ 'id' ]`) with first being default; again, `Setting`/`Value` objects may be supplied instead of IDs.
* Allow a single setting to be supplied with just a single `setting` param, either a string or a `Setting`/`Value` object.
* Update `changeset_status` and `scheduled_changeset_date` to be added dynamically with JS and simply passing of `api.state()` instances as `setting`.
* Introduce a `data-customize-setting-key-link` attribute which, unlike `data-customize-setting-link`, allows passing the setting key (e.g. `default`) as opposed to the setting ID.
* Allow `WP_Customize_Control::get_link()` to return `data-customize-setting-key-link` when setting is not registered.
* Eliminate `default_value` from `WP_Customize_Date_Time_Control` since now comes from supplied `Value`.
* Export status choices as `wp.customize.settings.changeset.statusChoices`.
* Export date and time formats as `wp.customize.settings.dateFormat` and `wp.customize.settings.timeFormat` respectively.

Props westonruter, sayedwp.
See #39896, #30738, #30741, #42083.
Fixes #37964, #36167.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 20:02:49 +00:00
Weston Ruter c03b283f37 Customize: Improve accessibility of markup for base `WP_Customize_Control` and `WP_Customize_Nav_Menu_Control` with proper use of `label` elements and inclusion of `aria-describedby`.
See #33085.
Props valendesigns, afercia, westonruter.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:12:46 +00:00
Weston Ruter 8043c2d8e5 Customize: Introduce drafting and scheduling for Customizer changesets.
* Incorporates code from the Customize Snapshots and Customize Posts feature plugins.
* Adds a new Publish Settings section for managing the changeset status, scheduled date, and frontend preview link.
* Updates Publish button to reflect the status selected in the Publish Settings (including Save Draft and Schedule).
* Deactivates the Themes section when a non-publish status selected, and deactivates the Publish Settings section when previewing a theme switch.
* Introduces an `outer` section type (`wp.customize.OuterSection` in JS) for the Publish Settings section to use and for available widgets and available nav menu panels to use in the future. These sections can be expanded while other sections are expanded.
* Introduces `WP_Customize_Date_Time_Control` in PHP and `wp.customize.DateTimeControl` in JS for managing a date/time value.
* Keeps track of scheduled time and proactively publish from the client when the time arrives, as opposed to waiting for WP Cron.
* Auto-publishes a scheduled changeset when attempting to access one that missed its schedule.
* Starts a new changeset if attempting to save a changeset that was previously publish.
* Adds `force` arg to `requestChangesetUpdate()` to force an update request even when there are no pending changes.
* Adds utils methods for `getCurrentTimestamp` and `getRemainingTime`.
* Adds new state values for `selectedChangesetStatus`, `changesetDate`, `selectedChangesetDate`.
* Fixes logic for when to short-circuit check to close Customizer when there are unsaved changes.
* Adds getter methods for `autosaved` and `branching` parameters, with the latter applying the `customize_changeset_branching` filter.
* Call to `establish_loaded_changeset` on the fly when `changeset_uuid()` is called if no changeset UUID was specififed.
* De-duplicates logic for dismissing auto-draft changesets.
* Includes unit tests.

Builds on [41597].
Props sayedwp, westonruter, melchoyce, JoshuaWold, folletto, stubgo, karmatosed, dlh, paaljoachim, afercia, johnregan3, utkarshpatel, valendesigns.
See #30937.
Fixes #39896, #28721, #39275.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 22:25:46 +00:00
Drew Jaynes 0860bb2771 Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:41:44 +00:00
Weston Ruter e8e5a71a85 Docs: Improve phpdoc for `WP_Customize_Manager`, `WP_Customize_Control`, `WP_Customize_Setting`, and `WP_Customize_Selective_Refresh`.
Props 4nickpick, sagarprajapati, ketuchetan, BharatKambariya, mrahmadawais, westonruter.
Fixes #39671.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 20:25:41 +00:00
Weston Ruter 6b5d960453 Customize: Clean up docs and code style for customize changes in 4.7.
* Adds missing `resolve`/`fail` for promise returned by `loadThemePreview`.
* Adds missing jsdoc blocks and tags.
* Adds missing phpdoc and makes corrections.

See #37770.
Fixes #38908.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 06:05:32 +00:00
Helen Hou-Sandí f94285d68c Customize: Make "Add New Page" buttons less intrusive.
They now better match the existing add functionality from the category metabox and are better separated from the surrounding inputs. All hail `.button-link`.

fixes #38164. see #35126.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:56:30 +00:00
Drew Jaynes 5f4497f0af Docs: Fix multiple trivial typos throughout a variety of core files.
Props ottok.
Fixes #38489.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 06:28:32 +00:00
Weston Ruter a86496aea4 Customize: Improve custom background properties UI.
Introduces new control for managing the background position. Adds control for setting the `background-size`.

Props cdog, celloexpressions, grapplerulrich, MikeHansenMe, FolioVision, afercia, helen, melchoyce, karmatosed, westonruter, Kelderic, sebastian.pisula.
Fixes #22058.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 06:52:29 +00:00
Weston Ruter 02ce8db6de Customize: Add explanatory note for `custom_css` control via `textarea[placeholder]` and expose any defined `input_attrs` on such `textarea` controls.
Props melchoyce, westonruter, celloexpressions.
See #37439.
Fixes #38493.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:52:10 +00:00
Weston Ruter 30a71555cb Customize: Allow page stubs to be created via `dropdown-pages` controls in the Static Front Page section.
This ability was previously added to nav menus via the available page items panel. The "Add New Page" button only appears when the `allow_addition` control param is supplied as `true`. Code is adapted from the Customize Posts feature plugin.

Props celloexpressions, westonruter.
See #38013, #34923.
Fixes #38164.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 06:31:31 +00:00
Weston Ruter d84c343cc6 Customize: Let `static_front_page` section be contextually active based on whether there are any published pages.
If there are no pages when the customizer is opened, the `static_front_page` section will be hidden. As soon as a page is created in the customizer session, the `static_front_page` section will be revealed. Previously the section would not be registered if there were no pages. Page stubs created via nav menus will appear in the `dropdown-pages` controls for `page_for_posts` and `page_on_front`, and such page stubs will thus cause the `static_front_page` section to appear. Plugins that facilitate page creation in the customizer by filtering `get_pages` will also cause the section to appear.

See #34923.
Fixes #38013.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 00:47:30 +00:00
Scott Taylor a3ffebce30 Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 16:31:29 +00:00
Scott Taylor 390ceba6c7 Bootstrap: after r38409 and r38410, revert r38402 which reverted r38399.
This fixes the paths in `wp-vendor/` that were including `src`. I want to drop this in so we can find out what else will break.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 22:32:37 +00:00
Dion Hulse 0e31a46161 Bootstrap: Revert [38399] as it's broken `/build/` and subsequently core.svn.wordpress.org.
The generated classmaps reference `/src/` files and operates in the assumption that the base directory is one level above `wp-settings.php`, which it isn't after our build processes are run.

See #36335

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


git-svn-id: http://core.svn.wordpress.org/trunk@38343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 14:37:32 +00:00
Scott Taylor 6a529648cf Bootstrap: Autoload classes using a Composer-generated PHP 5.2-compatible Autoloader.
* `wp-admin` and `wp-includes` are scanned for classes to autoload
* Several 3rd-party and Ryan McCue-shaped libraries are excluded when the classmap is generated, see `composer.json`: `autoload.exclude-from-classmap`
* `wp-vendor/autoload_52.php` is included at the top of `wp-settings.php` - no changes need to be made to unit tests to include the autoloader
* An avalanche of `require()` and `require_once()` calls that loaded class files have been removed from the codebase.

The following files have been added to `svn:ignore` - they are not 5.2-compatible and fail during pre-commit:
* src/wp-vendor/autoload.php
* src/wp-vendor/composer/autoload_real.php
* src/wp-vendor/composer/autoload_static.php
* src/wp-vendor/composer/ClassLoader.php

We favor these files instead:
* src/wp-vendor/autoload_52.php
* src/wp-vendor/composer/autoload_real_52.php
* src/wp-vendor/composer/ClassLoader52.php

When new PHP classes are added to the codebase, simply run `composer install` or `composer update` from the project root to update the autoloader.

The future is now.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 09:15:29 +00:00
Drew Jaynes 22adda2aa0 Hooks: Standardize naming of dynamic hooks to use interpolation vs concatenation.
Benefits gained in discoverability and self-documentation throughout core trump the negligible performance hit in using interpolation in hook names.

Props ramiy.
See #37748.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 18:25:31 +00:00
Drew Jaynes e2c18aaf64 Docs: Standardize filter docs in the Customizer classes to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:10:29 +00:00
Drew Jaynes fe3b007fdd Docs: Remove inline `@see` tags from function, class, and method references in inline docs.
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.

Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 04:00:28 +00:00
Drew Jaynes 0055c9746c Docs: Standardize on using `::` for `Class::method()` references in WP_Customize_Control` inline docs.
See #32246. See #meta1483.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 17:28:27 +00:00
Weston Ruter 2214f69e43 Customize: Allow controls to be registered without any associated settings.
* Improves parity between partials and controls. A partial or control can be settingless if instantiated with `settings` param as empty array (otherwise, if null, then the partial/control ID is used). 
* Eliminate need to create dummy settings that serve no purpose except to place a control in the UI.
* Removes dummy settings for `create_new_menu` and `new_menu_name`.
* Introduces `WP_Customize_Control::$capability` and `WP_Customize_Partial::$capability`, and if set checks them in the respective `check_capabilities()` methods.
* Prevents PHP fatal error from happening when non-existing settings are provided to control: "Call to a member function `check_capabilities()` on a non-object".
* Fixes issue where nav menu items and widgets were no longer working with selective refresh because cap check was failing.

See #27355.
Fixes #35926.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 18:28:28 +00:00
Drew Jaynes 23a6ee1af1 Docs: Hash notate properties and defaults for the benefit of `$args` parameter documentation for `WP_Customize_Control::__construct()`.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-28 20:10:35 +00:00
Scott Taylor 68526a8bf1 Customize: move `WP_Customize_Control` subclasses to `wp-includes/customize`, they load in the exact same place.
See #34432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-24 18:57:25 +00:00
Andrea Fercia 1e1e7a9fc9 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.
Built from https://develop.svn.wordpress.org/trunk@35304


git-svn-id: http://core.svn.wordpress.org/trunk@35270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 20:15:26 +00:00
Scott Taylor 4f16590e8e Customizer: when available, show the `description` when rendering the `dropdown-pages` Control.
Props downstairsdev, MikeHansenMe, _smartik_.
Fixes #31540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 03:48:26 +00:00
Sergey Biryukov 11def634f6 Customizer: `WP_Customize_Cropped_Image_Control` should extend `WP_Customize_Image_Control`, since Site Icon can only an image.
Props paulwilde.
Fixes #34250.
Built from https://develop.svn.wordpress.org/trunk@35018


git-svn-id: http://core.svn.wordpress.org/trunk@34983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 23:25:24 +00:00
Scott Taylor addb8fe492 Customizer: make "Current header" clickable in the same way that "Background Image" is - will open the media modal.
Props umesh.nevase.
Fixes #33586.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 21:40:24 +00:00
Weston Ruter 208330f2dc 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 21:02:27 +00:00
Scott Taylor ef87172270 `foreach` is a statement, not a function.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:28:22 +00:00
Helen Hou-Sandí 7e2cec4edb Customizer: Rename `WP_New_Menu_Customize_Control` to `WP_Customize_New_Menu_Control` for consistency.
props DrewAPicture.
fixes #33324.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-10 18:06:25 +00:00
Dominik Schilling a5ed94ab62 Customizer: Add an `aria-expanded` attribute to Edit menu item toggles.
props afercia.
fixes #33129.
Built from https://develop.svn.wordpress.org/trunk@33483


git-svn-id: http://core.svn.wordpress.org/trunk@33450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 09:50:24 +00:00
Dominik Schilling de86d6b18d Customizer: Add missing text or labels to some nav menu UI controls.
props afercia, celloexpressions, westonruter.
fixes #32715.
Built from https://develop.svn.wordpress.org/trunk@33413


git-svn-id: http://core.svn.wordpress.org/trunk@33381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-24 20:28:25 +00:00
Weston Ruter d5ce83c94c 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 20:29:25 +00:00
Konstantin Obenland 146befe7bf Customizer: Add label for menu names when editing a menu.
Props celloexpressions.
Fixes #32726.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 17:02:24 +00:00
Dominik Schilling 4dcfd3ec83 Customizer: Avoid duplicate IDs and remove role presentation from menu items reorder button. Follow-up to [33074].
props afercia.
fixes #32725.
Built from https://develop.svn.wordpress.org/trunk@33339


git-svn-id: http://core.svn.wordpress.org/trunk@33311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 11:37:26 +00:00
Dion Hulse 412013a158 Allow HTML/entities in the Active Theme Name in the themes.php & Customizer templates.
Props iCaleb
Fixes #33036

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


git-svn-id: http://core.svn.wordpress.org/trunk@33299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-20 01:46:24 +00:00