Commit Graph

6643 Commits

Author SHA1 Message Date
Sergey Biryukov
d16bdab87d Docs: Correct comment_email duplicate hook reference in wp-admin/includes/class-wp-comments-list-table.php.
Props keesiemeijer.
See #39371.
Built from https://develop.svn.wordpress.org/trunk@39669


git-svn-id: http://core.svn.wordpress.org/trunk@39609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:21:41 +00:00
Sergey Biryukov
179a40d969 Docs: Add missing duplicate hook references in wp-admin/includes/ajax-actions.php.
Props keesiemeijer.
See #39371.
Built from https://develop.svn.wordpress.org/trunk@39668


git-svn-id: http://core.svn.wordpress.org/trunk@39608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:20:44 +00:00
Dion Hulse
6066654967 Updates: Remove a stray " from a tag.
Props afercia.
See #39057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 07:42:42 +00:00
Dion Hulse
4efebd4b71 Filesystem: Add return statement to WP_Filesystem_ftpsockets->rmdir
Props tymvie.
Fixes #39405.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-28 03:52:42 +00:00
Boone Gorges
a3ea7ea2e9 Taxonomy: Eliminate redundant and inaccurate dupe check when creating categories from post.php.
The `term_exists()` check is not needed because of existing dupe
checks in `wp_insert_term()`. Furthermore, `term_exists()` conflates
term names and sanitized slugs, so incorrectly marks terms like
'C' and 'C+' as duplicates of one another.

Props garyc40, SergeyBiryukov, kovshenin, MikeHansenMe.
Fixes #16567.
Built from https://develop.svn.wordpress.org/trunk@39637


git-svn-id: http://core.svn.wordpress.org/trunk@39577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-23 03:11:40 +00:00
Joe McGill
efb191c2ed Media: Allow PDF fallbacks filter to process custom sizes.
This fixes an oversight in [39246], which added a hook for filtering
the array of sizes used for PDF thumbnails, but failed to provide a way
for sizes added through `add_image_size()` to be processed.

Props gitlost.
Fixes #39231. See #38594.
Built from https://develop.svn.wordpress.org/trunk@39617


git-svn-id: http://core.svn.wordpress.org/trunk@39557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 20:30:42 +00:00
John Blackbourn
4548b08236 General: Use interpolation instead of concatenation for all dynamic hook names.
This fixes the rendering of the hook names on developer.wordpress.org.

Props keesiemeijer
Fixes #39148

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


git-svn-id: http://core.svn.wordpress.org/trunk@39540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 04:18:42 +00:00
James Nylen
505e135f4c REST API: Add support for filename search in media endpoint.
In [38625], the functionality to search for attachments by filename was added
via the `posts_clauses` filter and the `_filter_query_attachment_filenames()`
function.  This moves `_filter_query_attachment_filenames()` from
`wp-admin/includes/post.php` to `wp-includes/post.php` so that it can be
applied in the same manner in the REST API media endpoint.

Props jblz, tyxla.
Fixes #39092.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 14:09:42 +00:00
Felix Arntz
72380176dc Multisite: Remove redundant is_super_admin() when checking for edit_others_posts.
The super admin on multisite as well as the administrator on non-multisite both have this capability already. For custom post types using different capabilities this change ensures that only users with that capability have permissions.

Fixes #39059. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 22:09:42 +00:00
Helen Hou-Sandí
9c023fc883 Remove 4.7 cruft from $_old_files.
see #39113.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 17:17:41 +00:00
Gary Pendergast
623ba7e8c9 Load: Re-add locale.php.
`locale.php` is occasionally included directly by custom external code, so should continue to be available. This behaviour is deprecated.

Partial revert of [38364].
See #37827, #39027.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:07:40 +00:00
Gary Pendergast
3487c1bda8 Load: Re-add session.php.
`session.php` is occasionally included directly by custom external code, so should continue to be available. This behaviour is deprecated.

Partial revert of [38373].
See #36335, #39027.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 03:51:41 +00:00
Gary Pendergast
a7ca4b8dde Load: Re-add class-wp-upgrader-skins.php.
`class-wp-upgrader-skins.php` is occasionally included directly by custom external code, so should continue to be available. This is deprecated in favour of including `class-wp-upgrader.php`, instead.

Revert of [38379].
See #36335, #39027.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 03:40:41 +00:00
Gary Pendergast
6f1d48cdf3 Load: Re-add class-feed.php.
`class-feed.php` is occasionally included directly by custom external code, so should continue to be available. This is deprecated in favour of calling `fetch_feed()`, however..

Partial revert of [38374].
See #36335, #39027.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 03:30:42 +00:00
Dominik Schilling
3dc47839db Docs: Document the usage of the global $wpdb in _filter_query_attachment_filenames().
Props mt8.biz.
Fixes #38973.
Built from https://develop.svn.wordpress.org/trunk@39390


git-svn-id: http://core.svn.wordpress.org/trunk@39330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:20:42 +00:00
John Blackbourn
c2d709e9d6 I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment.
See #38882

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


git-svn-id: http://core.svn.wordpress.org/trunk@39266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 02:46:30 +00:00
Sergey Biryukov
1b2ed70f39 I18N: Move the support forums URL in update-related HTTP API error messages to a separate translatable string that is already used elsewhere.
Props ramiy, SergeyBiryukov.
Fixes #38880.
Built from https://develop.svn.wordpress.org/trunk@39325


git-svn-id: http://core.svn.wordpress.org/trunk@39265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:52:32 +00:00
John Blackbourn
4cf5550d8d I18n: Begin introducing translator comments for strings which include placeholders but no accompanying translator comment.
Adds context to one string used in two different contexts for the new user and new site signup email notification.

More to come.

See #38882

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


git-svn-id: http://core.svn.wordpress.org/trunk@39263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:22:32 +00:00
Sergey Biryukov
285a774cad I18N: Remove unnecessary __() calls in _rotate_image_resource() and _flip_image_resource().
Use `_deprecated_function()`'s native strings.

Props ramiy.
Fixes #38862.
Built from https://develop.svn.wordpress.org/trunk@39314


git-svn-id: http://core.svn.wordpress.org/trunk@39254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 02:30:31 +00:00
Sergey Biryukov
acc30b09d7 Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy.
Props ramiy, SergeyBiryukov.
Fixes #38808.
Built from https://develop.svn.wordpress.org/trunk@39278


git-svn-id: http://core.svn.wordpress.org/trunk@39218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 15:53:33 +00:00
Dominik Schilling
e4a83d2e6f Users: In edit_user() fall back to site's locale instead of en_US for invalid user locales.
See #38632, #29783.
Fixes #38798.
Built from https://develop.svn.wordpress.org/trunk@39269


git-svn-id: http://core.svn.wordpress.org/trunk@39209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 20:12:31 +00:00
Andrea Fercia
dff34d5988 Accessibility: Improve the Post Attributes meta box fields labels.
With [38951] the support for custom page templates has been extended to all post
types. By making the visible meta box titles real labels, accessibility improves
for all users and form fields have meaningful labels.

Fixes #38790.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 16:01:30 +00:00
Joe McGill
36ac7287b0 Media: Make PDF preview sizes filterable.
This adds a new filter, `fallback_intermediate_image_sizes`, which
can be used to modify the array of image sizes created for previewing
PDFs in the media library and checks for the existence of sizes before
processing any image representations of a PDF.

Fixes #38594.
Built from https://develop.svn.wordpress.org/trunk@39246


git-svn-id: http://core.svn.wordpress.org/trunk@39186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 13:26:30 +00:00
Dion Hulse
dd0411161d Updates: Allow background updates to update multiple plugins/themes in the same request.
Due to the `clear_update_cache` parameter not being respected, update caches were being cleared incorrectly which prevented multiple plugins to be updated at the same time in background updates - failing with a `fs_unavailable` error message.

Fixes #38024

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


git-svn-id: http://core.svn.wordpress.org/trunk@39151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 09:53:32 +00:00
Dion Hulse
5f7bbe66d7 Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.
Props dd32, swissspidy.
Fixes #38655.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 07:42:31 +00:00
Pascal Birchler
548ac82b06 I18N: Add ability to change user's locale back to site's locale.
Previously there was no way to remove the user locale setting again, even though that might be desirable.

This adds a new 'Site Default' option to the user-specific language setting by introducing a new `show_site_locale_default` argument to `wp_dropdown_languages()`.

Props ocean90.
See #29783.
Fixes #38632.
Built from https://develop.svn.wordpress.org/trunk@39169


git-svn-id: http://core.svn.wordpress.org/trunk@39109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:01:31 +00:00
Drew Jaynes
7eeab12b1a Docs: Notate the incoming $theme object members for WP_Theme_Install_List_Table::single_row() as a proper hash notation.
h/t coffee2code.
See #37770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 20:16:31 +00:00
Helen Hou-Sandí
1281a28382 Customize: Revert theme install feature.
This is a great goal for core, and is close, but it is not in shape to be shipped for 4.7 and there is not enough time left in the development cycle to alter and polish sufficiently. There are bugs, but more than that, there are more fundamental questions around the use of existing UI, general UX, and how findable themes are (not) on the .org side.

see #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:18:26 +00:00
Helen Hou-Sandí
2d07c3196e Only set fresh_site during an actual fresh install.
props westonruter.
fixes #38533.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:16:31 +00:00
Dion Hulse
70b1d2071b Upgrade: Install new themes upon upgrade again.
This partially reverts [35738], which has shown to provide a bad user experience for users seeking to experiment with TwentySeventeen.

This will result in TwentySixteen being installed in addition to TwentySeventeen.

See #38551.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 01:24:35 +00:00
John Blackbourn
0ff0dcc7de Plugins: Correct the since docs for the various plugin_action_links filters.
Props tfrommen, SergeyBiryukov

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


git-svn-id: http://core.svn.wordpress.org/trunk@39005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 19:38:47 +00:00
John Blackbourn
babd79fb36 Posts, Post Types: Prevent users from being able to delete a protected meta field from a post.
Previously a user could remove a protected meta field by using their browser developer tools to alter the form field properties in the Custom Fields meta box, given that they know the ID of the protected meta field. This change prevents this by preventing any change to a protected meta field, including changing its key.

Props ajoah, johnbillion, peterwilsoncc
Fixes #38293

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


git-svn-id: http://core.svn.wordpress.org/trunk@39004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 19:30:32 +00:00
Andrea Fercia
4356a28b52 Administration: remove a leftover check from get_submit_button.
Props sstoqnov.
Fixes #34891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 16:39:32 +00:00
Weston Ruter
75535c596b Customize: Introduce starter content and site freshness state.
A theme can opt-in for tailored starter content to apply to the customizer when previewing the theme on a fresh install, when `fresh_site` is at its initial `1` value. Starter content is staged in the customizer and does not go live unless the changes are published. Initial starter content is added to Twenty Seventeen.

* The `fresh_site` flag is cleared when a published post or page is saved, when widgets are modified, or when the customizer state is saved.
* Starter content is registered via `starter-content` theme support, where the argument is an array containing `widgets`, `posts`, `nav_menus`, `options`, and `theme_mods`. Posts/pages in starter content are created with the `auto-draft` status, re-using the page/post stubs feature added to nav menus and the static front page controls.
* A `get_theme_starter_content` filter allows for plugins to extend a theme's starter content.
* Starter content in themes can/should re-use existing starter content items in core by using named placeholders.
* Import theme starter content into customized state when fresh site.
* Prevent original_title differences from causing refreshes if title is present.
* Ensure nav menu item url is set according to object when previewing.
* Make sure initial saved state is false if there are dirty settings without an existing changeset.
* Ensure dirty settings are cleaned upon changeset publishing.

Props helen, westonruter, ocean90.
Fixes #38114, #38533.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 02:57:35 +00:00
Andrea Fercia
432f5e76b2 Accessibility: Improve the Menus post type meta boxes pagination links.
- adds hidden text to the pagination links
- slightly increases the links clickable area
- fixes a JS error when clicking on the current page number
- avoids to generate nested `<div>` elements at each click 

Props xavortm, cwpnolen, afercia.

Fixes #35577.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 15:23:31 +00:00
Andrea Fercia
6fe17e2a3d Administration: Better accessibility for the "Post locked" indicator.
- hides the locked icon from assistive technologies
- adds hidden text to indicate the post is locked
- moves the info about who's currently editing to the top of the title table cell

Props mariovalney.
Fixes #38185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 17:59:29 +00:00
Dominik Schilling
7819e2b4ba I18N: Introduce a locale-switching function.
With the introduction of user-specific languages in [38705] it's necessary to be able to switch translations on the fly. For example emails should be sent in the language of the recipient and not the one of the current user.

