Commit Graph

6498 Commits

Author SHA1 Message Date
Andrea Fercia
98402b7c15 Administration: Restore missing spinner when installing a new language.
Fixes #40478.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-07 12:01:42 +00:00
Pascal Birchler
064e62cbea Cron API: Add a new wp_doing_cron() helper function.
This replaces `DOING_CRON` checks via the constant.

Props tfrommen.
Fixes #39591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-06 14:30:40 +00:00
Andrea Fercia
1ca3b70929 Accessibility: Avoid a keyboard trap on the date and time custom format settings.
Using the `focus` event on the date and time custom format fields made impossible
to navigate through all the form fields using only the keyboard without actually
selecting the custom format setting. Instead, using `click` and `input` preserves
the original functionality when using any kind of pointing or input device.

Fixes #40515.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-02 20:03:42 +00:00
Andrea Fercia
f1be128cde Widgets: Improve the News dashboard widget no-js notice.
In the rare case this notice was displayed, it was unstyled. Uses the notice 
error style to make it prettier and consistent with other no-js notices.
Also, some CSS clean-up.

Fixes #40529.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-25 16:42:44 +00:00
Andrea Fercia
1d739a0925 Accessibility: Make some Widgets buttons real buttons.
Links used as UI controls that behave like buttons, should be buttons.
- changes the widgets "toggle", "Delete", and "Close" links to buttons
- uses `aria-expanded` to announce the state of the toggle buttons
- increases a bit the clickable area of the toggle
- ensures the "circular focus" doesn't get cut-off in some browsers by centering the toggle arrows
- uses a `<span>` element with an `aria-hidden` attribute to hide CSS generated font icons from assistive technologies
- standardizes on `.toggle-indicator:before` rather than `:after`
- changes two `#f00` reds in `#dc3232`, see #35622

Fixes #31476.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 21:14:44 +00:00
Andrew Ozz
d0e4448257 Editor: Provide API for the editor to be dynamically instantiated via JS. First run.
See: #35760
Built from https://develop.svn.wordpress.org/trunk@40476


git-svn-id: http://core.svn.wordpress.org/trunk@40352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 02:38:44 +00:00
Sergey Biryukov
9fb2e79b57 Posts, Post Types: In wp_check_post_lock(), check if the user with lock exists and return false otherwise.
Props arshidkv12, 1naveengiri.
Fixes #39888.
Built from https://develop.svn.wordpress.org/trunk@40424


git-svn-id: http://core.svn.wordpress.org/trunk@40322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-13 23:09:43 +00:00
Sergey Biryukov
bef3ff1377 Posts, Post Types: Improve the docs for wp_check_post_lock() and wp_set_post_lock().
See #39888.
Built from https://develop.svn.wordpress.org/trunk@40423


git-svn-id: http://core.svn.wordpress.org/trunk@40321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-13 23:02:42 +00:00
Sergey Biryukov
902b91400d Administration: Add "(link opens in a new window)" as a screen reader text for "Preview" link on Edit Post screen.
Props rianrietveld.
Fixes #40185.
Built from https://develop.svn.wordpress.org/trunk@40422


git-svn-id: http://core.svn.wordpress.org/trunk@40320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-13 22:42:43 +00:00
Felix Arntz
45b64ba2ff Multisite: Replace unnecessary is_super_admin() check when setting up the initial network.
When using `is_super_admin()` in a non-multisite environment, the function is supposed to check for administrator capabilities. The process of querying all users and filtering them with that function can be optimized by only querying users with the administrator role instead.

Fixes #40406. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-10 22:00:43 +00:00
Felix Arntz
9354ea683f Multisite: Introduce an upgrade_network capability.
Prior to this change, a mix of `is_super_admin()` calls and `manage_network` capability checks was used to determine whether the current user could upgrade the network. With this changeset a dedicated capability is introduced that allows more granular handling.

Props dhanendran for the original patch.
Fixes #39205. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-10 21:11:43 +00:00
Joe McGill
4e1f22bf78 Fix broken audio/video functions when sanitizing ID3 data
This fixes a bug where running `wp_kses_post_deep()` on all the ID3
tag data corrupted blob data.

Fixes #40075, #40085.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-10 01:28:47 +00:00
Pascal Birchler
8473f9ef66 Upgrade/Install: Introduce wp_disallow_file_mods() helper function.
This is a wrapper around the checks for the `DISALLOW_FILE_MODS` constant to determine whether file modifications are disallowed.

