Commit Graph

4692 Commits

Author SHA1 Message Date
Weston Ruter 83b059aa19 Customize: Implement customized state persistence with changesets.
Includes infrastructure developed in the Customize Snapshots feature plugin.

See https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions/

Props westonruter, valendesigns, utkarshpatel, stubgo, lgedeon, ocean90, ryankienstra, mihai2u, dlh, aaroncampbell, jonathanbardo, jorbin.
See #28721.
See #31089.
Fixes #30937.
Fixes #31517.
Fixes #30028.
Fixes #23225.
Fixes #34142.
Fixes #36485.


git-svn-id: https://develop.svn.wordpress.org/trunk@38810 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-18 20:04:36 +00:00
Weston Ruter 456c23c551 Customize: Skip triggering initial click on pages section for available nav menu items if already open.
Fixes race condition if user opens Pages section before the ajax request to load items finishes.

Props ryankienstra, celloexpressions.
Fixes #36984.


git-svn-id: https://develop.svn.wordpress.org/trunk@38807 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-17 16:22:14 +00:00
Pascal Birchler 9639758d1c Docs: Improve documentation for `install_plugin_install_status()`.
Props clarionwpdeveloper, sudar.
Fixes #36912.

git-svn-id: https://develop.svn.wordpress.org/trunk@38805 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-17 08:29:30 +00:00
Andrew Ozz 79fdcbdb07 TinyMCE:
- When editing pages, add body class with the page template, or `page-template-default`.
- Change the page template class when the users select another template, similarly to changing the post type class for posts.

Props webmandesign.
Fixes #37599.

git-svn-id: https://develop.svn.wordpress.org/trunk@38803 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-17 01:10:01 +00:00
Andrea Fercia 95feac1df5 Menus: Fix the posts-categories quick search.
On the Menus screen, events that trigger the posts-categories search need to be
delegated. This "boxes" may get dynamically rebuilt so events directly attached
to the search input field need to be delegated.

Fixes #38324.


git-svn-id: https://develop.svn.wordpress.org/trunk@38799 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-16 20:02:33 +00:00
Andrew Ozz a1cae16efe Accessible Tags autocomplete:
- Replace suggest.js with UI Autocomplete.
- Use the same settings like in the editor link toolbar.
- Abstract it and add in a new file, tags-suggest.js. Then make it a dependency for the Tags postbox(es) and Quick and Bulk Edit.
- Add `data-wp-taxonomy` on all input elements to improve handling in the UI for custom taxonomies.

Props afercia, azaozz.
See #33902.

git-svn-id: https://develop.svn.wordpress.org/trunk@38797 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-14 22:39:49 +00:00
Andrea Fercia 7ce67a141d Administration: Better consistency for the Media, Add Plugins, and Add Themes toolbars.
Fixes the Add Themes toolbar padding. Standardizes the placeholders to no title
case and three trailing dots. Expands the Media search placeholder in
"Search media items..." for consistency with the Plugins and Themes toolbars.

Props mikeviele, jamesacero, mattking5000, koenschipper, dungengronovius.

Fixes #38010.


git-svn-id: https://develop.svn.wordpress.org/trunk@38795 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-14 21:32:08 +00:00
Pascal Birchler ddeae5feee Themes: Do not show an update button if there's no update package.
This updates the list view to match the existing behaviour in the single theme modal.

Props tristangemus for initial patch.
Fixes #37774.

git-svn-id: https://develop.svn.wordpress.org/trunk@38788 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-14 13:32:29 +00:00
Andrew Ozz af80e92ee1 Editor: do not send the request for releasing the post lock on unload when post_ID or active_post_lock is missing.
Props dlh, adamsilverstein.
Fixes #38271.

git-svn-id: https://develop.svn.wordpress.org/trunk@38772 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-10 22:41:26 +00:00
Andrea Fercia 907d67572a Accessibility: Improve the UI controls to move the Menu items.
On the Menus screen, the links to move menu items behave like buttons: they
perform an action so they should be real buttons to be correctly reported to
assistive technologies. Since they're logically grouped controls, they should
also be wrapped in a `<fieldset>` element for better semantics and accessibility.

Props Cheffheid.
Fixes #35578.


git-svn-id: https://develop.svn.wordpress.org/trunk@38770 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-10 16:23:23 +00:00
Weston Ruter 81ae08cf40 Customize: Show Pages section first and pre-expanded in list of available nav menu items.
Props ryankienstra, westonruter.
Fixes #36984.


git-svn-id: https://develop.svn.wordpress.org/trunk@38767 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-09 23:40:53 +00:00
Dominik Schilling (ocean90) 8448857427 Menus: Hide controls in the search tab if no items are found.
Props sayedwp, afercia, tywayne, abrightclearweb.
Fixes #35576.