This introduces a new `WP_Locale_Switcher` class which is used for switching locales and translations. It holds the stack of locales whenever `switch_to_locale( $locale )` is called. With `restore_previous_locale()` you can restore the previous locale. `restore_current_locale()` empties the stack and sets the locale back to the initial value.

`switch_to_locale()` is added to most of core's email functions, either with the value of `get_locale()` (site language) or `get_user_locale()` (user language with fallback to site language).

Props yoavf, tfrommen, swissspidy, pbearne, ocean90.
See #29783.
Fixes #26511.
Built from https://develop.svn.wordpress.org/trunk@38961


git-svn-id: http://core.svn.wordpress.org/trunk@38904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 15:36:31 +00:00
Sergey Biryukov
4bd54798ec I18N: Allow for WordPress Plugin Directory URL in plugin details modal to be localized.
Props Soean.
Fixes #38495. See #37501.
Built from https://develop.svn.wordpress.org/trunk@38953


git-svn-id: http://core.svn.wordpress.org/trunk@38896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 12:18:06 +00:00
Pascal Birchler
81a26f6900 Posts, Post Types: Add support for post type templates.
WordPress has supported custom page templates for over 12 years, allowing developers to create various layouts for specific pages.
While this feature is very helpful, it has always been limited to the 'page' post type and not was not available to other post types.

By opening up the page template functionality to all post types, we continue to improve the template hierarchy's flexibility.

In addition to the `Template Name` file header, the post types supported by a template can be specified using `Template Post Type: post, foo, bar`.
When at least one template exists for a post type, the 'Post Attributes' meta box will be displayed in the back end, without the need to add post type support for `'page-attributes'`. 'Post Attributes' can be customized per post type using the `'attributes'` label when registering a post type.

Props johnbillion, Mte90, dipesh.kakadiya, swissspidy.
Fixes #18375.
Built from https://develop.svn.wordpress.org/trunk@38951


git-svn-id: http://core.svn.wordpress.org/trunk@38894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 08:07:30 +00:00
Mike Schroder
a8e304ec8e Media: Add support for rendering PDF thumbnails.
When support for PDFs is available, on upload,
render 'Thumbnail', 'Medium', 'Large', and 'Full' sizes of
the first page, and save them in attachment meta.

Use these renders within Add Media, Media Gallery and List views,
Attachment Details, Post/Attachment Edit screens, and Attachment pages.

Support available by default via Imagick -> ImageMagick -> Ghostscript,
but can be provided by any `WP_Image_Editor` that supports PDFs.

Props adamsilverstein, azaozz, celloexpressions, desrosj, dglingren, ericlewis, ipstenu, joemcgill, joyously, markoheijnen, melchoyce, mikeschroder, tomauger.
Fixes #31050.
Built from https://develop.svn.wordpress.org/trunk@38949


git-svn-id: http://core.svn.wordpress.org/trunk@38892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 07:28:32 +00:00
Dominik Schilling
1159185401 Upgrade: Realign $_new_bundled_files after [38921].
Built from https://develop.svn.wordpress.org/trunk@38922


git-svn-id: http://core.svn.wordpress.org/trunk@38865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:04:31 +00:00
Dominik Schilling
6e08d8303d Upgrade: Add Twenty Seventeen to $_new_bundled_files.
This indicates that Twenty Seventeen should be installed with a WordPress upgrade.

See #38372.
Built from https://develop.svn.wordpress.org/trunk@38921


git-svn-id: http://core.svn.wordpress.org/trunk@38864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:03:03 +00:00
Dominik Schilling
652742bf0a Install: Update sidebars_widgets option for Twenty Seventeen to match its three sidebars.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38919


git-svn-id: http://core.svn.wordpress.org/trunk@38862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:01:13 +00:00
Dion Hulse
2b788037c7 Upgrade: Don't fail a core update just because readme.html or license.txt couldn't be modified.
A number of locked down installs remove `readme.html` or make it inaccessible which would result in an update failure.

Props polevaultweb for the initial patch.
Fixes #31420.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 02:24:31 +00:00
Dion Hulse
e8211f783a Docs: Correct a number of typos/spelling mistakes in inline comments.
Props ottok.
Fixes #38464.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 00:38:35 +00:00
Andrea Fercia
5c555e5d10 Accessibility: Improve the Tags meta box accessibility.
- changes the "X" links in buttons, improves their color contrast ratio and focus style
- adds screen reader text "Remove item: + tagname"
- uses `wp.a11y.speak()` to give screen reader users feedback when adding/removing tags
- makes the `tagcloud-link` toggle a button, with an `aria-expanded` attribute to indicate the tag cloud collapsed/expanded state
- changes colors for the autocomplete highlighted option in order to have a better color contrast ratio
- reduces the font size for the autocomplete on Press This
- removes CSS related to the old `suggest.js` from Press This

Props joedolson, cgrymala, azaozz, afercia.
Fixes #27555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 18:16:42 +00:00
Dominik Schilling
8b3c9607e5 Users: Use self_admin_url() for the email change confirmation link.
Prevents sending users to wp-admin/profile.php if they only have access to wp-admin/user/profile.php.

Props dave.pullig.
Fixes #38451.
Built from https://develop.svn.wordpress.org/trunk@38876


git-svn-id: http://core.svn.wordpress.org/trunk@38819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 14:02:31 +00:00
Pascal Birchler
11a13f147b List Tables: Do not show filter button when there are no filter options available.
Props juhise, dipesh.kakadiya, swissspidy.
Fixes #37407.
Built from https://develop.svn.wordpress.org/trunk@38854


git-svn-id: http://core.svn.wordpress.org/trunk@38797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:33:54 +00:00
John Blackbourn
f5a3446e4d Customize: Improve the labelling of background and header images in the list mode of the media library.
Props deltafactory, coreymcollins, desrosj
Fixes #22857

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


git-svn-id: http://core.svn.wordpress.org/trunk@38774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 23:03:31 +00:00
Pascal Birchler
e4d7dd2b8a Upgrade/Install: Refresh update counts after page load.
By enqueuing the updates script in the footer and passing the number of available updates to it after page load, the update bubbles will be more accurate.

Props ocean90, swissspidy.
Fixes #13071.
Built from https://develop.svn.wordpress.org/trunk@38827


git-svn-id: http://core.svn.wordpress.org/trunk@38770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 10:27:29 +00:00
Pascal Birchler
39433ad092 Dashboard: Do not show 'Popular Plugin' UI if DISALLOW_FILE_MODS is set.
Props Mte90.
Fixes #37436.
Built from https://develop.svn.wordpress.org/trunk@38825


git-svn-id: http://core.svn.wordpress.org/trunk@38768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 08:44:30 +00:00
Jeremy Felt
7eece8b106 Multisite: Replace get_blog_details() usage in wpmu_delete_blog() with get_site().
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38346.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:50:28 +00:00
Jeremy Felt
be6e98426b Multisite: Replace get_blog_details() in WP_Importer::set_blog() with get_site().
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:45:31 +00:00
Jeremy Felt
1560fbcbc5 Multisite: Use get_network() and get_current_network_id() for current network data.
`get_network()` falls back to the current network when called without any arguments. Between this and `get_current_network_id()`, we can replace almost all instances of the global `$current_site` and all instances of `get_current_site()`.

This effectively deprecates `get_current_site()`, something that we'll do in a future ticket.

Props flixos90.
Fixes #37414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 04:47:30 +00:00
Weston Ruter
1c3b96537f Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context.

For details, see https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/

Fixes #37661, #34843.
Props celloexpressions, folletto, westonruter, karmatosed, afercia.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 03:20:29 +00:00
Pascal Birchler
1e54943b0f Docs: Improve documentation for install_plugin_install_status().
Props clarionwpdeveloper, sudar.
Fixes #36912.
Built from https://develop.svn.wordpress.org/trunk@38805


git-svn-id: http://core.svn.wordpress.org/trunk@38748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 08:30:29 +00:00
Andrew Ozz
d91da52588 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.
Built from https://develop.svn.wordpress.org/trunk@38797


git-svn-id: http://core.svn.wordpress.org/trunk@38740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 22:40:28 +00:00
Andrea Fercia
da4da31af1 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 21:33:28 +00:00
Pascal Birchler
a60ac4684b 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.
Built from https://develop.svn.wordpress.org/trunk@38788


git-svn-id: http://core.svn.wordpress.org/trunk@38731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 13:33:29 +00:00
Andrea Fercia
1905ea030a 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 16:26:12 +00:00
Dominik Schilling
5fd943f49c Menus: Hide controls in the search tab if no items are found.
Props sayedwp, afercia, tywayne, abrightclearweb.
Fixes #35576.
Built from https://develop.svn.wordpress.org/trunk@38754


git-svn-id: http://core.svn.wordpress.org/trunk@38697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:56:29 +00:00
Pascal Birchler
ef8f9168b6 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.
Built from https://develop.svn.wordpress.org/trunk@38747


git-svn-id: http://core.svn.wordpress.org/trunk@38690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 17:12:29 +00:00
Joe McGill
eed325bbc2 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.
Built from https://develop.svn.wordpress.org/trunk@38734


git-svn-id: http://core.svn.wordpress.org/trunk@38677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 19:57:28 +00:00
Joe McGill
173f9b6f22 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.
Built from https://develop.svn.wordpress.org/trunk@38733


git-svn-id: http://core.svn.wordpress.org/trunk@38676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 19:51:30 +00:00
Dion Hulse
b83a62217e Plugins: Display 'Less Than 10' active installs of a plugin rather than '0+' active installs.
Props ovann86.
Fixes #37509.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 03:33:29 +00:00
Konstantin Obenland
6335e08ab2 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.
 

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


git-svn-id: http://core.svn.wordpress.org/trunk@38653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 18:13:31 +00:00
Pascal Birchler
4a88d55054 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.
Built from https://develop.svn.wordpress.org/trunk@38705


git-svn-id: http://core.svn.wordpress.org/trunk@38648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 07:04:29 +00:00
Pascal Birchler
bd03add624 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.
Built from https://develop.svn.wordpress.org/trunk@38704


git-svn-id: http://core.svn.wordpress.org/trunk@38647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 06:42:29 +00:00
Weston Ruter
f424977028 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 02:35:28 +00:00
Andrea Fercia
5ab4753564 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-02 14:38:31 +00:00
John Blackbourn
b84023ea33 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

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


git-svn-id: http://core.svn.wordpress.org/trunk@38641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:40:28 +00:00
Ryan McCue
7cd7c828cc 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 15:53:29 +00:00
Ryan McCue
e53b79b726 Options: Add missing since for register_setting argument.
[38635] added support for extra arguments on registration, but was not documented.

See #37885.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 21:12:27 +00:00
Joe McGill
498040b809 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.
Built from https://develop.svn.wordpress.org/trunk@38673


git-svn-id: http://core.svn.wordpress.org/trunk@38616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 01:21:31 +00:00
Andrea Fercia
eeefec932f 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00
Sergey Biryukov
ee109482db Text Changes: Unify two more permission error messages.
Props ramiy.
Fixes #38158. See #34521.
Built from https://develop.svn.wordpress.org/trunk@38666


git-svn-id: http://core.svn.wordpress.org/trunk@38609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 00:17:28 +00:00
Eric Lewis
d27606936b 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 20:33:30 +00:00
Joe Hoyle
2ec9f4b369 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.



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


git-svn-id: http://core.svn.wordpress.org/trunk@38578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 20:52:28 +00:00
Joe McGill
8f36a570cb 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.
Built from https://develop.svn.wordpress.org/trunk@38625


git-svn-id: http://core.svn.wordpress.org/trunk@38568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 01:45:31 +00:00
Sergey Biryukov
94ff5710ce Docs: Correct two references to plugins in the $args parameter description for themes_api().
Props hideokamoto.
Fixes #37939.
Built from https://develop.svn.wordpress.org/trunk@38623


git-svn-id: http://core.svn.wordpress.org/trunk@38566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-19 16:46:30 +00:00
Sergey Biryukov
05a947c05a Docs: Correct a comment and @return entry in WP_Upgrader::create_lock().
Props markshep.
Fixes #38089.
Built from https://develop.svn.wordpress.org/trunk@38622


git-svn-id: http://core.svn.wordpress.org/trunk@38565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 20:16:29 +00:00
Andrea Fercia
ea69657b59 Plugins: style the primary action link in the non-js "Installing Plugin" page.
Props curdin, ericlewis, melchoyce, karmatosed.
Fixes #36430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 16:23:27 +00:00
Andrea Fercia
576bdf9f8c 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 15:39:30 +00:00
Aaron Campbell
405def3da4 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 05:42:31 +00:00
Gary Pendergast
a18b133c01 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 05:09:30 +00:00
Gary Pendergast
65fa220a08 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 02:28:30 +00:00
Weston Ruter
84f9592f88 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 04:59:31 +00:00
Aaron Jorbin
7e811d7120 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 04:05:31 +00:00
Jeremy Felt
c9e60dab17 Media: Sanitize upload filename.
Built from https://develop.svn.wordpress.org/trunk@38538