Props MaximeCulea.
Fixes #38673.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-07 14:36:50 +00:00
John Blackbourn
0c2338fab2 Networks and Sites: Align the display of site statuses on the Sites listing screen with those of posts on the Posts listing screen.
Fixes #40290

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


git-svn-id: http://core.svn.wordpress.org/trunk@40300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-07 13:51:43 +00:00
Sergey Biryukov
f884d7973b Posts, Post Types: Introduce post_date_column_status filter for post status text in list tables' Date column.
Props pbearne.
Fixes #39545.
Built from https://develop.svn.wordpress.org/trunk@40361


git-svn-id: http://core.svn.wordpress.org/trunk@40268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-01 14:07:44 +00:00
Jeremy Felt
fa3dc867e7 Multisite: Add deleted_blog action after site has been deleted.
Props pauldewouters, johnjamesjacoby.
Fixes #25584.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-30 04:31:44 +00:00
Sergey Biryukov
633ce094a1 Taxonomy: Fix typo in $aria_checked variable name in Walker_Category_Checklist::start_el().
Props dhanendran.
Fixes #40295.
Built from https://develop.svn.wordpress.org/trunk@40348


git-svn-id: http://core.svn.wordpress.org/trunk@40255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-29 11:22:47 +00:00
John Blackbourn
37a638ae8a Users: Don't push the current user's role to the top of the list in wp_dropdown_roles().
This brings consistency to the order in which roles are displayed in the `Roles` dropdown when editing users.

Props bor0

Fixes #40162

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


git-svn-id: http://core.svn.wordpress.org/trunk@40230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-24 14:53:46 +00:00
Weston Ruter
84ed6f665f Customize: Prevent links to customize.php from being generated which have query vars from wp_removable_query_args() present.
Props dlh.
See #23367, #32692.
Fixes #31850.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-22 23:04:42 +00:00
Sergey Biryukov
6a2b38ca6c Docs: Add description for $mode global in WP_MS_Sites_List_Table and WP_MS_Users_List_Table.
Fixes #40208.
Built from https://develop.svn.wordpress.org/trunk@40310


git-svn-id: http://core.svn.wordpress.org/trunk@40217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-22 03:48:42 +00:00
Sergey Biryukov
0b7148ebbb Docs: Add description for $mode global in WP_Media_List_Table and WP_Posts_List_Table.
See #40208.
Built from https://develop.svn.wordpress.org/trunk@40309


git-svn-id: http://core.svn.wordpress.org/trunk@40216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-22 03:47:07 +00:00
Sergey Biryukov
e51bc5fb6b Docs: Add missing @global entry for list table view mode in WP_Screen::render_view_mode().
Props priyankabehera155.
See #40208.
Built from https://develop.svn.wordpress.org/trunk@40308


git-svn-id: http://core.svn.wordpress.org/trunk@40215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-22 03:46:28 +00:00
Sergey Biryukov
127a2c9998 Docs: Add missing @global entry for list table view mode in wp_ajax_inline_save().
Props priyankabehera155.
See #40208.
Built from https://develop.svn.wordpress.org/trunk@40307


git-svn-id: http://core.svn.wordpress.org/trunk@40214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-22 03:45:45 +00:00
Pascal Birchler
3e189479a7 List Tables: Hide 'Empty Trash' and 'Empty Spam' buttons when view is already empty.
Props ivantedja, Presskopp, printsachen1, Jaydeep Rami, mathieuhays, cazm.
Fixes #38341.
Built from https://develop.svn.wordpress.org/trunk@40297


git-svn-id: http://core.svn.wordpress.org/trunk@40204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-17 16:54:42 +00:00
Pascal Birchler
62061bab56 Multisite: Ensure first page/post/comment content is not empty when setting up a new site.
This prevents creating page without any content when the options are populated with an empty string.

Props shadyvb.
Fixes #40036.
Built from https://develop.svn.wordpress.org/trunk@40296


git-svn-id: http://core.svn.wordpress.org/trunk@40203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-17 15:49:42 +00:00
John Blackbourn
263831a72d Press This: Verify intent before fetching in-page resources using Press This.
Props vortfu

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


git-svn-id: http://core.svn.wordpress.org/trunk@40134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 13:55:41 +00:00
Jeremy Felt
28f838ca3e Validate video and audio metadata.
Built from https://develop.svn.wordpress.org/trunk@40148


git-svn-id: http://core.svn.wordpress.org/trunk@40087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 08:01:43 +00:00
Joe McGill
d6bec79fe7 Media: Keep PDF previews from overwriting files.
Since support for PDF previews were added in [38949], it's possible
that the generated image file could overwrite an existing image file
with the same name. This uses `wp_unique_filename()` to avoid this
issue and adds a '-pdf' identifier on the end of filenames.