git-svn-id: https://develop.svn.wordpress.org/trunk@38754 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 20:55:25 +00:00
Dominik Schilling (ocean90) 70ae852c69 Taxonomy: On `wp-admin/term.php`, don't show a 'Back to' link which links to the current page.
Fixes #37573.

git-svn-id: https://develop.svn.wordpress.org/trunk@38753 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 20:12:35 +00:00
Dominik Schilling (ocean90) cf14d8a2a2 Taxonomy: Remove `paged` argument from referer and add it only if current page is greater than 1.
Props swissspidy.
See #38194.

git-svn-id: https://develop.svn.wordpress.org/trunk@38752 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 20:05:45 +00:00
Dominik Schilling (ocean90) 981ff63724 Taxonomy: Don't drop term order and current page when bulk deleting terms.
* Removes special handling for `edit-tags.php` which is no longer required because of `term.php`. Related: [34202] and [36308].
* Sets `$referer` to `$_SERVER['REQUEST_URI']` because `wp_get_referer()` returns false if `$_SERVER['REQUEST_URI'] === $_REQUEST['_wp_http_referer']`.
* Sets `paged` always to `$pagenum` which is the value of `$wp_list_table->get_pagenum();`. This avoids an additional redirect when you delete an item which was previously on the last page.

Fixes #38194.

git-svn-id: https://develop.svn.wordpress.org/trunk@38750 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 19:38:03 +00:00
swissspidy b2f60b5419 Taxonomy: Introduce `WP_Taxonomy` and use it in `register_taxonomy()` and `unregister_taxonomy()`.
This changes the global `$wp_taxonomies` to an array of `WP_Taxonomy ` objects. `WP_Taxonomy ` includes methods to handle rewrite rules and hooks.
Each taxonomy argument becomes a property of `WP_Taxonomy`. Introducing such a class makes further improvements in the future much more feasible.

Props boonebgorges for review.
Fixes #36224. See #36217.

git-svn-id: https://develop.svn.wordpress.org/trunk@38747 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 17:11:02 +00:00
Pascal Birchler 92cf15870f Plugins: Correctly display the current plugin in the plugin editor.
When editing a plugin file, show the correct plugin as being edited in the dropdown with the correct activation status.

Props aniketpant, dd32, DrewAPicture, jayarjo, MattyRob, mt8.biz, solarissmoke, swissspidy, WraithKenny.
Fixes #24122, #17552.

git-svn-id: https://develop.svn.wordpress.org/trunk@38745 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 16:57:49 +00:00
Pascal Birchler 5d4546367a Upgrade/Install: Show correct time of last checked update.
Props PieWP for initial patch.
Fixes #37554.

git-svn-id: https://develop.svn.wordpress.org/trunk@38743 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 16:36:06 +00:00
Weston Ruter 6c3301476d Customize: Add workaround for Safari bug causing preview frame to be unscrollable via `mousewheel` after a refresh.
Props westonruter, tristangemus.
Fixes #38149.


git-svn-id: https://develop.svn.wordpress.org/trunk@38742 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 20:16:19 +00:00
Helen Hou-Sandi 7cc095a1a0 Login: Don't rely on `wp_is_mobile()` for functionality.
Making behavior changes based on some broad definition of what mobile is rarely, if ever, makes sense. Each bit of functionality should be more clearly targeted, whether that's for screen size, performance, or some kind of touch capability.

props akibjorklund.
see #33704.


git-svn-id: https://develop.svn.wordpress.org/trunk@38739 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 15:51:53 +00:00
Dion Hulse 0d33ec0b8e Updates: Remove the 'Download' button on the Updates screen.
Props swissspidy.
Fixes #36811.