git-svn-id: http://core.svn.wordpress.org/trunk@38481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-07 13:55:36 +00:00
Pascal Birchler
54720a14d8 Upgrade/Install: Sanitize file name in File_Upload_Upgrader.
Built from https://develop.svn.wordpress.org/trunk@38524


git-svn-id: http://core.svn.wordpress.org/trunk@38465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-06 17:26:31 +00:00
John Blackbourn
69c152cee7 Taxonomy: Correct the function description for wp_ajax_add_link_category().
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 00:49:29 +00:00
John Blackbourn
01c3ae084b Taxonomy: Update various docs for parameters which are now WP_Term objects.
See #37770
See #14162

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


git-svn-id: http://core.svn.wordpress.org/trunk@38430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 00:40:29 +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
0eebbed6b2 General: revert [38467], wp_is_IE() should not exist.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 15:22:31 +00:00
Scott Taylor
021e23e70b General: use a new function, wp_is_IE(), instead of the $is_IE global in a number of places.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:42:33 +00:00
Scott Taylor
0419d1e318 Press This: in wp_ajax_press_this_save_post() and wp_ajax_press_this_add_category(), don't check for a global instance. WP_Press_This is a Controller, but not really a Singleton. This also keeps it from being a pluggable class, which it is right now.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:25:29 +00:00
Scott Taylor
1dc37b77ef Press This: in get_shortcut_link(), just check a class constant on WP_Press_This instead of instantiating the object and reading an instance prop.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:08:00 +00:00
Scott Taylor
9383bf8f74 General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 05:49:37 +00:00
Scott Taylor
e5225324a2 Multisite: use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 04:55:54 +00:00
Scott Taylor
5d94d97b29 List Tables: AJAX actions for List Tables do not need to declare global $wp_list_table. List tables on admin screens are in global scope, and they contain hooks that don't pass the the list table as context, hence using globals there so that functions can import them. That problem does not exist in the AJAX actions, which are virtually impossible to hook into as is.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 20:07:29 +00:00
Andrea Fercia
99be6ffd3c Accessibility: Hide the "No activity yet" smiley from assistive technologies.
Fixes #37511.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 16:14:30 +00:00
John Blackbourn
dbdc1c28b1 I18N: Correct various instances of incorrect usage of esc_attr_e().
Fixes #37457
Props henry.wright, afercia

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


git-svn-id: http://core.svn.wordpress.org/trunk@38365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:06:30 +00:00
Pascal Birchler
ac83e26875 Upgrade/Install: After [37687], fix the number of params passed to the upgrade hooks.
`wp_version_check()`, `wp_update_plugins()` and `wp_update_themes()` are all originally hooked to the `upgrader_process_complete` action with zero arguments passed to them. Zero arguments should be passed when re-adding them after translation updates, otherwise the sky will fall.

Props ionutst, gitlost.
Fixes #37731.
Built from https://develop.svn.wordpress.org/trunk@38415


git-svn-id: http://core.svn.wordpress.org/trunk@38356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 10:04:30 +00:00
Scott Taylor
f96fff3c9d Admin: allow WP_Screen to be checked via autoload in convert_to_screen().
Props kraftbj.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 02:25:27 +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
Scott Taylor
85d63f2af5 Press This: the file for the WP_Press_This class should not produce side effects. Similar to what we did in r38355 for WP_Site_Icon, drop the instances of global instantiation for $wp_press_this via loading the file. The variable can be set inline when necessary. In most of those places, if the global is already set, the file does not load and stomp it currently.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 06:07:29 +00:00
Scott Taylor
06aa510d56 List Tables: move _WP_List_Table_Compat into its own file.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 22:23:29 +00:00
Scott Taylor
11216c7069 FTP: ensure that there is only one class named ftp, which is what is expected in the loading of this arcane library. This ensures that an autoload generator, something along the lines of Composer, won't hiccup when it gets to these files.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 18:47:29 +00:00
Scott Taylor
b1c6049be4 Upgrade/Install: wp-admin/includes/class-wp-upgrader-skins.php is unused, remove it. All of the same includes are loaded in class-wp-upgrader.php.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 18:25:30 +00:00
Scott Taylor
76c7864367 Load: remove class-feed.php (There is no class named Feed or WP_Feed, it just loads other classes) and, instead, move the require calls to the only place they are ever included: inside fetch_feed(). This simplifies the include path.
Tested with this feed in a widget: `http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml`.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 17:53:30 +00:00
Scott Taylor
524effb58f Load: remove session.php and, instead, move the 2 require calls to wp-settings.php. This simplifies the include path.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 17:45:17 +00:00
John Blackbourn
94c8ca0f2e Docs: Correct various documentation around object and stdClass types.
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 16:49:45 +00:00
Scott Taylor
6d87157eb9 i18n: move is_rtl() to l10n.php (which loads way earlier). Load WP_Locale file in wp-settings.php. Retire wp-includes/locale.php - it only loaded the class and the one function, is_rtl(). If someone loaded this file for fun somewhere else, it would be a fatal error.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 10:20:29 +00:00
Scott Taylor
ff59281441 OEmbed: move _wp_oembed_get_object() to embed.php, where all of the other embed functions live. WP_oEmbed is then in a file by itself. Load class-oembed.php in wp-settings.php and remove extraneous include calls.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:49:28 +00:00
Scott Taylor
9ce58d9d86 Site Icon: There is no good reason for class-wp-site-icon.php to drop a global instance of itself whenever the file is loaded. The lone use of the global instance of WP_Site_Icon is in an AJAX action that provides virtually no way to override - the file is loaded immediately before the global is used.
Let us remove the `$wp_site_icon` global. I will fall on the sword if this comes back to bite us (waiting with bated breath).

See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 19:09:35 +00:00
Scott Taylor
b7812bd416 AJAX: add a new function, wp_doing_ajax(), which can replace... (wait for it...) DOING_AJAX checks via the constant.
Props Mte90, sebastian.pisula, swissspidy.
Fixes #25669.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:33:30 +00:00
Scott Taylor
6f9f3b0c56 Media: remove function_exists() call for ini_get() in _load_image_to_edit_path().
Props dd32.
Fixes #37681.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:24:30 +00:00
Sergey Biryukov
92343be1f4 I18N: Allow for WordPress Plugin/Theme Directory URLs to be localized.
Props ramiy.
Fixes #37501.
Built from https://develop.svn.wordpress.org/trunk@38325


git-svn-id: http://core.svn.wordpress.org/trunk@38266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 01:19:39 +00:00
Sergey Biryukov
fee26cf741 I18N: Replace unnecessary context with a translator comment for %s Sites string in network_step1().
Props ramiy.
Fixes #37777.
Built from https://develop.svn.wordpress.org/trunk@38323


git-svn-id: http://core.svn.wordpress.org/trunk@38264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 00:17:27 +00:00
Scott Taylor
5025f72fd3 Nav Menus: remove unnecessary variable assignment in wp_nav_menu_item_post_type_meta_box().
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 20:58:28 +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
Scott Taylor
d31456b615 Media: add a function, wp_get_additional_image_sizes(), that wraps the retrieval of the global $_wp_additional_image_sizes. Removes 6 global imports.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 04:37:28 +00:00
Scott Taylor
7ac88c02fa Media: when calling pathinfo(), also pass a PATHINFO_* constant to avoid array notices for unset keys.
Props JaworskiMatt.
Fixes #37608.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 23:36:28 +00:00
John Blackbourn
594b88661a Permalinks: Correct the documentation for the get_sample_permalink filter, and improve the documentation for the get_sample_permalink() function.
Props sebastian.pisula for the original patch
Fixes #37682

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


git-svn-id: http://core.svn.wordpress.org/trunk@38213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-17 18:30:30 +00:00
Drew Jaynes
1691196110 Docs: Add a period missed in an argument description in [38253] for #36338.
Built from https://develop.svn.wordpress.org/trunk@38254


git-svn-id: http://core.svn.wordpress.org/trunk@38195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-13 17:44:28 +00:00
Drew Jaynes
51810b926a Docs: Add documentation for all arguments accepted by export_wp().
Props theMikeD for the initial patch.
Fixes #36338.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-13 17:43:28 +00:00
Dominik Schilling
0d2106e2eb Upgrader: Rename class-wp-automatic-upgrader.php to class-wp-automatic-updater.php.
The class is named `WP_Automatic_Updater` not `WP_Automatic_Upgrader` like all the other upgrader classes. 

Introduced in [37409].
See #37628.
Built from https://develop.svn.wordpress.org/trunk@38242


git-svn-id: http://core.svn.wordpress.org/trunk@38183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-10 19:51:29 +00:00
Andrew Ozz
0d4320fcbc Update/Install error messages: do not escape from the template, escape the error message string before inserting it.
Props swissspidy, ocean90.
Fixes #37623 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38240


git-svn-id: http://core.svn.wordpress.org/trunk@38181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-10 19:03:31 +00:00
Dominik Schilling
771fc167b6 Media: In _wp_handle_upload() use call_user_func_array() to call the upload error handler.
The default error handler `wp_handle_upload_error()` expects a reference for the first parameter but `call_user_func()` doesn't pass parameters by reference. The current code didn't produce any issues until now. PHP 7.0.9 (and PHP 7.1) is now stricter and prevents calling the error handler with a warning:
> PHP Warning:  Parameter 1 to wp_handle_upload_error() expected to be a reference, value given.

To restore the error handler `_wp_handle_upload()` now uses `call_user_func_array()`.

Props jbrinley.
Props jorbin for review.
Fixes #37570.
Built from https://develop.svn.wordpress.org/trunk@38235


git-svn-id: http://core.svn.wordpress.org/trunk@38176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 21:54:30 +00:00
Dominik Schilling
9970c6ca5a Dashboard: Don't escape widget titles in screen reader text.
Introduced in [37972]. The title for the Quick Draft widget contains HTML to provide a JS/no-JS version.

Props SergeyBiryukov for review.
See #37595.
Fixes #37594.
Built from https://develop.svn.wordpress.org/trunk@38225


git-svn-id: http://core.svn.wordpress.org/trunk@38166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 09:07:30 +00:00
Aaron Jorbin
b3b32f22a1 Updates: Improve experience for Bulk Actions when FTP is dismissed.
Before this change, when a bulk update was canceled due dismissing the FTP credentials modal, part of the actions didn't get canceled.  This meant the "There is a new version of…” notices become blank and the updates you had checked became unchecked.  Now, the notices remain and you are essentially returned to the screen you had before. Strings are also updated to improve ARIA usage.

Fixes #37563.
Props ocean90, swissspidy, obenland, afercia.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 01:14:28 +00:00
Dominik Schilling
572a9cb488 Update/Install: Replace "error" and "-1" failure messages with a more meaningful one.
* "-1" is an invalid nonce error, show 'An error has occurred. Please reload the page and try again.'.
* "error" means that the connection to the server was lost, show 'Connection lost or the server is busy. Please try again later.'.
* Escape the message in `wp-updates-admin-notice` because the response may include HTML.
* Remove HTML tags in `wp.updates.isValidResponse()` to make PHP's error messages more readable.

Props azaozz for review.
Fixes #37583.
Built from https://develop.svn.wordpress.org/trunk@38205


git-svn-id: http://core.svn.wordpress.org/trunk@38146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-05 19:28:30 +00:00
John Blackbourn
ab052361a3 Docs: Correct and clarify various @since docs.
Fixes #37562

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


git-svn-id: http://core.svn.wordpress.org/trunk@38142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 22:54:31 +00:00
Dominik Schilling
58d772a02f Upgrade/Install: Make some install/update failures more verbose.
An upgrader class is used in conjunction with an upgrader skin class. A skin class handles the logging for an upgrade and informs a user about the progress and failures.
The current Ajax install/update handlers are using the `Automatic_Upgrader_Skin` class because during an Ajax request no output is intended. The difference between Ajax updates and automatic updates is that you will see the full log (usually by email) while Ajax updates focus only on success or failure. For that `Automatic_Upgrader_Skin` has one disadvantage: It doesn't provide a way to retrieve failure messages which were passed through `WP_Upgrader_Skin::error()` by the upgrader.
To solve this issue a new skin `WP_Ajax_Upgrader_Skin` has been introduced. The skin extends `Automatic_Upgrader_Skin` and overrides the `error()` and `feedback()` methods to intercept all errors, which can be a `WP_Error` object or a string.