Props gitlost, derosj, mikeschroder, joemcgill.
Fixes #39875. See #31050.
Built from https://develop.svn.wordpress.org/trunk@40130


git-svn-id: http://core.svn.wordpress.org/trunk@40067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-27 15:39:47 +00:00
John Blackbourn
9e095f0791 Mail: Ensure entities in the site title are decoded when used in the body of the new user email.
Props ajoah
Fixes #39446

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


git-svn-id: http://core.svn.wordpress.org/trunk@40064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-26 22:20:44 +00:00
Andrea Fercia
ca44bbd134 Buttons: Fix a few .button-link glitches after [40052].
Removes some stray underlines. Explicitly set the button text to be left aligned.

Props Cheffheid, f.staude, Presskopp.

See #34242.
Fixes #35126, #38712.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-14 18:42:46 +00:00
Andrea Fercia
d33301821b Buttons: Improve the .button-link CSS class for link-like buttons.
Updates `.button-link` adding color and underline to make link-like buttons look
like links by default. Introduces `.button-link-delete` as a modifier, stackable
CSS class for red button-links.

Props Cheffheid, afercia.

See #34242.
Fixes #35126.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-09 16:47:44 +00:00
Sergey Biryukov
cb46332a82 Text Changes: Remove periods from checkbox labels in Discussion meta box to improve consistency throughout the admin.
Checkbox labels generally don't have periods, unless it's a complete sentence.

Props juhise.
Fixes #33780.
Built from https://develop.svn.wordpress.org/trunk@40032


git-svn-id: http://core.svn.wordpress.org/trunk@39969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-31 07:05:39 +00:00
Sergey Biryukov
8e84504401 Link Manager: Correct version number for _deprecated_argument() in xfn_check().
Props grapplerulrich.
Fixes #39737.
Built from https://develop.svn.wordpress.org/trunk@40029


git-svn-id: http://core.svn.wordpress.org/trunk@39966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-29 22:14:40 +00:00
Sergey Biryukov
9d7ea04936 I18N: Merge similar strings in _deprecated_argument() calls.
Add translator comments.

Props ramiy, SergeyBiryukov.
Fixes #39020.
Built from https://develop.svn.wordpress.org/trunk@40028


git-svn-id: http://core.svn.wordpress.org/trunk@39965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-29 11:50:41 +00:00
Andrew Ozz
69c29935d5 TinyMCE: improve the previews for embedded WordPress posts:
- Add option to force a sandbox iframe in wpview.
- Use it to show the embedded post preview.
- Remove the deprecated `wpembed` plugin.js

Fixes #39513.
Built from https://develop.svn.wordpress.org/trunk@40019


git-svn-id: http://core.svn.wordpress.org/trunk@39956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 04:25:44 +00:00
Dominik Schilling
21264a31e0 Press This: Do not show Categories & Tags UI for users who cannot assign terms to posts anyways.
Built from https://develop.svn.wordpress.org/trunk@39968


git-svn-id: http://core.svn.wordpress.org/trunk@39905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:58:44 +00:00
John Blackbourn
4482f92070 Posts, Post Types: When using Excerpt mode on the Posts list table, ensure the excerpt output matches what was manually entered into the Excerpt field.
Built from https://develop.svn.wordpress.org/trunk@39956


git-svn-id: http://core.svn.wordpress.org/trunk@39893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:41:44 +00:00
Sergey Biryukov
d10f451770 Docs: Add missing file header to wp-admin/includes/noop.php, introduced in [34037].
Props carl-alberto.
Fixes #39690.
Built from https://develop.svn.wordpress.org/trunk@39950


git-svn-id: http://core.svn.wordpress.org/trunk@39887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-25 23:10:43 +00:00
Felix Arntz
36fa7f72c0 Multisite: Replace is_super_admin() with manage_network_users when trying to import new users.
Props bhargavbhandari90.
Fixes #39212. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 11:39:40 +00:00
Sergey Biryukov
4fbcfe3a8c Docs: After [38672], update $type parameter description for submit_button() and get_submit_button().
Remove the mention of `secondary` and `delete` classes as core values, add `small` and `large`.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 20:37:42 +00:00
Felix Arntz
c22fea9120 Multisite: Replace is_super_admin() with manage_network_users when checking for users autocomplete capabilities.
Props ashokkumar24.
Fixes #39201. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 17:43:42 +00:00
Felix Arntz
dd23a8f48c Multisite: Do not check for is_super_admin() when trying to set user settings.
The checks were introduced in [22256] to prevent user settings to be set for super admins that were not a member of the current site. However the latter should apply to any kind of user, so the `is_super_admin()` check is redundant. Furthermore, removing these checks is necessary for the ongoing effort to get rid of `is_super_admin()` checks in general.