git-svn-id: https://develop.svn.wordpress.org/trunk@38736 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 01:05:15 +00:00
Helen Hou-Sandi a0686cacd1 Taxonomy: Remove the popular tag cloud from `edit-tags.php`.
Sorting by count (which wasn't possible at the time the tag cloud was introduced) is more effective, though we should likely make count sort by `DESC` initially rather than `ASC`.

props ramiy.
fixes #36964.


git-svn-id: https://develop.svn.wordpress.org/trunk@38735 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 21:25:50 +00:00
Joe McGill 5d1f571508 Media: Improve docs for `image_send_to_editor` filter.
This updates inline docs for the `image_send_to_editor` filter to better
describe when it is fired.

Props adamsilverstein.
Fixes #34823.

git-svn-id: https://develop.svn.wordpress.org/trunk@38734 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 19:56:26 +00:00
joemcgill 2eade6230d Media: Better handling of JOINs when searching filenames.
Following [38625], any media searches that already included JOINs,
e.g., `tax_queries`, would get trampled when we joined the post meta
table to search for filenames. This preserves existing JOINs and
also only applies the `_filter_query_attachment_filenames()` filter
when a search query is being performed.

Props flixos90, joemcgill.
Fixes #22744.

git-svn-id: https://develop.svn.wordpress.org/trunk@38733 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 19:50:02 +00:00
Dion Hulse 1bd6d19f80 Plugins: Display 'Less Than 10' active installs of a plugin rather than '0+' active installs.
Props ovann86.
Fixes #37509.


git-svn-id: https://develop.svn.wordpress.org/trunk@38729 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 03:32:41 +00:00
Andrea Fercia 5ba47b2119 Accessibility: Remove target=_blank from the help tab links on several admin screens.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38145. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38725 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 20:26:09 +00:00
Andrea Fercia 050d2d9a25 Accessibility: Remove target=_blank from the Users and Widgets screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38217. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38723 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 07:09:12 +00:00
Andrea Fercia 5cd9a575eb Accessibility: Remove target=_blank from the Plugins, Themes, Media, Update, and Tools screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38215. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38722 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 07:07:17 +00:00
Andrea Fercia 240b114fe8 Accessibility: Remove target=_blank from the Network screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38159. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38721 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 07:02:48 +00:00
Andrea Fercia 0c829777f2 Accessibility: Remove target=_blank from the Settings screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38143. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38720 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 06:58:36 +00:00
afercia 2c01dadd40 Accessibility: Remove target=_blank from the old custom background/header help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38141. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38719 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 06:56:02 +00:00
Andrea Fercia 65e01d5951 Accessibility: Remove target=_blank from the comment/edit-comments help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38140. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38718 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 06:53:20 +00:00
Konstantin Obenland ab087dadfc Themes: Account for uppercase chars when managing themes.
Fixes a bug where the UI wasn't updated after deleting/updating a theme.

Also introduces unit tests for theme management ajax handlers. For now they're
focused on `wp_ajax_update_theme()` but they can include tests for other
handlers as well.

Props chrisjean for initial patch.
Fixes #37924.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@38710 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 18:12:57 +00:00
Andrea Fercia 395823c9cd Customize: Improve the widgets and menu items search.
- adds a "search" icon into the search fields
- adds a hidden description for the widget search field, targeted by `aria-describedby`
- adds the "clear-results" button to the widgets search
- removes the `change` and `search` events bound on the widget search, for these "live searches" WordPress should standardize on `input` (+ `keyup` when needed)
- adds property and function to keep track and update the number of the widgets search results
- the widgets search results are now announced via `wp.a11y.speak()`
- adds a visible and audible message when there are no widgets search results
- moves some CSS to `customize-controls.css`

Props ryankienstra, melchoyce, afercia.
Fixes #36908.


git-svn-id: https://develop.svn.wordpress.org/trunk@38709 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 16:27:55 +00:00
Pascal Birchler 7387321059 Plugins: Fix odd typo introduced in [38703].
`even` should of course be `event`.

See #37973.

git-svn-id: https://develop.svn.wordpress.org/trunk@38706 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 07:06:12 +00:00
Pascal Birchler f231e7233d I18N: Introduce a user-specific language setting.
By enabling the user to select their preferred locale when editing the profile, we allow for greater personalization of the WordPress admin and therefore a better user experience.

The back end will be displayed in the user's individual locale while the locale used on the front end equals the one set for the whole site. If the user didn't specify a locale, the site's locale will be used as a fallback. The new `locale` property of the `WP_User` class can be used to retrieve the user's locale setting.

Props ocean90, ipm-frommen, swissspidy.
Fixes #29783.

git-svn-id: https://develop.svn.wordpress.org/trunk@38705 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 07:03:41 +00:00
Pascal Birchler d3afcc4e33 Import: Fix plugin activation link after installing an importer on multisite.
When installing the importer via Ajax, the activation link should be the same as if the page were reloaded.

Props joelcj91 for initial patch.
Fixes #37943.

git-svn-id: https://develop.svn.wordpress.org/trunk@38704 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 06:41:37 +00:00
Pascal Birchler fd5d2a65ad Plugins: Fix checkbox selection when searching for installed plugins.
Since the plugin search works via Ajax, the JavaScript events need to delegated in order for the checkboxes to work properly.

Props afercia.
Fixes #37973.

git-svn-id: https://develop.svn.wordpress.org/trunk@38703 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 06:36:19 +00:00
Weston Ruter a39953e1e3 Menus: Restore checkboxes in post type search which were lost in [38584].
The `$args` variable was being overridden instead of extended, therefore causing the `walker` to be dropped.

Fixes #33742.


git-svn-id: https://develop.svn.wordpress.org/trunk@38702 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 02:34:46 +00:00
Andrea Fercia 9732c3ff44 Accessibility: Editor, Publish meta box: remove a stray label and redundant CSS.
Also, adds a `role="button"` attribute to the "Edit" links.

Props iseulde.
Fixes #28411.


git-svn-id: https://develop.svn.wordpress.org/trunk@38700 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-02 14:37:54 +00:00
John Blackbourn 17ef6d8cfa Taxonomy: Introduce more fine grained capabilities for managing taxonomy terms.
This introduces the singular `edit_term`, `delete_term`, and `assign_term` meta capabilities for terms, and switches the base capability name for tags from `manage_categories` to `manage_post_tags` and the corresponding `edit_post_tags`, `delete_post_tags`, and `assign_post_tags`.

All of these capabilities ultimately map to `manage_categories` so by default there is no change in the behaviour of the capabilities for categories, tags, or custom taxonomies. The `map_meta_cap` filter and the `capabilities` argument when registering a taxonomy now allow for control over editing, deleting, and assigning individual terms, as well as a separation of capabilities for tags from those of categories.

Fixes #35614
Props johnjamesjacoby for feedback


git-svn-id: https://develop.svn.wordpress.org/trunk@38698 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 22:39:32 +00:00
Aaron Jorbin 8c3dd28ec7 Build/Test: Bump Autoprefixer to 6.5.0
Also includes a new prefixed value.

Changes:
6.5 “Einigkeit und Recht und Freiheit”
- Add defaults keyword to browsers requirements.
- Fix CSS Grid Layout support.
- Fix align-self cleaning.

6.4.1
- Fix node cloning after some PostCSS plugins.

6.4 “Hic et ubique terrarum”
- Add :any-link selector support.
- Add text-decoration-skip support.
- Add transition: duration property support.
- Fix -webkit- prefix for backface-visibility.
- Fix rad unit support in gradients (by 刘祺).
- Fix transition support in Opera 12.
- Removed Safari TP Grid prefixes support.

6.3.7
- Fix rare Cannot read property 'constructor' of null issue.

6.3.6
- Add Safari TP prefix support for Grid Layout.

6.3.5
- Fix duplicate prefixes for -ms-interpolation-mode.

6.3.4
- Show users coverage for selected browsers in info().

28.0
- Happy Birthday @nacin

See #38199




git-svn-id: https://develop.svn.wordpress.org/trunk@38688 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 17:33:57 +00:00
Ryan McCue a4ac1123f8 Options: Move register_setting() from wp-admin to wp-includes.
With [38635], register_setting is now a more generic setting registration function and is usable outside of the admin.

See #37885.


git-svn-id: https://develop.svn.wordpress.org/trunk@38687 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 15:52:01 +00:00
Jeremy Felt d5f0513164 Multisite: Use `get_sites()` in network upgrade.
Use `get_sites()` to generate the same query that was previously performed manually.

Props spacedmonkey, flixos90.
Fixes #37823.


git-svn-id: https://develop.svn.wordpress.org/trunk@38680 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 03:50:18 +00:00
Ryan McCue 60b09f3005 Options: Add missing since for register_setting argument.
[38635] added support for extra arguments on registration, but was not documented.

See #37885.


git-svn-id: https://develop.svn.wordpress.org/trunk@38676 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-29 21:11:44 +00:00
Joe McGill 0d0e2bf2ba Media: Use `wp_basename()` to create attachment titles from filenames.
In [38294], `pathinfo()` was used with the `PATHINFO_BASENAME` constant to
get the basename of the file to be used as an attachment title, which depends
on PHP locale and can cause issues with UTF-8 characters. This uses
`wp_basename()` instead, which is a more i18n-friendly version of `basename()`.

Props SergeyBiryukov.
Fixes #37608, #37989.

git-svn-id: https://develop.svn.wordpress.org/trunk@38673 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-29 01:20:10 +00:00
Andrea Fercia ee7f970ffa Administration: Improve the usage of the button CSS classes.
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.


git-svn-id: https://develop.svn.wordpress.org/trunk@38672 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-28 19:53:07 +00:00
Weston Ruter c286c27747 Customize: Fix focusing on controls for widgets and nav menu items after [38648].
Shift-click on nav menu items was not expanding the nav menu section, and shift-clicking on widgets would not always result in focus being added to an element in the control's container.

See #34391.


git-svn-id: https://develop.svn.wordpress.org/trunk@38668 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-28 04:19:37 +00:00
Sergey Biryukov 36e22efdfd Text Changes: Unify two more permission error messages.
Props ramiy.
Fixes #38158. See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@38666 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-28 00:16:44 +00:00
Sergey Biryukov 01e8552fd6 Text Changes: Unify two permission error messages in `wp-admin/network/site-users.php`.
Props ramiy.
Fixes #38178. See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@38665 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-27 23:51:12 +00:00
Dominik Schilling (ocean90) 0bab64c370 Toolbar: Update links to the about page if current user can't access the dashboard of the current site.
Add missing focus styling for menu items with an icon.

Fixes #37949.

git-svn-id: https://develop.svn.wordpress.org/trunk@38660 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-27 19:00:35 +00:00
Jeremy Felt 61f014b9fc Multisite: Remove redundant `is_multisite()` checks in network admin templates.
`wp-admin/network/admin.php` is required by all of the individual network templates and begins with an `is_multisite()` check of its own. Because of this, we can remove the 26 other checks in the individual templates.

Props flixos90.
Fixes #37447.


git-svn-id: https://develop.svn.wordpress.org/trunk@38657 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-27 15:38:47 +00:00
Jeremy Felt 4799f61d23 Multisite: Replace `die()` with `wp_die()` in site users list table.
`wp_die()` is available and appropriate when checking capabilities while processing list table actions.

Props imath.
Fixes 38151.


git-svn-id: https://develop.svn.wordpress.org/trunk@38656 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-27 15:26:21 +00:00
Dominik Schilling (ocean90) a1e9fbfc14 Multisite: Allow to set the site language of a new site to English.
An empty string in `WPLANG` is used to define the site language as `en_US`. The `! empty()` check didn't catch this case so that `wpmu_create_blog()` fell back to the network setting.

Fixes #36918.

git-svn-id: https://develop.svn.wordpress.org/trunk@38655 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-26 18:38:32 +00:00
John Blackbourn 6d05c7db0d Administration: Remove the `input` qualifier for the `.regular-text` class rule. This allows for other elements such as textareas to be styled with the same width as regular text inputs.
Fixes #20928
Props curdin


git-svn-id: https://develop.svn.wordpress.org/trunk@38653 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-26 16:45:22 +00:00
Weston Ruter f3e8e7735d Customize: Re-architect and harden panel/section UI logic.
Removes contents for sections and panels from being logically nested (in the DOM) in order to eliminate many issues related to using `margin-top` hacks. The element containing the link to expand the content element for panels and sections is now a sibling element to its content element: the content is removed from being nested at initialization. The content element is now available in a `contentContainer` property whereas the head element (containing the link to open the construct) is in a `headContainer` property. The existing `container` property is now a jQuery collection that contains both of these elements. Since the head element is no longer in an ancestor element to the `content` element, the `aria-owns` property is now used to maintain the relationship between the `headContainer` and the `contentContainer`. These changes are also accompanied by an improvement to the animation performance for the sliding panes.

Props delawski, celloexpressions.
Fixes #34391.
Fixes #34344.
Fixes #35947.


git-svn-id: https://develop.svn.wordpress.org/trunk@38648 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-23 22:22:09 +00:00
Eric Andrew Lewis c75fb5e9ca Allow custom bulk actions in admin list tables.
Bulk action filtering was introduced in 3.1, but only to remove default bulk actions, not add new ones.

Bulk actions can now be registered for all admin list table dropdowns via the `bulk_actions-{get_current_screen()->id}` filter. Handling custom bulk actions can be performed in the corresponding and newly introduced `handle_bulk_actions-${get_current_screen()->id}` filter.

Props scribu, flixos90, Veraxus.
See #16031.



git-svn-id: https://develop.svn.wordpress.org/trunk@38647 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-23 20:32:48 +00:00
Sergey Biryukov 42dfc674b7 Docs: Add documentation for `wp-admin/js/inline-edit-tax.js`.
Props atimmer, boblinthorst.
Fixes #37571.

git-svn-id: https://develop.svn.wordpress.org/trunk@38644 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-22 18:49:26 +00:00
Sergey Biryukov b34a53e715 Docs: Add documentation for `wp-admin/js/postbox.js`.
Props atimmer, andizer.
Fixes #37365.

git-svn-id: https://develop.svn.wordpress.org/trunk@38643 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-22 18:46:34 +00:00
Andrea Fercia 0a23a8405d Accessibility: Fix the Customizer available menu items toggles focus for Safari and VoiceOver.
In rare circumstances, for example buttons with icons and no visible text,
`user-select: none;` may trigger a bug that happens only when using Safari and
VoiceOver and doesn't allow focusable elements to receive focus correctly.
Worth reminding `user-select: none;` is a non-standard property and should be
used with care especially now that `::selection` is almost universally supported.

Fixes #37589.


git-svn-id: https://develop.svn.wordpress.org/trunk@38642 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-22 14:58:41 +00:00
Andrea Fercia e5fc724dd0 Accessibility: Add Themes Feature Filter form improvements.
- adds "Apply Filters" and "Clear" at the end of the form
- changes the "Feature Filter", "Apply Filters", "Clear", and "Edit" links in `<button>` elements
- removes a leftover from [27963]
- clarifies one button text and adds an `aria-label` attribute
- adds a `wp.a11y.speak()` message when clicking on "Apply Filters" and no features are selected

Fixes #38086.


git-svn-id: https://develop.svn.wordpress.org/trunk@38640 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-21 17:53:29 +00:00
Andrea Fercia 9bfbc3570b Administration: Fix the main background color for the Light color scheme.
Props trepmal.
Fixes #38004.


git-svn-id: https://develop.svn.wordpress.org/trunk@38638 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-21 17:35:42 +00:00
Sergey Biryukov 9ee1f662cb Editor: Improve `post.js` documentation.
Props jipmoors, boblinthorst.
Fixes #38118.

git-svn-id: https://develop.svn.wordpress.org/trunk@38637 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-21 08:56:28 +00:00
Joe Hoyle 201f9d2864 Options: Build out register_setting like register_meta.
`register_setting` can now be passed an array arguments to specify meta-data about the setting,
much like using the `register_meta` API. Of note, it will now accept a `show_in_rest` arg to
hint the inclusion of the setting in the REST API. `get_registered_settings()` is available
as a utility to get all registered settings.

Props rmccue, aaroncampbell.
Fixes #37885.




git-svn-id: https://develop.svn.wordpress.org/trunk@38635 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 20:51:18 +00:00
Dominik Schilling (ocean90) debaea8a7c Multisite: Show always domain and path when deleting a site.
Add a missing translators comment.

Props ian.edington.
Fixes #37309.

git-svn-id: https://develop.svn.wordpress.org/trunk@38633 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 19:54:26 +00:00
Sergey Biryukov d9e0272707 Docs: Correct the description of `{$taxonomy}_term_new_form_tag` hook, making it more consistent with other `*_form_tag` hooks.
Props BjornW.
Fixes #38104.

git-svn-id: https://develop.svn.wordpress.org/trunk@38629 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 13:32:33 +00:00
Joe McGill c953f0aae0 Media: Align input and button heights in attachment details.
This tweaks the padding of the text inputs in image settings boxes on
image edit screens to match the height of the scale button.

Props eliorivero.
Fixes #37806.

git-svn-id: https://develop.svn.wordpress.org/trunk@38626 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 02:17:54 +00:00
Joe McGill 4da705a7db Media: Make media library searchable by filename.
This applies a new private function, `_filter_query_attachment_filenames()`,
to the `post_clauses` filter hook during `wp_ajax_query_attachments()` and
`wp_edit_attachments_query_vars()` to include `_wp_attached_file` post meta
in search queries performed from the media library or in a `WP_Media_List_Table`.

Props wonderboymusic, DrewAPicture, joemcgill, swissspidy.
Fixes #22744.

git-svn-id: https://develop.svn.wordpress.org/trunk@38625 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 01:44:07 +00:00
Weston Ruter 7079459b77 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38624 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 00:46:54 +00:00
Sergey Biryukov 849c5de6d5 Docs: Correct two references to plugins in the `$args` parameter description for `themes_api()`.
Props hideokamoto.
Fixes #37939.

git-svn-id: https://develop.svn.wordpress.org/trunk@38623 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-19 16:45:44 +00:00
Sergey Biryukov b733c05fbc Docs: Correct a comment and `@return` entry in `WP_Upgrader::create_lock()`.
Props markshep.
Fixes #38089.

git-svn-id: https://develop.svn.wordpress.org/trunk@38622 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-18 20:15:46 +00:00
John Blackbourn bc0a601889 Upgrade/Install: Automatically log users in after installation.
This change means that after entering their site's settings upon installation, users are immediately logged in and redirected to the admin dashboard, instead of being presented with the 'Success!' screen and then being asked to log in. This reduces friction and reduces the number of steps for installation.

Fixes #34084


git-svn-id: https://develop.svn.wordpress.org/trunk@38619 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-18 11:41:53 +00:00
Weston Ruter 87dc042623 Customize: Ensure nav menu items lacking a label use the title from the original object.
Use original title as placeholder for label and in control title. Prevent original title from overriding empty label in initial setting values.

Fixes #38015.


git-svn-id: https://develop.svn.wordpress.org/trunk@38618 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-17 21:49:49 +00:00
Andrea Fercia 998c06222f Plugins: style the primary action link in the non-js "Installing Plugin" page.
Props curdin, ericlewis, melchoyce, karmatosed.
Fixes #36430.


git-svn-id: https://develop.svn.wordpress.org/trunk@38617 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-17 16:22:03 +00:00
Andrea Fercia aa021ff89f Accessibility: Standardize the remove/delete/cancel links in the Menus screen and Publish meta boxes.
The `submitdelete` CSS class is used in various places across the admin for some
"red" action links. It is worth simplifying this rule for further improvements
related to color contrast.

- simplifies a non-standard styling for the "Remove/Cancel" links in the Menus screen
- underlines all the "Move to trash/Delete" red links in all the Publish meta boxes
- fixes CSS classes usage for all the Publish meta boxes primary buttons
- fixes broken layout for the old Link Manager publish meta box

Props karmatosed, hugobaeta, monikarao, afercia.
Fixes #37969, #37018. See #37448, #37138, #27314.


git-svn-id: https://develop.svn.wordpress.org/trunk@38616 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-17 15:38:40 +00:00
Aaron D. Campbell 6eb3e0bf5f Media: Improved media titles when created from filename.
Preserves spaces and generally creates more accurate, cleaner titles from filenames of uploaded media.

Props joemcgill.
Fixes #37989.



git-svn-id: https://develop.svn.wordpress.org/trunk@38614 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-17 05:41:27 +00:00
Pascal Birchler a803a33c04 Menus: Use strict comparison for the condition added in [38612].
See #37846.

git-svn-id: https://develop.svn.wordpress.org/trunk@38613 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-15 16:55:19 +00:00
Pascal Birchler 98e386c6f9 Menus: Remove 'sub item' label when removing the sub item's parent.
Props rnoakes3rd, adamsilverstein.
Fixes #37846.

git-svn-id: https://develop.svn.wordpress.org/trunk@38612 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-15 16:09:21 +00:00
Helen Hou-Sandi 683f7bc4d3 Customizer: Better hover/focus state for section titles and available widgets.
The 4px border pattern is found in a number of places across the admin, including plugins, notices, and Press This.

props celloexpressions, folletto, hugobaeta.
see #29158.



git-svn-id: https://develop.svn.wordpress.org/trunk@38602 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 16:14:20 +00:00
Gary Pendergast 2950eb8ea2 Formatting: Update `autop()` to match `wpautop()`.
[38592] changed the behaviour of `wpautop()` , so it's nice to change `autop()` to match.

Interestingly, this change isn't necessary for the functionality to work - #4857 didn't affect content that had been run through `autop()` at some point, as `autop()` would add a single line break before block elements, then `wpautop()` would later add a second line break, making it work correctly.

Props nacin for finding out about [38592] on Twitter, and DMing me to remind me to review `autop()`.
See #4857.



git-svn-id: https://develop.svn.wordpress.org/trunk@38594 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 06:02:23 +00:00
Gary Pendergast 7511fe88cc Database: Normalise index names in `dbDelta()`.
When comparing index definitions, normalise the index names to lower case, as they are not case sensitive within MySQL.

Fixes #34874.



git-svn-id: https://develop.svn.wordpress.org/trunk@38591 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-12 05:08:17 +00:00
Gary Pendergast f54b5428c4 Database: Increase the size of `wp_posts.post_password` to 255 characters.
Longer passwords and passphrases are much more common than when post passwords were introduced all those eons ago, so let's increase the length of the `post_password` field from 20 to 255 characters.

The password will continue to be stored in plaintext, as the ability for the post author to view the password is a commonly used feature.

Trivia: this was the last 3 digit Trac ticket to be closed.

Props skippy, nazgul, iandunn, adamsilverstein, pento.
Fixes #881.



git-svn-id: https://develop.svn.wordpress.org/trunk@38590 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-12 02:27:55 +00:00
Weston Ruter 6c8c98fe5b Menus: Prevent non-published posts/pages from being returned in search results for adding as nav menu items.
Re-use the same query vars in searching as when listing posts. Aligns with behavior of nav menus in customizer.

Fixes #33742.
Props welcher, westonruter.


git-svn-id: https://develop.svn.wordpress.org/trunk@38584 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-09 04:59:01 +00:00
Aaron Jorbin 57530f4b73 Permalinks: Ensure Pending Review Posts permalink posts link to the draft
[34670] made the displayed permalink clickable. For posts that were pending review, the permalink wasn't being properly generated so the link wouldn't go to the preview.

Props knutsp, enshrined.
Fixes #37423.



git-svn-id: https://develop.svn.wordpress.org/trunk@38572 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-08 04:04:22 +00:00
Jeremy Felt 8079863586 Media: Sanitize upload filename.
git-svn-id: https://develop.svn.wordpress.org/trunk@38538 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-07 13:54:57 +00:00
Andrea Fercia 2fc85993ca Widgets: Make the Delete/Remove links red.
For consistency and accessibility, all the UI controls that perform destructive
actions should be red.

Props monikarao, lukecavanagh, patilswapnilv, ibachal.
See #35622.
Fixes #37016.


git-svn-id: https://develop.svn.wordpress.org/trunk@38536 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-07 09:51:04 +00:00
Pascal Birchler b87c245902 Upgrade/Install: Sanitize file name in `File_Upload_Upgrader`.
git-svn-id: https://develop.svn.wordpress.org/trunk@38524 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-06 17:25:22 +00:00
Andrea Fercia 02355cbdb5 Accessibility: Improve the Customizer and Theme Installer initial focus.
The Customizer and Theme Installer open in full overlays that need to receive 
focus. Also, keyboard navigation should be constrained within the overlays. Using
CSS `visibility` to hide all the content except the overlays, makes them the only
available and focusable content and allows browsers to handle focus natively.

See #29158.
Fixes #33228, #27705.


git-svn-id: https://develop.svn.wordpress.org/trunk@38520 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-04 21:50:22 +00:00
Weston Ruter f5923b7fe8 Customize: Fix php warning due to `WP_Customize_Manager::prepare_setting_validity_for_js()` incorrectly assuming that `WP_Error` will only ever have arrays in its `$error_data`.
* Eliminates the server mutating the a `WP_Error`'s `$error_data` to merge-in a `$from_server` flag (since it may not be an array to begin with). Instead it defers to the client to add a `fromServer` param on any `Notification` instances created from server-sent errors.
* Ensures that notifications will be re-rendered if a notification's `message` changes but the `data` and `type` remain the same.
* Adds explicit support for the `Notification` class to have a `setting` property, ensuring that the property is set whereas previously it was dropped.

Fixes #37890.
Props westonruter, dlh.


git-svn-id: https://develop.svn.wordpress.org/trunk@38513 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-02 22:34:48 +00:00
Andrea Fercia 770a150b42 Accessibility: Make links in the Customizer underlined by default.
Links within lines or blocks of text should always be underlined since they can't
rely on color alone to be distinguished from the surrounding text. Exceptions
can be handled on a case-by-case basis.

Props Presskopp for the initial patch.
Fixes #37527.


git-svn-id: https://develop.svn.wordpress.org/trunk@38503 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 22:01:44 +00:00
Aaron Jorbin 5387a52a0b Administration: Use a bool when when a bool is called for
The third parameter of `date_i18n` is a bool.  Currently, it's a weak check, otherwise the call showing the universal time on the "General Settings" screen would be messed up. Use an actual bool so we call our own functions correctly.

Fixes #37634.
Props fronaldaraujo.



git-svn-id: https://develop.svn.wordpress.org/trunk@38502 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 18:33:07 +00:00
Aaron Jorbin f9e9854395 Administration: Use #fff instead of `white`
Cleans up a few places where the CSS coding standards were not being followed.

Fixes #37576.
Props Presskopp, johnpgreen, netweb



git-svn-id: https://develop.svn.wordpress.org/trunk@38501 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 18:13:21 +00:00
Sergey Biryukov c43b1d16ae Users: After [33766], don't reset the password when clicking "Show Password" and then "Cancel" on Add New User screen.
Props smerriman for reporting.
Fixes #37902. See #33419.

git-svn-id: https://develop.svn.wordpress.org/trunk@38494 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 12:23:50 +00:00
Weston Ruter db0fedd69f Customize: Introduce `paneVisible` state and ensure pane is visible when a construct is expanded (or focused).
Fixes issue whereby a user would see nothing happen if the pane is collapsed while they shift-click to edit an element in the preview.

Props curdin, celloexpressions, westonruter.
See #27403.
Fixes #36678.


git-svn-id: https://develop.svn.wordpress.org/trunk@38492 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 05:54:32 +00:00
John Blackbourn 2781473733 Taxonomy: Correct the function description for `wp_ajax_add_link_category()`.
See #37770


git-svn-id: https://develop.svn.wordpress.org/trunk@38490 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 00:48:42 +00:00
John Blackbourn f30caa604d Taxonomy: Update various docs for parameters which are now `WP_Term` objects.
See #37770
See #14162


git-svn-id: https://develop.svn.wordpress.org/trunk@38489 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 00:39:44 +00:00
Andrea Fercia 2dcc7bc665 Text Changes: Improve the timezone setting description in General Settings.
Makes more clear users can set either a city or a UTC timezone offset.

Props GrantDerepas, andrew.p.
Fixes #34789.


git-svn-id: https://develop.svn.wordpress.org/trunk@38483 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 21:36:25 +00:00
Sergey Biryukov 6c1e64d76d Users: Pass `$profileuser` parameter to `user_profile_picture_description` filter on "Edit User" screen.
Props turtlepod, deremohan.
Fixes #37379.

git-svn-id: https://develop.svn.wordpress.org/trunk@38481 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 21:12:29 +00:00
Sergey Biryukov 171cea125a Help/About: Remove an outdated help sentence on "My Sites" screen.
Props johnjamesjacoby.
Fixes #37896.

git-svn-id: https://develop.svn.wordpress.org/trunk@38474 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 17:43:07 +00:00
Scott Taylor cba0e2c8f7 Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38470 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 16:30:48 +00:00