This updates all four Ajax handler for installing/updating themes/plugins to use the new skin. They now also check the skin for any intercepted errors and pass them on to the user.

Props flixos90, obenland, ocean90.
Props DrewAPicture, pento for review.
Fixes #37531.
Built from https://develop.svn.wordpress.org/trunk@38199


git-svn-id: http://core.svn.wordpress.org/trunk@38140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 22:18:30 +00:00
Aaron Jorbin
94ac1499cf Updates: Improve bulk update failure notice
When doing a bulk update, if there are failures the user needs to know about that. This makes it clearer that you can click on the notification to see more details, especially for screen reader users.

Fixes #37510.
Props  juhise, Ankit K Gupta, afercia, jorbin, ocean90. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@38126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 22:24:35 +00:00
Dominik Schilling
1abd5f0be7 Plugins: Use install_plugins_upload action to print the upload form.
Since [37221] the upload form is added to every plugin install screen via `install_plugins_upload()`. Previously the form was added through the `install_plugins_upload` (alias of `install_plugins_$tab`) action which allowed plugin authors to replace the form. This restores the previous behaviour.

* Add the form only to non-upload plugin install screens.
* Replace `install_plugins_upload()` with the `install_plugins_upload` and `install_plugins_pre_upload` actions.
* Remove `$upload_tab_class` and add a CSS class for the current tab to `.wrap`
* Adjust CSS selectors and toggle the whole container to support upload without an `upload-plugin` class.

Props DavidAnderson, ocean90.
Fixes #37495.
Built from https://develop.svn.wordpress.org/trunk@38172


git-svn-id: http://core.svn.wordpress.org/trunk@38113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-31 18:11:29 +00:00
Dominik Schilling
3105764efd Plugins: Move capability checks further up in wp_ajax_update_plugin() and wp_ajax_delete_plugin().
Add tests for both Ajax handlers.

Props Yorick Koster, swissspidy.
Fixes #37490.
Built from https://develop.svn.wordpress.org/trunk@38168


git-svn-id: http://core.svn.wordpress.org/trunk@38109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 17:44:41 +00:00
Dominik Schilling
e4abc1ecbf Filesystem API: Output buffering for request_filesystem_credentials() should wrap the function directly.
Previously `ob_end_clean()` was only called when the previous condition was successful which led to unexpected results when another output buffering was involved, like PHPUnit's.

Fixes #37488.
Built from https://develop.svn.wordpress.org/trunk@38167


git-svn-id: http://core.svn.wordpress.org/trunk@38108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 17:11:56 +00:00
Andrew Ozz
5bccb0020d TinyMCE, inline link:
- Remove proxying through WordPress to test if an URL exists.
- Fix and enhance the regex that tests if the URL is well formed.

Fixes #36638.
Built from https://develop.svn.wordpress.org/trunk@38159


git-svn-id: http://core.svn.wordpress.org/trunk@38100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 23:24:28 +00:00
Dominik Schilling
d7253ca244 Filesystem API: Prevent an endless self-calling loop in wp_tempnam().
Under certain conditions upgrades on Windows may fail because `wp_tempnam()` gets called in a loop.
This can happen when `wp_tempnam()` is called with `\.maintenance` for the `$filename` parameter. The function strips the extension, in this case `.maintenance`, which results in an empty filename. Because it's empty, `wp_tempnam()` calls itself with `dirname( '\.maintenance' )`. On *nix systems this would be `"/"` which allows `wp_tempnam()` to fall back on `time()`. But on Windows it's `"\"`.

This change adds the backslash to the list of characters which allow `wp_tempnam()` to fall back on `time()`.

See [32322], [31936].
Fixes #33999.
Built from https://develop.svn.wordpress.org/trunk@38151


git-svn-id: http://core.svn.wordpress.org/trunk@38092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-25 15:28:29 +00:00
Sergey Biryukov
fdc07533f5 Plugins: Add a missing space between classes on <td> element for custom columns of the Plugins list table.
Props crstauf.
Fixes #37460.
Built from https://develop.svn.wordpress.org/trunk@38149


git-svn-id: http://core.svn.wordpress.org/trunk@38090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-25 13:28:28 +00:00
Sergey Biryukov
a7a8585640 Posts, Post Types: Remove a redundant function_exists( 'mb_strlen' ) check in get_sample_permalink_html().
`mb_strlen()` is always available since [32114].

See #30633.
Built from https://develop.svn.wordpress.org/trunk@38147


git-svn-id: http://core.svn.wordpress.org/trunk@38088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-23 13:08:44 +00:00
Dominik Schilling
51671afc0a List Table: Improve WP_Plugins_List_Table::search_box() which was added in [38033].
* Update DocBlock to use third-person singular verb and to include a period at the end.
* Use `submit_button()` for the submit button.
* Escape the ID attribute.
* Apply the same to `WP_List_Table::search_box()`.

See #37230.
Built from https://develop.svn.wordpress.org/trunk@38146


git-svn-id: http://core.svn.wordpress.org/trunk@38087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-23 11:00:36 +00:00
Sergey Biryukov
995dc513a4 Docs: Update the description of the $box argument of wp_nav_menu_item_taxonomy_meta_box() for consistency with [38129].
Missed in [38130].

See #37211.
Built from https://develop.svn.wordpress.org/trunk@38142


git-svn-id: http://core.svn.wordpress.org/trunk@38083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 16:50:28 +00:00
Dominik Schilling
50ca05f8cd Plugins: Make search field placeholder translatable.
See #37230.
Built from https://develop.svn.wordpress.org/trunk@38141


git-svn-id: http://core.svn.wordpress.org/trunk@38082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 14:51:28 +00:00
Dominik Schilling
06c71ee6ec Docs: Fix minor formatting issue for a comment added in [38113].
See #32171.
Built from https://develop.svn.wordpress.org/trunk@38139


git-svn-id: http://core.svn.wordpress.org/trunk@38080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 13:46:28 +00:00
Dominik Schilling
3a3828c396 Filesystem API: Change the default value for the $context parameter of get_filesystem_method() and request_filesystem_credentials() to an empty string.
`$context` is a full path to the directory that is tested for being writable. A path shouldn't be a boolean value.
This also updates `WP_Upgrader_Skin::request_filesystem_credentials()` and `Automatic_Upgrader_Skin::request_filesystem_credentials()` and adds missing docs.

Props DrewAPicture, ocean90.
Fixes #37412.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 12:10:27 +00:00
Dominik Schilling
eb0ee24750 Post Thumbnails: Remove an unused nonce in _wp_post_thumbnail_html().
See #12922.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 11:44:28 +00:00
Dominik Schilling
c4dfc0adba Media: Remove global import for $content_width in _wp_post_thumbnail_html().
`$content_width` is unused since [35023].

See #28512.
Built from https://develop.svn.wordpress.org/trunk@38136


git-svn-id: http://core.svn.wordpress.org/trunk@38077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 11:40:28 +00:00
Dominik Schilling
a20e16d3c6 Docs: Change type of WP_Upgrader_Skin::$result to 'string|bool|WP_Error'.
`$result` can be `true` too, see `Language_Pack_Upgrader::bulk_upgrade()`.

See #32246.
Built from https://develop.svn.wordpress.org/trunk@38134


git-svn-id: http://core.svn.wordpress.org/trunk@38075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 10:43:29 +00:00
Sergey Biryukov
0a9bfead1c Docs: In meta box functions, clarify that "Meta box ID" refers to the id attribute of the meta box and not a numeric ID.
Fixes #37211.
Built from https://develop.svn.wordpress.org/trunk@38131


git-svn-id: http://core.svn.wordpress.org/trunk@38072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 19:24:28 +00:00
Sergey Biryukov
97fd7d829f Menus: In wp_nav_menu_item_taxonomy_meta_box():
* Rename the `$taxonomy` parameter to `$box` for clarity and consistency with other meta box functions.
* Make the docs more consistent with `post_categories_meta_box()` and other meta box functions.

See #37211.
Built from https://develop.svn.wordpress.org/trunk@38130


git-svn-id: http://core.svn.wordpress.org/trunk@38071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 19:21:28 +00:00
Sergey Biryukov
5fd308db50 Menus: In wp_nav_menu_item_post_type_meta_box():
* Rename the `$post_type` parameter to `$box` for clarity and consistency with other meta box functions.
* Make the docs more consistent with `post_format_meta_box()` and other meta box functions.
* Correct type and description for the third argument of `nav_menu_items_{$post_type_name}_recent` filter.

See #37211.
Built from https://develop.svn.wordpress.org/trunk@38129


git-svn-id: http://core.svn.wordpress.org/trunk@38070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 19:19:29 +00:00
Sergey Biryukov
550bc85e06 Docs: Correct and expand the docs for the $taxonomy argument of wp_nav_menu_item_taxonomy_meta_box().
Props mehulkaklotar for initial patch.
See #37211.
Built from https://develop.svn.wordpress.org/trunk@38128


git-svn-id: http://core.svn.wordpress.org/trunk@38069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 18:01:29 +00:00
Sergey Biryukov
6bcbeb858d Docs: Correct and expand the docs for the $post_type argument of wp_nav_menu_item_post_type_meta_box().
Props mehulkaklotar for initial patch.
See #37211.
Built from https://develop.svn.wordpress.org/trunk@38127


git-svn-id: http://core.svn.wordpress.org/trunk@38068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 18:00:32 +00:00
Andrew Ozz
04319a7898 TinyMCE, link check:
- Use `wp.a11y.speak()` to announce bad URLs.
- Do not add a title to the link toolbar.
- Better error message.

Props afercia, azaozz.
See #36638.
Built from https://develop.svn.wordpress.org/trunk@38126


git-svn-id: http://core.svn.wordpress.org/trunk@38067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 03:42:34 +00:00
Dominik Schilling
868804db15 Plugins: Improve Ajax search of new plugins.
Fixes a few accessibility issues, restores the "Search Results" tab and the search type selector, and improves compatibility with older browsers.

Props rahulsprajapati, swissspidy, adamsilverstein, ocean90
See #37233.
Built from https://develop.svn.wordpress.org/trunk@38119


git-svn-id: http://core.svn.wordpress.org/trunk@38060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 16:32:31 +00:00
Joe McGill
3dbba0fff3 Post Thumbnails: Only update featured images when saving a post.
Previously, changing the post thumbnail of a published post in the edit screen
would immediately apply the change, rather than waiting for the post to be
saved before applying the update. This could lead to someone unintentionally
editing the post thumbnail on a published post, and made it impossible to
preview changes to post thumbnails on published posts before saving the change.

This introduces a new Ajax handler, `wp_ajax_get_post_thumbnail_html()` to
retrieve the HTML for the post thumbnail meta box without updating the post
meta value for `_thumbnail_id`. It also allows post thumbnail changes to be
previewed by passing the `_thumbnail_id` as a query variable to the preview
screen and adding a new filter, `_wp_preview_post_thumbnail_filter()`, which
gets applied to `get_post_metadata` during the post preview process.

Props flixos90.
Fixes #12922.
Built from https://develop.svn.wordpress.org/trunk@38118


git-svn-id: http://core.svn.wordpress.org/trunk@38059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 16:24:28 +00:00
Mike Schroder
1736b7b29c Media: Clean up prior image edits if IMAGE_EDIT_OVERWRITE is true.
When `IMAGE_EDIT_OVERWRITE` is set to true, edited image files are
supposed to be deleted when an image is restored to the original.

However, when an image was edited more than once, and then restored,
files created during previous edits were left behind.

Fixes this behavior by updating `wp_save_image()` to clean up
leftover images after each edit when `IMAGE_EDIT_OVERWRITE` is true.

Props bradt, chriscct7, joemcgill.
Fixes #32171.
Built from https://develop.svn.wordpress.org/trunk@38113


git-svn-id: http://core.svn.wordpress.org/trunk@38054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 07:35:28 +00:00
Sergey Biryukov
6c7a60ffb4 Permalinks: In wp_install_maybe_enable_pretty_permalinks():
* Use `get_page_by_path()` instead of a hardcoded ID, which may not always exist.
* Remove the "test against a random 404 page" part, which is no longer relevant after [34442].

Fixes #36628.
Built from https://develop.svn.wordpress.org/trunk@38109


git-svn-id: http://core.svn.wordpress.org/trunk@38050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 23:12:32 +00:00
Dominik Schilling
f645178391 Filesystem API: Ensure memory limit calculations by PclZip are using integers.
This prevents a warning in PHP trunk, see https://wiki.php.net/rfc/invalid_strings_in_arithmetic.