Props chandrapatel for initial patch.
Fixes #39199. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 17:33:41 +00:00
Sergey Biryukov
6f8644aeb2 Media: Pass the current attachment object to display_media_states filter, for consistency with display_post_states.
Props pbiron, chriseverson.
Fixes #39628.
Built from https://develop.svn.wordpress.org/trunk@39926


git-svn-id: http://core.svn.wordpress.org/trunk@39863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 05:20:41 +00:00
Sergey Biryukov
371c072b38 Media: After [36837], check the correct theme modification name for custom logo in _media_states().
Props pbiron, mitraval192.
Fixes #39627.
Built from https://develop.svn.wordpress.org/trunk@39925


git-svn-id: http://core.svn.wordpress.org/trunk@39862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-19 02:03:41 +00:00
Gary Pendergast
096b09d941 dbDelta: Ignore index subparts when checking for duplicate indices.
If index lengths change in table definitions, we don't recreate the index - instead, we throw a database error, as `dbDelta()` tries to create a new index with the same name.

It's better to leave the index as is, MySQL doesn't have an efficient process for resizing indices, and dropping/creating is a slow process which we don't want to trigger automatically.

Fixes #34870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 04:01:42 +00:00
Sergey Biryukov
54001e2756 List Tables: Pass the $which parameter to restrict_manage_posts filter instance in WP_Media_List_Table, missed in [37422].
Props wpsmith.
Fixes #38772.
Built from https://develop.svn.wordpress.org/trunk@39917


git-svn-id: http://core.svn.wordpress.org/trunk@39854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 02:38:42 +00:00
Sergey Biryukov
4d546a12cf I18N: Reference correct placeholder in a translator comment added in [30333].
See #30264.
Built from https://develop.svn.wordpress.org/trunk@39908


git-svn-id: http://core.svn.wordpress.org/trunk@39845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 08:07:43 +00:00
Sergey Biryukov
327a11ad65 Docs: Use a consistent description for $plugin parameter in various plugin API functions.
See #36333.
Built from https://develop.svn.wordpress.org/trunk@39890


git-svn-id: http://core.svn.wordpress.org/trunk@39827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:16:41 +00:00
Sergey Biryukov
a989f0b168 Docs: Improve the DocBlock for validate_plugin().
Props theMikeD.
Fixes #36333.
Built from https://develop.svn.wordpress.org/trunk@39889


git-svn-id: http://core.svn.wordpress.org/trunk@39826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:15:42 +00:00
Aaron Campbell
03e5c0314a Add nonce for widget accessibility mode.
Props vortfu.

See #23328.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 01:32:41 +00:00
Sergey Biryukov
c07571de67 Docs: Change @param type for $user_object in WP_Users_List_Table::single_row() from object to WP_User to be more accurate.
Props sebastian.pisula.
Fixes #39536.
Built from https://develop.svn.wordpress.org/trunk@39757


git-svn-id: http://core.svn.wordpress.org/trunk@39695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 12:45:44 +00:00
Sergey Biryukov
fdc2b34124 Docs: Move install_global_terms() DocBlock after the function_exists() call.
Props keesiemeijer.
Fixes #39526.
Built from https://develop.svn.wordpress.org/trunk@39754


git-svn-id: http://core.svn.wordpress.org/trunk@39692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-09 14:31:44 +00:00
Sergey Biryukov
93d4caaccd Docs: Add missing @param tag for show_post_locked_dialog filter.
Props keesiemeijer.
Fixes #39479.
Built from https://develop.svn.wordpress.org/trunk@39710


git-svn-id: http://core.svn.wordpress.org/trunk@39650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 21:59:04 +00:00
Sergey Biryukov
6e5d66c10e Docs: Move install_network() DocBlock after the function_exists() call.
Props keesiemeijer.
Fixes #39478.
Built from https://develop.svn.wordpress.org/trunk@39709


git-svn-id: http://core.svn.wordpress.org/trunk@39649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 21:58:23 +00:00
Dion Hulse
b5dbe61dab Upgrade: Fix the installation of TwentySeventeen upon upgrade from an early version.
This reverts part of [31124] which incorrectly caused `$old_wp_version` to equal the version of WordPress being upgraded to due to global variable access changes.

See #38551, #30799.
Fixes #39138 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 06:13:41 +00:00
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