Commit Graph

6401 Commits

Author SHA1 Message Date
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