See #36435.
Built from https://develop.svn.wordpress.org/trunk@38101


git-svn-id: http://core.svn.wordpress.org/trunk@38042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 11:55:30 +00:00
Dominik Schilling
d59bcc98df Filesystem API: Cleanup temporary file when the temporary file couldn't be opened.
Props ruud@joyo.
See #34772.
Fixes #36942, #36943.
Built from https://develop.svn.wordpress.org/trunk@38094


git-svn-id: http://core.svn.wordpress.org/trunk@38035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 19:43:30 +00:00
Dominik Schilling
a320320ea0 Plugins: Use the correct admin screen when searching for plugins via Ajax.
Both list tables provide different actions based on where they are loaded, regular admin or network admin. Since there is only one Ajax handler for both screens we have to set the current screen before using the list tables.

Props swissspidy, ocean90.
Fixes #37373.
Built from https://develop.svn.wordpress.org/trunk@38091


git-svn-id: http://core.svn.wordpress.org/trunk@38032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 14:00:34 +00:00
Sergey Biryukov
fd2d9ef63b I18N: Remove non-translatable link attributes from translatable strings in wp_plugin_update_row(), wp_theme_update_row(), and get_theme_update_available().
The resulting strings are much easier to translate.

See #36048.
Built from https://develop.svn.wordpress.org/trunk@38082


git-svn-id: http://core.svn.wordpress.org/trunk@38023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 21:03:31 +00:00
Sergey Biryukov
2d19f94fac Text Changes: Change Network deactivate %s to upper case, for consistency with Network Activate %s.
See #37290.
Built from https://develop.svn.wordpress.org/trunk@38081


git-svn-id: http://core.svn.wordpress.org/trunk@38022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 17:04:32 +00:00
Sergey Biryukov
7d421dbe42 Text Changes: Add a full stop to "Invalid taxonomy" and "Invalid term ID" strings, for consistency with similar post-related messages.
See #18218, #32329.
Built from https://develop.svn.wordpress.org/trunk@38077


git-svn-id: http://core.svn.wordpress.org/trunk@38018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 16:15:34 +00:00
Dominik Schilling
d5cb80dd7f Import: Enhance accessibility on the Import screen.
* Remove title attributes.
* Show "Install Now" and "Details" links if the importer isn't installed yet.
* Show a "Run Importer" link if the importer is installed. It also handles activation if the plugin isn't activated.
* Add `aria-label` attributes to each link.
* Unify the importer descriptions to make them independent from the plugin state. The API was changed in [meta3690].
* Adjust JavaScript callbacks for ajaxified importer installs.

Props afercia, swissspidy, ocean90.
See #24766.
Fixes #35191.
Built from https://develop.svn.wordpress.org/trunk@38075


git-svn-id: http://core.svn.wordpress.org/trunk@38016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 15:32:30 +00:00
Sergey Biryukov
48f9940cfc I18N: Change unnecessary uppercased words in WP_Upgrader::generic_strings() to lower case.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38074


git-svn-id: http://core.svn.wordpress.org/trunk@38015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 13:29:29 +00:00
Sergey Biryukov
f429056194 I18N: Combine two duplicate "Unable to locate WordPress Theme directory" strings.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38073


git-svn-id: http://core.svn.wordpress.org/trunk@38014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 12:58:28 +00:00
Sergey Biryukov
0be3a84ad0 I18N: After [38057], consistently use a context for other instances of Activate %s, Network Activate %s, and Delete %s strings.
See #37290.
Built from https://develop.svn.wordpress.org/trunk@38071


git-svn-id: http://core.svn.wordpress.org/trunk@38012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-16 23:20:29 +00:00
Dominik Schilling
98d03cb738 Update/Install: Give context to some install/update strings to allow for differentiation between theme and plugin translations.
Props swissspidy, SergeyBiryukov.
Fixes #37290.
Built from https://develop.svn.wordpress.org/trunk@38057


git-svn-id: http://core.svn.wordpress.org/trunk@37998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 17:32:29 +00:00
Drew Jaynes
60de6917fb Docs: Add and clarify changelog entries for elements that can now accept, use, or return WP_Post_Type objects.
Also adds a missing initial `@since` version for `wp_xmlrpc_server::_prepare_post_type()`.

See [37890]. See #36217.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 15:24:28 +00:00
Dominik Schilling
c73c23c423 Resource Hints: Increase priority of wp_resource_hints() so hints get printed before scripts and styles.
Also run `wp_resource_hints()` on the login screen and in the customizer. 

Props swissspidy.
Fixes #37317.
Built from https://develop.svn.wordpress.org/trunk@38046


git-svn-id: http://core.svn.wordpress.org/trunk@37987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 12:54:28 +00:00
Pascal Birchler
e4eee7ef5c Plugins: Improve Ajax search of installed plugins.
Fixes a few accessibility issues, tweaks the design of the search form to match other Ajax search fields and improves compatibility with older browsers.

See #37230.
Built from https://develop.svn.wordpress.org/trunk@38033


git-svn-id: http://core.svn.wordpress.org/trunk@37974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-11 21:50:31 +00:00
Dominik Schilling
02424959e4 Accessibility: Add aria-button-if-js class to links in the media list table that behave like buttons when JavaScript is on.
Props joedolson, afercia.
See #26504.
Fixes #36555.
Built from https://develop.svn.wordpress.org/trunk@38031


git-svn-id: http://core.svn.wordpress.org/trunk@37972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-10 19:31:31 +00:00
Drew Jaynes
31f150080a Docs: Standardize references to "meta box" or "meta boxes" as two distinct words throughout core documentation per the core spelling guide.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-10 00:56:28 +00:00
Drew Jaynes
6c7148943b Docs: Standardize capitalization of Ajax throughout core documentation per the core spelling guide.
Ajax, while considered an acronym for Asynchronous JavaScript and XML, is most commonly capitalized only in the first character.

Part props ocean90.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-10 00:51:30 +00:00
Dominik Schilling
559c6637bf Docs: Fix a typo in the DocBlock for themes_api(), themes_api, plugins_api(), and plugins_api.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@38025


git-svn-id: http://core.svn.wordpress.org/trunk@37966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 14:39:33 +00:00
Drew Jaynes
7eb6471461 Docs: Fix minor formatting and syntax for wp-admin/* elements introduced in 4.6.
See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 14:00:31 +00:00
Drew Jaynes
a13164355f Docs: Cross-reference parent classes in DocBlocks for upgrader classes moved to their own files in 4.6
See #36618. See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 13:45:33 +00:00
Drew Jaynes
2ee0027bc1 Docs: Improve usefulness of DocBlocks for ajax-actions.php functions introduced in 4.6.
See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 13:23:30 +00:00
Dominik Schilling
aa561e67a1 Bootstrap: Enhance core's memory limit handling.
* Don't lower memory limit if the current limit is greater than `WP_MAX_MEMORY_LIMIT`.
* Set `WP_MEMORY_LIMIT` and `WP_MAX_MEMORY_LIMIT` to current limit if the `memory_limit` setting can't be changed at runtime.
* Use `wp_convert_hr_to_bytes()` when parsing the value of the `memory_limit` setting because it can be a shorthand or an integer value.
* Introduce `wp_raise_memory_limit( $context )` to raise the PHP memory limit for memory intensive processes. This DRYs up some logic and includes the existing `admin_memory_limit` and `image_memory_limit` filters. The function can also be used for custom contexts, the `{$context}_memory_limit` filter allows to customize the limit.
* Introduce `wp_is_ini_value_changeable( $setting )` to determine whether a PHP ini value is changeable at runtime.
* Remove a `function_exists( 'memory_get_usage' )` check. Since PHP 5.2.1 support for memory limit is always enabled.

Related commits: [38011-38013]

Props jrf, A5hleyRich, swissspidy, ocean90.
Fixes #32075.
Built from https://develop.svn.wordpress.org/trunk@38015


git-svn-id: http://core.svn.wordpress.org/trunk@37956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 14:37:30 +00:00
Sergey Biryukov
d1cd600733 Docs: Fix typo in a comment in Core_Upgrader::upgrade().
Props Zuige.
Fixes #37314.
Built from https://develop.svn.wordpress.org/trunk@38014


git-svn-id: http://core.svn.wordpress.org/trunk@37955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 13:19:30 +00:00
Dominik Schilling
30420b7d19 Screen API: After [37972], ensure that $box['args'] is an array before trying to access __widget_basename.
This prevents a PHP fatal error on the Nav Menus screen where `$args` is an object.

Props elrae.
Fixes #35021.
Built from https://develop.svn.wordpress.org/trunk@38004


git-svn-id: http://core.svn.wordpress.org/trunk@37945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 16:39:29 +00:00
Sergey Biryukov
139387b7e5 Docs: Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core.
Props metodiew.
Fixes #36495.
Built from https://develop.svn.wordpress.org/trunk@37985


git-svn-id: http://core.svn.wordpress.org/trunk@37926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 12:40:29 +00:00
Dominik Schilling
bfe46464c5 Upgrade/Install: Change priority for theme/update update rows.
`wp_plugin_update_rows()` and `wp_theme_update_rows()` are using the site transients `update_plugins` and `update_themes` which are set by `wp_update_plugins()` and `wp_update_themes()`. Both functions are hooked into `load-plugins.php` and `load-themes.php`. Therefore the update rows need to be registered after the transients were populated.

See #13071.
Built from https://develop.svn.wordpress.org/trunk@37978


git-svn-id: http://core.svn.wordpress.org/trunk@37919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:46:29 +00:00
Dominik Schilling
3d6fc45834 Dashboard: Don't add a "Configure" link to the toggle button.
The HTML for the toggle gets appended to the widget name which is later used for the widget title and the screen reader text of the toggle button. Storing the original widget name in the arguments allows us to use the name without the HTML for the screen reader text and doesn't require further changes by plugin developers.

Props nicholas_io, swissspidy.
Fixes #35021.
Built from https://develop.svn.wordpress.org/trunk@37972


git-svn-id: http://core.svn.wordpress.org/trunk@37913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:22:29 +00:00
Dominik Schilling
de3b2db1e2 Media: Improve form validation errors handling when editing images.
* Use the same check for a numeric value used on the crop fields on all the other fields: don't display "NaN", just empty the field.
* Remove the inline script that runs the initialization of the image editor and call it after the editor UI is fully ready.

Props afercia.
Fixes #36316.
Built from https://develop.svn.wordpress.org/trunk@37966


git-svn-id: http://core.svn.wordpress.org/trunk@37907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 13:37:29 +00:00
Dominik Schilling
4594006ca6 Plugins: Clean up uninstall_plugins option during database upgrade.
`register_uninstall_hook()` is designed to be given a function callback (or a static class variable), not an array/object instance. This got blocked in [16339] but the option itself was never cleaned up.

Props polevaultweb.
Fixes #31625.
Built from https://develop.svn.wordpress.org/trunk@37965


git-svn-id: http://core.svn.wordpress.org/trunk@37906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 13:28:29 +00:00
Pascal Birchler
a5580012a3 Docs: Fix a typo across some function and hook docs.
s/filterss/filters.

See #32246.
Built from https://develop.svn.wordpress.org/trunk@37961


git-svn-id: http://core.svn.wordpress.org/trunk@37902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 22:45:29 +00:00
Sergey Biryukov
4a62825a05 Text Changes: Remove duplicate string, use the one we already have.
See #34521.
Built from https://develop.svn.wordpress.org/trunk@37960


git-svn-id: http://core.svn.wordpress.org/trunk@37901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 22:10:28 +00:00
Sergey Biryukov
83cd70a5f6 Text Changes: Remove duplicate string, use the one we already have.
See #34521.
Built from https://develop.svn.wordpress.org/trunk@37956


git-svn-id: http://core.svn.wordpress.org/trunk@37897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 21:37:27 +00:00
Dominik Schilling
be54af2e4c Nav Menus: In Walker_Nav_Menu_Edit::start_el() initialize $original_title with false.
Prevents displaying "Original:" without a title when adding a menu item without a title.

Props grapplerulrich, swissspidy.
Fixes #36729.
Built from https://develop.svn.wordpress.org/trunk@37953


git-svn-id: http://core.svn.wordpress.org/trunk@37894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 20:16:28 +00:00
Sergey Biryukov
e64b88cb34 Media: Avoid PHP notices when trying to show a parent post title of an orphaned post type.
Props littler.chicken.
See #37186.
Built from https://develop.svn.wordpress.org/trunk@37952


git-svn-id: http://core.svn.wordpress.org/trunk@37893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 19:34:28 +00:00
Dominik Schilling
1d13c64927 Themes: After [37287], remove deprecated feature category.
See #33407.
Built from https://develop.svn.wordpress.org/trunk@37947


git-svn-id: http://core.svn.wordpress.org/trunk@37888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 10:01:28 +00:00
Dominik Schilling
b733aa79ab Themes: Add "Custom Logo" to the list of WordPress theme features.
Props rabmalin.
See #33407.
Fixes #36744.
Built from https://develop.svn.wordpress.org/trunk@37945


git-svn-id: http://core.svn.wordpress.org/trunk@37886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 09:35:27 +00:00
Gary Pendergast
2d6b9ca91b General: Remove the Pragma header from responses.
`Pragma` is supposed to be a request header, but we've been including it in responses since the beginning of time.

This is a relic dating all the way back to b2, probably originally added because Internet Explorer version 5 and earlier didn't understand the `Cache-Control` header in responses, but they did (incorrectly) obey the `Pragma` header.

Internet Explorer 6 and 7 will obey the `Pragma` response header only if no other cache-related response headers are present (in our case, they are always present), and all other browsers ignore the `Pragma` response header.

Props geekysoft.
Fixes #37250.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 04:02:31 +00:00
Helen Hou-Sandí
20b329ba08 Media: Only show parent post titles when the user can read said post.
fixes #37186.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-01 15:07:36 +00:00
Sergey Biryukov
8aa1c37590 Docs: Fix typo in WP_Theme_Install_List_Table description.
Props Frozzare.
Fixes #37234.
Built from https://develop.svn.wordpress.org/trunk@37937


git-svn-id: http://core.svn.wordpress.org/trunk@37878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-01 10:27:32 +00:00
Aaron Jorbin
f7465bfcf3 Comments: Further improve text of initial comment.
In [37888], the comment text was initially updated, however an opportunity to make the text less trivializing of actions that users will take was missed. To quote Helen Hou-Sandi: "It's important not to trivialize actions that are perfectly reasonable for a user to find tricky (where to go to log in is not exactly intuitive, even with the rewrites we have now)."

The text of the comment now reads:

> Hi, this is a comment.
> To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
> Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.

Some interesting reading on the topic of "Simple" and "Easy" and how they relate to software development can be found at http://andrewspittle.com/2012/01/31/avoiding-easy/ and written by andrewspittle.

Props helen.
Fixes #36702.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 20:50:27 +00:00
Dominik Schilling
6d7a70e2ce Script Loader: Introduce an API to register resource hints.
Resource hints allow browsers to prefetch specific pages or render them in the background to perform DNS lookups or to begin the connection handshake (DNS, TCP, TLS) in the background.

By default, `wp_resource_hints()` prints hints for "s.w.org" (the WordPress.org CDN) and for all scripts and styles which are enqueued from external hosts.
Use the `wp_resource_hints` filter to add custom domains and URLs for `dns-prefetch`, `preconnect`, `prefetch` or `prerender`.

Props voldemortensen, swissspidy.
Fixes #34292.
Built from https://develop.svn.wordpress.org/trunk@37920


git-svn-id: http://core.svn.wordpress.org/trunk@37861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 19:36:28 +00:00
Dominik Schilling
25e66e4f1e Text Changes: Unify permission error messages.
The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.
Built from https://develop.svn.wordpress.org/trunk@37914


git-svn-id: http://core.svn.wordpress.org/trunk@37855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 15:16:29 +00:00
Dominik Schilling
0b7b8981aa Posts: In wp_ajax_inline_save(), do not apply level for non-hierarchical post types.
Props Offereins.
Fixes #35010.
Built from https://develop.svn.wordpress.org/trunk@37913


git-svn-id: http://core.svn.wordpress.org/trunk@37854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 14:07:31 +00:00
Andrea Fercia
809ad6e429 List tables: Make the pagination links and text better responsive.
On small screens, especially with longer translations, the pagination links and
text could break in two lines. This fixes it moving down the text in a new line.

Fixes #33962.
Built from https://develop.svn.wordpress.org/trunk@37912


git-svn-id: http://core.svn.wordpress.org/trunk@37853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 13:30:28 +00:00
Dominik Schilling
a288544c41 I18N: Make "That's all, stop editing! Happy blogging." translatable.
The string is used during the network installation process to inform the user about where to store additional configuration data. Since the wp-config.php file can be translated the string should be too.

Props julesaus.
Fixes #36945.
Built from https://develop.svn.wordpress.org/trunk@37902


git-svn-id: http://core.svn.wordpress.org/trunk@37843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-28 23:24:27 +00:00
Jeremy Felt
6d7bac459a Multisite: Add a ms_sites_list_table_query_args filter to WP_MS_Sites_List_Table.
This allows a developer to filter the arguments used to query sites during the `prepare_items()` method.

Props flixos90.
Fixes #26580.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-28 22:26:30 +00:00
Dominik Schilling
60dc856d64 Posts: Introduce WP_Post_Type and use it in register_post_type() and unregister_post_type().
This changes the global `$wp_post_types` to an array of `WP_Post_Type` objects. `WP_Post_Type` includes methods to handle post type supports, rewrite rules, meta boxes, hooks, and taxonomies.
Each post type argument becomes a property of `WP_Post_Type`.

Props swissspidy, flixos90.
Fixes #36217.
Built from https://develop.svn.wordpress.org/trunk@37890


git-svn-id: http://core.svn.wordpress.org/trunk@37831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-28 16:41:35 +00:00
Dominik Schilling
4b9a726c5a Comments: Improve author and content of the default comment.
The new comment:

> A WordPress Commenter <!wapuu@wordpress.example>:
>
> Hi, this is a comment.
> To moderate comments, just log in. There you will have the option to edit or delete them.
> Commenter avatars come from <a href="!https://gravatar.com">Gravatar</a>.

Also introduces a network setting to set the email address of the first comment author on a new site.

Props Ipstenu, rachelbaker, jorbin, jeremyfelt.
Fixes #36702, #14268.
Built from https://develop.svn.wordpress.org/trunk@37888


git-svn-id: http://core.svn.wordpress.org/trunk@37829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-28 10:03:27 +00:00
Dominik Schilling
f5bf3676b1 Nav Menus: Use WP_Query for quick searches.
`the_post()` sets the `$in_the_loop` property to true which is unexpected in the admin if you're using filters which should only affect real loops.

Props ruud@joyo.
Fixes #27042.
Built from https://develop.svn.wordpress.org/trunk@37881


git-svn-id: http://core.svn.wordpress.org/trunk@37822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-27 11:51:30 +00:00
Joe McGill
04117fc392 Docs: Add missing variable reference for wp_edit_form_attachment_display.
This adds the missing `$post` reference in the inline docblock for
the `wp_edit_form_attachment_display` hook after [37879].

Props DrewAPicture.
See 36052.
Built from https://develop.svn.wordpress.org/trunk@37880


git-svn-id: http://core.svn.wordpress.org/trunk@37821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-27 01:54:30 +00:00
Joe McGill
f82e7ed434 Media: Add action to display attachments on the edit screen.
This adds a new action hook, `wp_edit_form_attachment_display` to
`edit_form_image_editor()`, which can be used as a fallback to render
previews of an attachment that isn't an image, audio, or video file
included in the media library.

Props georgestephanis.
Fixes #36502.
Built from https://develop.svn.wordpress.org/trunk@37879


git-svn-id: http://core.svn.wordpress.org/trunk@37820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-26 22:37:27 +00:00
Jeremy Felt
6f3f00ea97 Multisite: Change WP_Network id property to an integer.
For consistency and developer sanity.

Props flixos90.
Fixes #37050.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-26 14:26:29 +00:00
Nikolay Bachiyski
c5d9d5cc18 Admin: escape URL-encoded permalinks
Built from https://develop.svn.wordpress.org/trunk@37801


git-svn-id: http://core.svn.wordpress.org/trunk@37766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:46:49 +00:00
Rachel Baker
a2904cc309 Revisions: Change the capability needed to view revision diffs to edit_post.
Built from https://develop.svn.wordpress.org/trunk@37779


git-svn-id: http://core.svn.wordpress.org/trunk@37744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:22:26 +00:00
Nikolay Bachiyski
4372cdf45d Admin: Escape attachment name in case it contains special characters
Built from https://develop.svn.wordpress.org/trunk@37774


git-svn-id: http://core.svn.wordpress.org/trunk@37739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 14:20:55 +00:00
Pascal Birchler
542e462d9d Menus: Support nested array variables in POST data when saving menus.
[36510] allowed larger menus to be created in the Edit Menu screen by JSON-encoding the entire form into a single input field. However, it did not correctly handle nested arrays.

This introduces a new `_wp_expand_nav_menu_post_data()` helper function to handle this POST data which uses `array_replace_recursive()` internally. Since the latter is only available on PHP 5.3+, we add a compatibility function to ensure PHP 5.2 support.

Props ericlewis, neverything, swissspidy.
Fixes #36590 for trunk. See #14134.
Built from https://develop.svn.wordpress.org/trunk@37748


git-svn-id: http://core.svn.wordpress.org/trunk@37713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-19 12:25:28 +00:00
Rachel Baker
d7e743a286 Comments: Wrap or unwrap the List Table comment_date as comment status changes via Ajax.
Introduced in [36521].

Fixes #36742.
Props imath, adamsilverstein.
Built from https://develop.svn.wordpress.org/trunk@37743


git-svn-id: http://core.svn.wordpress.org/trunk@37708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-17 21:48:27 +00:00
Andrew Ozz
accf240d37 Editor: after inserting a link detect if the URL is broken, first run.
Props iseulde, azaozz.
See #36638.
Built from https://develop.svn.wordpress.org/trunk@37741


git-svn-id: http://core.svn.wordpress.org/trunk@37706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-17 20:41:28 +00:00
Drew Jaynes
9afeafeff2 Docs: Add a missing summary and @since version to the DocBlock for WP_MS_Sites_List_Table::prepare_items().
Also adds a changelog entry for 4.6.0 noting the changeover to `get_sites()`.

Fixes #36675. See #21837, #24833 and #33185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-17 16:06:31 +00:00
Andrew Ozz
c8d203e1a3 Autosave: improve the notice when the sessionStorage autosave is different than the content.
- Make it higher priority than the server autosave.
- Change it so the editors undo and redo can be used.
- Replace the restore link with a button.
- Add better explanation/help.

See #37025.
Built from https://develop.svn.wordpress.org/trunk@37737


git-svn-id: http://core.svn.wordpress.org/trunk@37702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-17 03:02:29 +00:00
Jeremy Felt
d242446e59 Multisite: Use WP_Site_Query to power WP_MS_Sites_List_Table.
`WP_Site_Query` provides for a cleaner `prepare_items()` method. It significantly improves the search experience in the sites list table:

* In a subdomain configuration, domain and path are searched for a provided terms.
* In a subdirectory configuration, path is searched for a provided term.
* The full domain is searched in a subdomain configuration rather than the portion not matching the network's domain.
* Terms are searched as `%term%` by default. Adding `*` in the middle of a term will search `%te%rm%`.

Props flixos90, Fab1en.
Fixes #33185, #24833, #21837, #36675.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-17 00:03:29 +00:00
Konstantin Obenland
8c82515ab6 Update/Install: Shiny Updates v2.
Gone are the days of isolation and feelings of "meh", brought on by The Bleak Screen of Sadness. For a shiny knight has arrived to usher our plugins and themes along their arduous journey of installation, updates, and the inevitable fate of ultimate deletion.

Props swissspidy, adamsilverstein, mapk, afragen, ocean90, ryelle, j-falk, michael-arestad, melchoyce, DrewAPicture, AdamSoucie, ethitter, pento, dd32, kraftbj, Ipstenu, jorbin, afercia, stephdau, paulwilde, jipmoors, khag7, svovaf, jipmoors, obenland.
Fixes #22029, #25828, #31002, #31529, #31530, #31773, #33637, #35032.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-15 16:37:29 +00:00
Boone Gorges
6d05c7521b Taxonomy: More specific cap check when processing category data on post save.
Props dlh.
Fixes #36379.
Built from https://develop.svn.wordpress.org/trunk@37691


git-svn-id: http://core.svn.wordpress.org/trunk@37657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-14 01:37:29 +00:00
Dominik Schilling
bdd2199647 Upgrade: Trigger the upgrader_process_complete action for translation updates.
This brings `Language_Pack_Upgrader` in line with the core, theme, and plugin upgrader.

Props ronalfy.
Fixes #36872.
Built from https://develop.svn.wordpress.org/trunk@37687


git-svn-id: http://core.svn.wordpress.org/trunk@37653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-11 17:44:28 +00:00
Andrea Fercia
d01b200e6e Accessibility: Help text improvements.
Avoid references to "visual" positions in favour of positions in the document
structure. The help text shouldn't assume users can see.

Also, in the Posts screen don't mention specific types of posts and use a more
generic text instead.

Props odysseygate, pansotdev, zakb8.
Fixes #34761.
Built from https://develop.svn.wordpress.org/trunk@37680


git-svn-id: http://core.svn.wordpress.org/trunk@37646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 21:43:29 +00:00
Dominik Schilling
be38b14e05 I18N: Simplify the WordPress update notice for translators.
* Make codex URL and accessibility text separate strings.
* Add translator comments.

Props ramiy for initial patch.
Fixes #35721.
Built from https://develop.svn.wordpress.org/trunk@37675


git-svn-id: http://core.svn.wordpress.org/trunk@37641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 15:54:30 +00:00
Peter Wilson
47d26cd9fb DOCS: Replace HTTP links with HTTPS.
Replaces unsecure links in documentation and translator comments with their secure versions.

Props johnpgreen, netweb

Fixes #36993

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


git-svn-id: http://core.svn.wordpress.org/trunk@37640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 04:50:33 +00:00
Rachel Baker
ed964badae Comments: Fix pagination totals in the response of the inline delete actions when filtering the List Table by comment_type.
Within the Ajax action `_wp_ajax_delete_comment_response()` if the comment_type query var is set, fallback to the previous `$total - 1` value instead of getting an incorrect value from `wp_comment_count()`.

Fixes #36991.
Built from https://develop.svn.wordpress.org/trunk@37664


git-svn-id: http://core.svn.wordpress.org/trunk@37630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-09 02:22:27 +00:00
Rachel Baker
445b9b6d94 Users: Stop WP_List_Table notices from persisting on pagination navigation.
Adds the keyboard navigation query vars to `wp_removable_query_args()` and passes the results of said function to remove_query_var() inside the WP_List_Table pagination method.

Props EFAREM for the initial patch.
Fixes #35620.
Built from https://develop.svn.wordpress.org/trunk@37663


git-svn-id: http://core.svn.wordpress.org/trunk@37629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-09 01:56:27 +00:00
Dominik Schilling
d8357b76c5 Upgrader: Don't use Language_Pack_Upgrader_Skin::before() and Language_Pack_Upgrader_Skin::after() when translations are up to date.
Avoids a PHP notice since `Language_Pack_Upgrader_Skin::before()` tries to access a non-existent update.
Also, change the `up_to_date` string to use the plural form because translations are only updated in bulk mode.

Fixes #36615.
Built from https://develop.svn.wordpress.org/trunk@37635


git-svn-id: http://core.svn.wordpress.org/trunk@37603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-05 12:22:30 +00:00
Jeremy Felt
2211c28a37 Multisite: Remove superfluous code from network_edit_site_nav()
* Remove output buffering.
* Remove `esc_attr()` when outputting hard coded class names.
* Update documentation.

Fixes #15800.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-02 22:29:27 +00:00
Rachel Baker
d287f19a0f Comments: Remove debugging code left in WP_Comments_List_Table->get_views().
Originally introduced in [9556] and leftover from [15578].

Props dabnpits.
Fixes #36938.
Built from https://develop.svn.wordpress.org/trunk@37624


git-svn-id: http://core.svn.wordpress.org/trunk@37592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-02 15:07:28 +00:00
Andrew Ozz
82ee5ca020 Editor: ensure the page is refreshed when the users navigate to it with the Back or Forward buttons. In these cases the browsers usually load the page from (memory) cache and it contains the old editor content.
Fixes #35852.
Built from https://develop.svn.wordpress.org/trunk@37619


git-svn-id: http://core.svn.wordpress.org/trunk@37587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-02 01:30:27 +00:00
Dion Hulse
c959b63539 Updates: Only use the filename component of URLs to form part of the temporary filename.
Previously we were passing the entire URL to `wp_tempnam()` (incorrectly) which caused the query string to be used as part of the temporary filename.
We now only use the file component of a url such as `https://example.com/filename.zip?arg1=1&arg2=2....&arg100=100` to prevent a long filename.

Fixes #34938

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


git-svn-id: http://core.svn.wordpress.org/trunk@37566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-31 02:21:29 +00:00
Rachel Baker
9913b6eec4 Comments: Display approved comments on the Edit Post screen to users without the edit_comment capability.
Matches logic in `wp_dashboard_recent_comments()` where we display approved comments regardless of the edit permission.

Props jfarthing84 for initial patch.
Fixes #24648. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@37552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-27 14:10:28 +00:00
Dominik Schilling
2f998cac7f Database: Normalize index definitions in dbDelta().
`dbDelta()` compares the index definitions against the result of `SHOW INDEX FROM $table_name`. This requires a specific format so indices are not unnecessarily re-created. This format wasn't ensured, until now.

* Parse the raw index definition to extract the type, name and columns so a normalized definition can be built (#20263, #34873).
* Standardize on uppercase types (#34871) and on 'KEY'. 'INDEX' is only a synonym for 'KEY'.
* Escape index names with backticks (#20263).
* Normalize columns: Ignore ASC and DESC definitions (#34959), remove whitespaces (#34869) and escape column names with backticks (#20263).
* Add backticks to all index change queries (#20263).

Props ocean90, pento, kurtpayne.
Fixes #20263, #34869, #34871, #34873, #34959.
Built from https://develop.svn.wordpress.org/trunk@37583


git-svn-id: http://core.svn.wordpress.org/trunk@37551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-27 11:57:30 +00:00
Dominik Schilling
1244eaff8f Plugins: Fix order of arguments for the strpos() function added in [37562].
See #36706.
Built from https://develop.svn.wordpress.org/trunk@37580


git-svn-id: http://core.svn.wordpress.org/trunk@37548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-26 23:15:31 +00:00
Gary Pendergast
0db17129a5 Database: Add support for SPATIAL keys to dbDelta().
`dbDelta()` already supported spatial fields (by virtue of not checking field types), so it's nice to round that out with spatial key support, too.

Fixes #36948.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-26 04:59:27 +00:00
Boone Gorges
253686fae6 Store only term IDs in object term relationships caches.
Previously, objects containing all data about a term were stored in each
object's term cache. Besides being wasteful, this approach caused invalidation
issues, as when a modified term count required a flush for all objects
belonging to the term.

Backward compatibility is maintained for plugins that continue to put object
data directly into the `{$taxonomy}_relationships` cache bucket.

Fixes #36814.
Built from https://develop.svn.wordpress.org/trunk@37573


git-svn-id: http://core.svn.wordpress.org/trunk@37541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-26 04:50:27 +00:00
Dominik Schilling
da72b04ab2 Upgrade: Allow update checks on upgrader_process_complete to be run during Ajax requests.
Fixes missing translation updates during shiny updates.

Fixes #36914.
Built from https://develop.svn.wordpress.org/trunk@37570


git-svn-id: http://core.svn.wordpress.org/trunk@37538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-25 19:36:28 +00:00
Dominik Schilling
6b51ac4956 Plugins: In get_plugin_data() use the plugin slug for the text domain when no text domain is defined in the header.
Fixes #36706.
Built from https://develop.svn.wordpress.org/trunk@37562


git-svn-id: http://core.svn.wordpress.org/trunk@37530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-25 16:54:28 +00:00
Drew Jaynes
62d4798863 Docs: Update hook docs for the upgrader_package_options filter and upgrader_process_complete action to reflect expected values in the core, language pack, theme, and plugin contexts.
Props nextendweb for the initial patch.
See [37550]. Fixes #36875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-25 14:45:27 +00:00
Dominik Schilling
8369b778e1 I18N: Update list of continents and cities for the timezone selection.
Fixes #36828.
Built from https://develop.svn.wordpress.org/trunk@37554


git-svn-id: http://core.svn.wordpress.org/trunk@37522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-24 23:24:27 +00:00
Drew Jaynes
ada2858cd9 Docs: Fix the hook doc for upgrader_process_complete to notate all values that might be present in the hook_extra array in the various update contexts.
h/t Nextendweb.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-24 17:52:30 +00:00
Drew Jaynes
6d7abb8fd3 Docs: The $context parameter in remove_meta_box() is not optional.
Fixes a copy pasta error introduced in [34952].

Props travisnorthcutt.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 20:57:28 +00:00
Dominik Schilling
a5b8dca864 Database: Support backticks around field names when parsing a query for the field type.
Avoids an undefined index PHP warning by `dbDelta()`.

Props davidmosterd, ocean90.
See #20263.
Built from https://develop.svn.wordpress.org/trunk@37538


git-svn-id: http://core.svn.wordpress.org/trunk@37506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 18:12:28 +00:00
Drew Jaynes
1947f4d17c Docs: Apply inline @see tags to hooks referenced in DocBlocks for wp-admin/* files.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 17:28:27 +00:00
Drew Jaynes
11d6f0712e Docs: Update the return notation for get_current_screen() to note that null can also be returned if the screen has not been defined.
Props screamingdev.
Fixes #36382.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 16:34:28 +00:00
Dominik Schilling
00487d5762 Database: Remove debug comments in dbDelta().
Built from https://develop.svn.wordpress.org/trunk@37533


git-svn-id: http://core.svn.wordpress.org/trunk@37501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 15:04:28 +00:00
Dominik Schilling
e5a87afb29 Database: Reduce the number of strtolower() calls in dbDelta().
Fixes #36919.
Built from https://develop.svn.wordpress.org/trunk@37532


git-svn-id: http://core.svn.wordpress.org/trunk@37500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 14:58:27 +00:00
Dominik Schilling
e5dd89ae57 Menus: Use new colors for error/info notices.
Props barryceelen.
Fixes #36857.
Built from https://develop.svn.wordpress.org/trunk@37529


git-svn-id: http://core.svn.wordpress.org/trunk@37497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 09:40:28 +00:00
Gary Pendergast
18ca26574b Database: dbDelta() will no longer try to downgrade the size of TEXT and BLOB columns.
When upgrading to `utf8mb4`, `TEXT` fields will be upgraded to `MEDIUMTEXT` (and likewise for all other `*TEXT` and `*BLOB` fields). This is to allow for the additional space requirements of `utf8mb4`.

On the subsequent upgrade, after the `utf8mb4` upgrade, `dbDelta()` would try and downgrade the fields to their original size again. At best, this it a waste of time, at worst, this could truncate any data larger than the original size. There's no harm in leaving them at their original size, so let's do that.

Fixes #36748.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 08:36:28 +00:00
Gary Pendergast
25d2123821 Database: Remove some duplicate code.
`schema.php` was manually defining the character set/collation query, instead of using `wpdb::get_charset_collate()`.

Props sudar.

Fixes #35756.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 06:38:27 +00:00
Drew Jaynes
c3055cc190 Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Drew Jaynes
a54c2a7279 Docs: Remove/replace invalid inline @link tags from DocBlocks in wp-admin/includes/*.
See #36910.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 17:22:27 +00:00
Drew Jaynes
ac74c103a8 Docs: Fix some parameter alignment and backtick-escaping in two DocBlocks in wp-admin/includes/media.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 17:18:27 +00:00
Drew Jaynes
c0d7dece23 Docs: Remove invalid inline @link tags from docs in wp-admin/includes/media.php.
See #36910.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 17:10:26 +00:00
Andrea Fercia
ce94f2dfbd Refine the FTP credentials form interaction.
Properly toggle SSH2 Authentication Keys fieldset visibility.
JavaScript and CSS clean-up.

Props Mte90.
Fixes #34376.
Built from https://develop.svn.wordpress.org/trunk@37467


git-svn-id: http://core.svn.wordpress.org/trunk@37435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-19 22:59:28 +00:00
Jeremy Felt
4a12078b31 Multisite: Filter the links displayed on "Edit Site" views
Introduce the `network_edit_site_nav` function, which DRYs up the code used to display a common set of links at the top of "Edit Site" views.

Introduce the `network_edit_site_nav_links` filter, which allows plugins to modify the list of links displayed at the top of Edit Site views as a "tabbed" interface.

Props johnjamesjacoby, c3mdigital, Bueltge.
Fixes #15800.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-19 21:48:30 +00:00
Sergey Biryukov
117cef2d46 Docs: Correct variable type for WP_Upgrader::$strings.
Props mt8.biz.
Fixes #36883.
Built from https://develop.svn.wordpress.org/trunk@37462


git-svn-id: http://core.svn.wordpress.org/trunk@37430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-19 00:36:27 +00:00
Dominik Schilling
f81b65688a Upgrader: Add changelog entries for when the classes were moved to its own file.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37432


git-svn-id: http://core.svn.wordpress.org/trunk@37398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 20:59:27 +00:00
Drew Jaynes
b1804afeaf Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.

Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.

Props ocean90.
Fixes #36835.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 18:41:31 +00:00
Dominik Schilling
251274abf6 List Tables: Pass the $which parameter to restrict_manage_posts and restrict_manage_users.
`$which` contains the location of the extra table nav markup: 'top' or 'bottom'.

Props martin.krcho.
Fixes #35307.
Built from https://develop.svn.wordpress.org/trunk@37422


git-svn-id: http://core.svn.wordpress.org/trunk@37388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-12 15:13:27 +00:00
Dominik Schilling
546b031453 Filesystem API: Don't add '.' to the list of directories which need to be checked/created when extracting a file.
Prevents a PHP warning by `WP_Filesystem_Direct::mkdir()` when installing a language pack which doesn't have subdirectories.

Props tfrommen.
Fixes #36570.
Built from https://develop.svn.wordpress.org/trunk@37421


git-svn-id: http://core.svn.wordpress.org/trunk@37387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-12 12:40:28 +00:00
Dominik Schilling
1564bd2c1f Upgrader: Remove debug cruft.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37413


git-svn-id: http://core.svn.wordpress.org/trunk@37379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 18:32:28 +00:00
Dominik Schilling
a8525b1109 Upgrader: After [37409] move the hook docs for upgrader_process_complete to WP_Upgrader::run().
Add changelog entry for [23912].

Part 7/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37412


git-svn-id: http://core.svn.wordpress.org/trunk@37378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 12:20:27 +00:00
Dominik Schilling
5844c585f6 Upgrader: Update wp-admin/includes/class-wp-upgrader.php to require_once the new files added in [37406] and [37409].
Part 6/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37411


git-svn-id: http://core.svn.wordpress.org/trunk@37377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:59:27 +00:00
Dominik Schilling
23e2a486ae Upgrader: Update file headers for new files added in [37409].
Part 5/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37410


git-svn-id: http://core.svn.wordpress.org/trunk@37376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:52:28 +00:00
Dominik Schilling
14e5d77132 Upgrader: Copy WP_Upgrader subclasses into one file per class.
Part 4/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37409


git-svn-id: http://core.svn.wordpress.org/trunk@37375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:45:42 +00:00
Dominik Schilling
5f1ac9c96d Upgrader: Update wp-admin/includes/class-wp-upgrader-skins.php to require_once the new files added in [37406].
Part 3/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37408


git-svn-id: http://core.svn.wordpress.org/trunk@37374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:42:26 +00:00
Dominik Schilling
4b846677ba Upgrader: Update file headers and class DocBlocks for new files added in [37406].
Part 2/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37407


git-svn-id: http://core.svn.wordpress.org/trunk@37373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:31:28 +00:00
Dominik Schilling
bbecb1a485 Upgrader: Copy WP_Upgrader_Skin and its subclasses into one file per class.
Part 1/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37406


git-svn-id: http://core.svn.wordpress.org/trunk@37372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:11:30 +00:00
Helen Hou-Sandí
a800cf654b Drop Open Sans in the admin in favor of system fonts.
Rejoice, for your admins will feel more native to your surrounding computing environment and likely load faster, especially when offline, as they no longer have to talk to The Google Overlord.

At the time of introduction in 3.8, there were not good system fonts common to all platforms at the time. In the years since, Windows, Android, OS X, iOS, Firefox OS, and various flavors of Linux have all gotten their own (good) system UI fonts.

There will definitely be visual bugs, mainly around alignment and spacing; these should be documented and reported on the ticket and fixed more atomically so that our current and future selves have a better understanding of what happened and why.

The style remains registered, as it is almost certainly in use by themes and plugins.

props mattmiklic.
see #36753.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-04 22:07:37 +00:00
Drew Jaynes
ebfc1467bb Links: Rename the $link_id parameter in get_link_to_edit() to $link to better reflect that it can accept a link ID or object.
Props tloureiro for the initial patch.
Fixes #36736.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 23:43:27 +00:00
Drew Jaynes
3470faa683 Links: Clarify documentation for the $link_id parameter to mention that it accepts either an integer or object.
Props tloureiro.
See #36736.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 23:40:27 +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
Sergey Biryukov
dc5815146e Dashboard: Display the comment counts in wp_dashboard_right_now() in the rare initial condition when there are 0 approved comments and only pending comments, so the AJAX count update could work.
Props afercia.
Fixes #35519.
Built from https://develop.svn.wordpress.org/trunk@37335


git-svn-id: http://core.svn.wordpress.org/trunk@37301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 11:06:28 +00:00
Dominik Schilling
697a6d5560 Plugins: In uninstall_plugin() pass the plugin file to wp_register_plugin_realpath().
`wp_register_plugin_realpath()` calls `dirname( $file );` to remove the basename. The basename must be included in the argument or the symlinked directory won't be registered.

Props andy.
Fixes #36709.
Built from https://develop.svn.wordpress.org/trunk@37331


git-svn-id: http://core.svn.wordpress.org/trunk@37297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-30 15:04:27 +00:00
Andrea Fercia
93c8cdbaed Accessibility: improve the Star Ratings hiding empty elements for assistive technologies.
Fixes #36725.
Built from https://develop.svn.wordpress.org/trunk@37330


git-svn-id: http://core.svn.wordpress.org/trunk@37296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-30 14:33:29 +00:00
Rachel Baker
56c18bb5af Users: Remove the “Name” column of the Users table from appearing sortable.
The “Name” column of the Users WP List Table is not sortable because this column displays a concatenation of two optional values, `first_name` and `last_name`. Even if WP_User_Query supported ordering queries in this manner, the resulting sequence would be chaotic.

Fixes #28064.

Props jesin, and rachelbaker.
Built from https://develop.svn.wordpress.org/trunk@37314


git-svn-id: http://core.svn.wordpress.org/trunk@37280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-26 20:35:29 +00:00
Scott Taylor
be59d289b7 Dashboard: toggle the "View" link for comments when Approving / Unapproving from the Dashboard widget.
Fixes #35518.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 21:30:28 +00:00
Sergey Biryukov
45b7930627 Text Changes: Consistently refer to https://wordpress.org/plugins/ and https://wordpress.org/themes/ as WordPress Plugin Directory and WordPress Theme Directory, respectively.
Props mpol.
Fixes #35938.
Built from https://develop.svn.wordpress.org/trunk@37297


git-svn-id: http://core.svn.wordpress.org/trunk@37263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 06:57:26 +00:00
Dominik Schilling
c3fe61770c Media: Remove an extra quote when sending a link of a media file to the editor.
Introduced in [37035].

Props joemcgill, swissspidy, boonebgorges.
Fixes #36578.
Built from https://develop.svn.wordpress.org/trunk@37288


git-svn-id: http://core.svn.wordpress.org/trunk@37254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-21 21:21:28 +00:00
Dominik Schilling
93eaf20f29 Themes: Update list of WordPress theme features.
* Remove color tags.
* Layout: Add Grid Layout, remove Fixed Layout, Fluid Layout, and Responsive Layout.
* Features: Add Footer Widgets, remove Blavatar.
* Subject: Add Blog, E-Commerce, Education, Entertainment, Food & Drink, Holiday, News, Photography and Portfolio, remove Photoblogging and Seasonal.

Props grapplerulrich, davewarfel.
Fixes #33407.
Built from https://develop.svn.wordpress.org/trunk@37287


git-svn-id: http://core.svn.wordpress.org/trunk@37253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-21 21:11:29 +00:00
Sergey Biryukov
1bd88850f7 Administration: Introduce admin_print_footer_scripts-$hook_suffix", a dynamic version of the admin_print_footer_scripts hook.
This is now more consistent with the generic `admin_print_scripts` and the dynamic `admin_print_scripts-$hook_suffix` hooks fired in `wp-admin/admin-header.php`.

Props tfrommen.
Fixes #34334.
Built from https://develop.svn.wordpress.org/trunk@37279


git-svn-id: http://core.svn.wordpress.org/trunk@37245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-21 15:17:27 +00:00
Pascal Birchler
a47fa4f197 Rewrite Rules: After [36953], correctly replace existing rules on IIS when updating them.
Props WiZZarD_.
Fixes #36506 for trunk.
Built from https://develop.svn.wordpress.org/trunk@37273


git-svn-id: http://core.svn.wordpress.org/trunk@37239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-21 09:33:27 +00:00
Dominik Schilling
7b03510520 Upgrader: Clear plugin/theme caches directly after a plugin/theme has been updated.
`wp_update_plugins()` and `wp_update_themes()` are both hooked into `upgrader_process_complete` with priority 10. But at this stage the caches in `get_plugins()`, `search_theme_directories()`, and `wp_get_themes()` aren't refreshed yet so both functions couldn't fetch any translations for the new plugin/theme.
To reset the caches, `wp_clean_themes_cache()` and `wp_clean_plugins_cache()` are now hooked into `upgrader_process_complete` with priority 9.

This is a follow-up to [34751].

See #34029.
Fixes #36383.
Built from https://develop.svn.wordpress.org/trunk@37272


git-svn-id: http://core.svn.wordpress.org/trunk@37238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-21 09:09:28 +00:00
Drew Jaynes
852e6921d2 Docs: Add missing return descriptions for WP_Filesystem_SSH2::chown() and WP_Filesystem_SSH2::run_command().
Fixes #30989.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-21 02:38:29 +00:00
Boone Gorges
6771f0e83e Include taxonomy term metadata in WXR export.
Because term XML nodes now include termmeta and can thus be much larger, this
changeset also includes adds some newlines and indentation to make the XML
easier to read.

Props Chouby.
See #34062.
Built from https://develop.svn.wordpress.org/trunk@37240


git-svn-id: http://core.svn.wordpress.org/trunk@37206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-18 03:38:27 +00:00
Sergey Biryukov
f79aad8e0c Theme Editor: After [37217], add other embed templates to file descriptions.
Props Frozzare.
Fixes #34561. See #34561.
Built from https://develop.svn.wordpress.org/trunk@37232


git-svn-id: http://core.svn.wordpress.org/trunk@37198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-18 01:05:27 +00:00
Andrea Fercia
26148850c5 Accessibility: change the close "X" in the Media "Attach to existing content" modal in a button.
Props joedolson.

Fixes #36554.
Built from https://develop.svn.wordpress.org/trunk@37231


git-svn-id: http://core.svn.wordpress.org/trunk@37197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-17 16:58:26 +00:00
Andrea Fercia
76a6260353 Plugin Install: show the upload form in place rather than sending users to the devoted upload plugin page.
Props Ipstenu, ericlewis, michaelarestad.

Fixes #35429.
Built from https://develop.svn.wordpress.org/trunk@37221


git-svn-id: http://core.svn.wordpress.org/trunk@37187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-16 16:43:27 +00:00
Sergey Biryukov
f760d05a63 Theme Editor: Add embed.php to file descriptions.
Props ramiy.
Fixes #36551.
Built from https://develop.svn.wordpress.org/trunk@37217


git-svn-id: http://core.svn.wordpress.org/trunk@37183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-16 12:47:27 +00:00
John Blackbourn
56cc4bc79c Docs: Clarify possible types passed to the themes_api_result filter.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@37175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-15 01:43:28 +00:00
Jeremy Felt
f74e50d1dd Multisite: Remove theme from network allowed themes when deleted
Previously, a deleted theme would remain in the list of allowed themes until manually cleared. This uses `WP_Theme::network_disable_theme()`, added in [37202].

Fixes #34182.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-14 03:49:26 +00:00
Jeremy Felt
6cc19b5e2e Multisite: Relocate revoke_super_admin() and grant_super_admin()
Moving these functions to `wp-includes/capabilities.php` allows plugins to access more than just `is_super_admin()` and `get_super_admin()` from the front end without including a file via `wp-admin/`. Add an `is_multisite()` check to prevent use of these on single site environments now that they have left `ms.php`..

Props johnjamesjacoby.
Fixes #21788.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-14 03:35:27 +00:00
Boone Gorges
1e82651504 Pass thumbnail ID to the admin_post_thumbnail_html filter.
Also updates changelog to reflect that `$post->ID` was added in 3.5

Props johnjamesjacoby.
Fixes #36443.
Built from https://develop.svn.wordpress.org/trunk@37196


git-svn-id: http://core.svn.wordpress.org/trunk@37162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-13 16:18:28 +00:00
Sergey Biryukov
e081720b67 Docs: Fix typo in get_image_send_to_editor() description.
Props yoavf.
See #36349.
Built from https://develop.svn.wordpress.org/trunk@37194


git-svn-id: http://core.svn.wordpress.org/trunk@37160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-13 07:28:28 +00:00