Commit Graph

4549 Commits

Author SHA1 Message Date
Sergey Biryukov
f9491ed8f6 Common CSS: Allow for .nav-tab-wrapper class to be used on elements other than h3 to increase flexibility for custom settings pages.
Props ramiy, afercia.
Fixes #37257.

git-svn-id: https://develop.svn.wordpress.org/trunk@38306 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 16:32:11 +00:00
Sergey Biryukov
8673ec7459 Multisite: Fix copy/paste issue in id attribute for a dismissible message on Sites screen.
Props imath.
Fixes #37764.

git-svn-id: https://develop.svn.wordpress.org/trunk@38305 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 14:21:15 +00:00
Scott Taylor
45cd115bf6 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38303 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 04:36:42 +00:00
Weston Ruter
4c137392c8 Customize: Ensure a newly-added custom link nav menu item has the appropriate CSS class names.
For nav menu items of the `custom` type, their `object` should also be set to `custom`, so that the `menu-item-custom` class name will be added.

Props vishalkakadiya.
Fixes #37575.


git-svn-id: https://develop.svn.wordpress.org/trunk@38301 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 03:11:51 +00:00
Weston Ruter
99b6d24042 Docs: Update jsdoc in customize-nav-menus.js to remove references to Menu Customizer plugin.
Also fix `@param` for `updateAssignedLocationsInSectionTitle`.

Props gma992, westonruter.
Fixes #37520.


git-svn-id: https://develop.svn.wordpress.org/trunk@38300 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 00:55:42 +00:00
Scott Taylor
d911ef44dc Media: when calling pathinfo(), also pass a PATHINFO_* constant to avoid array notices for unset keys.
Props JaworskiMatt.
Fixes #37608.


git-svn-id: https://develop.svn.wordpress.org/trunk@38294 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 23:35:50 +00:00
Scott Taylor
a26f7f7d28 Media: Add some docs to media-gallery.js RIP.
Props jipmoors.
Fixes #37717.


git-svn-id: https://develop.svn.wordpress.org/trunk@38293 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 22:58:34 +00:00
John Blackbourn
e784e65d68 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


git-svn-id: https://develop.svn.wordpress.org/trunk@38272 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-17 18:29:47 +00:00
Dominik Schilling (ocean90)
a93c94c6b2 About Page: Add release video and move images to CDN.
Props jerrysarcastic, rosso99, petya, hugobaeta, jerrysarcastic.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38267 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-16 17:57:06 +00:00
Dominik Schilling
e8f182885a About Page: Enhance responsive images.
* Add `srcset` and `sizes` to the mobile image for streamlined updates.
* Modify the order of image candidate strings in each `srcset` to address a bug in iOS8 where the first candidate will always be selected when using `w` descriptors, see #35030.

Props joemcgill.
Fixes #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38257 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 19:27:22 +00:00
Drew Jaynes
19a85950ad Docs: Add a period missed in an argument description in [38253] for #36338.
git-svn-id: https://develop.svn.wordpress.org/trunk@38254 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 17:43:42 +00:00
Drew Jaynes
77aa4a8b72 Docs: Add documentation for all arguments accepted by export_wp().
Props theMikeD for the initial patch.
Fixes #36338.


git-svn-id: https://develop.svn.wordpress.org/trunk@38253 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 17:42:05 +00:00
Dominik Schilling
97c4e332b5 About Page: Fix punctuation errors in two strings.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38248 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-11 20:50:38 +00:00
Dominik Schilling
defc92a66e About Page: Third pass for 4.6.
* Adjust strings.
* Make strings translatable.
* Improve margin between copy and images.

Props Ipstenu, SergeyBiryukov, Presskopp, jeremyfelt, afragen, helen, Clorith, macmanx, DrewAPicture, voldemortensen, jorbin, MattyRob, ocean90.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38244 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-10 23:32:27 +00:00
Dominik Schilling
1ca2426e77 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38242 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-10 19:50:18 +00:00
Andrew Ozz
a0a6262f17 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38240 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-10 19:02:09 +00:00
Drew Jaynes
fbb173fe7c Update/Install: Provide basic back-compat styling for the .update-message CSS class in the plugins list table.
This change restores only the margin and padding styles for the `.update-message` class when used by plugins in the context of adding arbitrary rows to the list table. The inline-update colors and icon styles were not restored, expressly with a wide variety of plugin use-cases in mind.

Props ovann86, rahulsprajapati, ocean90, DrewAPicture.
Props helen for review.
See #37504.


git-svn-id: https://develop.svn.wordpress.org/trunk@38237 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-09 22:44:07 +00:00
Dominik Schilling
3844065c1a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38235 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-09 21:53:12 +00:00
Dominik Schilling
6c18bf7e3f About Page: Update video for streamlined updates and add srcset/sizes attributes for the static images.
Props hugobaeta, joemcgill.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38234 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-09 19:25:14 +00:00
Gary Pendergast
cfafcf3997 Multisite: Improve performance of the upgrade page on large networks.
The query to select the next 5 blogs to upgrade was ordered by `registered`, which isn't indexed. This causes the query to table scan, which will be slow on networks with many blogs.

The query only needs to be ordered by something that won't change, so ordering by `blog_id` is a good replacement. `blog_id` is indexed, and it's the only column being returned, so MySQL is able to optimize for a fast index read.

Props fliespl.
Fixes #37612.



git-svn-id: https://develop.svn.wordpress.org/trunk@38229 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-09 11:38:41 +00:00
Dominik Schilling
ff416b77f3 Updates: Add visual feedback when deleting themes/plugins.
This corrects the selector for the delete link in `wp.updates.deletePlugin()` so the text can be changed to 'Deleting…'. `wp.updates.deleteTheme()` already worked on wp-admin/themes.php but not on wp-admin/network/themes.php because the network screen is similar to the plugins list table, this is now fixed too.
The `credential-modal-cancel` handler has been updated to support canceled delete jobs.

Props swissspidy.
Props jorbin for review.
Fixes #37603.

git-svn-id: https://develop.svn.wordpress.org/trunk@38227 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-09 10:38:28 +00:00
Dominik Schilling
dfed8d47a6 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38225 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-09 09:06:15 +00:00
Aaron Jorbin
7044243aa2 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@38221 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-09 01:13:08 +00:00
Aaron Jorbin
3d057fef40 Updates: Standardize JS Custom Event Names
Custom JS events are triggered on the document in order for plugins to have something to hook into.  The standard began in #31819 is dash separated and begins with `wp` to signify the namespace, followed by the subject of our action ( "theme", "plugin", etc.) followed by the action and an optional indicator of status ( "install-success", "deleting" ).

This brings some of the theme hooks in line with the standard.  As of now, all plugin actions in `src/wp-admin/js/updates.js` have an equal corresponding theme action.

Fixes #37598.
See #37512, #37216, #31819.
Props olarmarius, ocean90.




git-svn-id: https://develop.svn.wordpress.org/trunk@38218 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-08 22:48:33 +00:00
Dominik Schilling
b12c1a8ad2 About Page: Use a better version of the mp4 video.
The previous version had the wrong colors. Also remove ogv from the list, it has the wrong colors too and all current browsers support either the mp4 or webm format.

See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38215 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-08 16:01:39 +00:00
Dominik Schilling
eb55b21131 About Page: Second pass for 4.6.
* Update images for native fonts and editor features.
* Add video animation with image fallback for update feature. 
* Rename "Simplified Disaster Recovery" to "Content Recovery".
* Fix broken layout on credits and freedoms pages.

Props hugobaeta, SergeyBiryukov, ocean90.
Fixes #37590.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38213 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-07 12:47:52 +00:00
Dominik Schilling
0b1f2f7ca3 Update/Install: Remove the .notice-error class before adding classes for the update process.
Prevents displaying an update message with error styling.

Props obenland.
Props SergeyBiryukov for review.
Fixes #37550.

git-svn-id: https://develop.svn.wordpress.org/trunk@38209 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-05 22:56:53 +00:00
Dominik Schilling
8317d0735a Customize: Increase the target size of the 'Edit Menu' button.
Props celloexpressions.
Props afercia, helen for review.
Fixes #36795.

git-svn-id: https://develop.svn.wordpress.org/trunk@38207 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-05 22:37:54 +00:00
Dominik Schilling
a02d4c4a16 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38205 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-05 19:27:56 +00:00
John Blackbourn
5cc963a721 Docs: Correct and clarify various @since docs.
Fixes #37562


git-svn-id: https://develop.svn.wordpress.org/trunk@38201 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 22:53:40 +00:00
Dominik Schilling
152fba56cc 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38199 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 22:17:44 +00:00
Dominik Schilling
0e2a61dca9 Plugins: Also update aria-labels when a plugin update fails.
Previously the label was stuck at "Updating…".

Props afercia, ocean90.
Props DrewAPicture for review.
Fixes #37556.

git-svn-id: https://develop.svn.wordpress.org/trunk@38196 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 21:05:19 +00:00
Dominik Schilling
9628a53be7 Customize: Make the menu edit button look like a link.
The button was introduced in [37901] to allow users switching to the selected menu for further edits. A link makes it more clear that the user is taken away from the current view.
This also adds an aria label and makes the button label more verbose, 'Edit Menu'.

Props afercia.
Props helen for review.
Fixes #36795.

git-svn-id: https://develop.svn.wordpress.org/trunk@38189 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 22:44:58 +00:00
Aaron Jorbin
cd6a017b66 Updates: Clean up debug statements.
Removing some `console.error` calls leftover from development and wrapping the `console.log` call in a check to ensure `console.log` exists.

Fixes #37514.
Props ocean90, obenland



git-svn-id: https://develop.svn.wordpress.org/trunk@38186 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 22:27:51 +00:00
Aaron Jorbin
10906c673f 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. 



git-svn-id: https://develop.svn.wordpress.org/trunk@38185 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 22:23:50 +00:00
Dominik Schilling
cc524820be About Page: First pass for 4.6 with strings (not yet translatable) and images (not CDN).
Props macmanx, jorbin, hugobaeta, DrewAPicture, peterwilsoncc, iamfriendly, rahulsprajapati, vishalkakadiya, petya, celloexpressions, westonruter, mikeschroder, zetaraffix, mapk, boonebgorges, adamsilverstein, jeremyfelt, rosso99, karmatosed, swissspidy, michael-arestad, ramiy, ocean90.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38183 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 19:53:44 +00:00
Aaron Jorbin
11a5970263 Upgrade/Install: Trigger additional JS events in shiny updates
Events for updating exist, but they lack context. This adds args so that plugins can detec t what plugin/theme is being installed.  Additionally, events for bulk actions, deleting and that and install is starting didn't exist, so this adds them.

Fixes #37512.
Props DavidAnderson, and ocean90, swissspidy for review.



git-svn-id: https://develop.svn.wordpress.org/trunk@38175 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-31 18:56:57 +00:00
Dominik Schilling
dbe140910b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38172 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-31 18:10:45 +00:00
Dominik Schilling
af6b1a5388 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38168 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 17:42:01 +00:00
Dominik Schilling
d097c1d916 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38167 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 17:09:27 +00:00
Andrew Ozz
d16d808d8b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38159 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 23:23:21 +00:00
Dominik Schilling
86b5cfcb83 Plugins: Use history.pushState() to customize the URL during searches.
`history.pushState()` requires an event handler for `popstate` which doesn't exist (yet).

Props rahulsprajapati for initial patch.
Fixes #37233.

git-svn-id: https://develop.svn.wordpress.org/trunk@38154 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 20:00:29 +00:00
Helen Hou-Sandi
7f6bfb42fe System fonts: Adjust the smaller tabs so they appear as tabs.
The tab effect comes from overlapping the border of the box below. Only applies to OSX; testing did not reveal adverse effects in other OSes.

props ocean90.
see #36753.


git-svn-id: https://develop.svn.wordpress.org/trunk@38153 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 16:45:16 +00:00
Helen Hou-Sandi
1e21bf9bf7 System fonts: Don't quote single-word font names, per our coding standards.
props ocean90, netweb.
see #36753.


git-svn-id: https://develop.svn.wordpress.org/trunk@38152 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 16:38:49 +00:00
Dominik Schilling
076cbcdb71 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38151 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-25 15:27:43 +00:00
Sergey Biryukov
cc9e4262ca Plugins: Add a missing space between classes on <td> element for custom columns of the Plugins list table.
Props crstauf.
Fixes #37460.

git-svn-id: https://develop.svn.wordpress.org/trunk@38149 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-25 13:27:42 +00:00
Sergey Biryukov
22b3bdc333 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38147 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-23 13:04:47 +00:00
Dominik Schilling
6f5f178e8c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38146 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-23 10:58:23 +00:00
Sergey Biryukov
65ba451f5b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38142 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 16:50:01 +00:00
Dominik Schilling
0780b19984 Plugins: Make search field placeholder translatable.
See #37230.

git-svn-id: https://develop.svn.wordpress.org/trunk@38141 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 14:50:22 +00:00
Dominik Schilling
ec783d67b9 Docs: Fix minor formatting issue for a comment added in [38113].
See #32171.

git-svn-id: https://develop.svn.wordpress.org/trunk@38139 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 13:45:33 +00:00
Dominik Schilling
92231118dd 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38138 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 12:09:55 +00:00
Dominik Schilling
b19f91f4bb Post Thumbnails: Remove an unused nonce in _wp_post_thumbnail_html().
See #12922.



git-svn-id: https://develop.svn.wordpress.org/trunk@38137 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 11:43:36 +00:00
Dominik Schilling
4fd98bb5ed Media: Remove global import for $content_width in _wp_post_thumbnail_html().
`$content_width` is unused since [35023].

See #28512.

git-svn-id: https://develop.svn.wordpress.org/trunk@38136 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 11:39:28 +00:00
Dominik Schilling
db037aad34 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38134 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 10:42:35 +00:00
Sergey Biryukov
90d4614157 Editor: Improve styling of "Add Media" button on mobile and make it more consistent with media buttons added by plugins.
Props FolioVision.
Fixes #36999.

git-svn-id: https://develop.svn.wordpress.org/trunk@38132 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 21:53:09 +00:00
Sergey Biryukov
0c1b988a63 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38131 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:23:56 +00:00
Sergey Biryukov
58e390d1ac 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38130 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:20:50 +00:00
Sergey Biryukov
48f6fddb49 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38129 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:18:36 +00:00
Sergey Biryukov
068ecc915c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38128 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 18:00:41 +00:00
Sergey Biryukov
1db7b8441a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38127 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 17:59:52 +00:00
Andrew Ozz
fb1fbcfdc0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38126 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 03:41:17 +00:00
Dominik Schilling
44676ab38f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38119 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:31:50 +00:00
Joe McGill
2586eeeeca 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38118 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:23:36 +00:00
Mike Schroder
ffb2db0521 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38113 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 07:34:54 +00:00
Sergey Biryukov
79e7fca981 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38109 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 23:11:25 +00:00
Dominik Schilling
b9606d3c4a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38101 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 11:54:09 +00:00
Dominik Schilling
ff6d8819e4 Filesystem API: Cleanup temporary file when the temporary file couldn't be opened.
Props ruud@joyo.
See #34772.
Fixes #36942, #36943.

git-svn-id: https://develop.svn.wordpress.org/trunk@38094 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 19:42:48 +00:00
Dominik Schilling
5b6ab5a596 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38091 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 13:59:17 +00:00
Andrea Fercia
7b833f38a6 Accessibility: Improve keyboard navigation on the themes browser modal window.
Improves the `containFocus()` function to always get the correct first and last
focusable elements, even when the theme browser shows the active theme details.
Also, when on the first and last theme, adds a `disabled` attribute on the
previous and next navigation buttons to make them not focusable.

Fixes #37383.

git-svn-id: https://develop.svn.wordpress.org/trunk@38084 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 22:18:35 +00:00
Sergey Biryukov
b87911eccb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38082 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 21:02:21 +00:00
Sergey Biryukov
fd19901336 Text Changes: Change Network deactivate %s to upper case, for consistency with Network Activate %s.
See #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@38081 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 17:03:24 +00:00
Sergey Biryukov
776b3c3f1d Text Changes: Add a full stop to "Invalid taxonomy" and "Invalid term ID" strings, for consistency with similar post-related messages.
See #18218, #32329.

git-svn-id: https://develop.svn.wordpress.org/trunk@38077 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 16:14:27 +00:00
Sergey Biryukov
8d81483b5e I18N: Combine two duplicate "Invalid post type" strings.
Props @ramiy.
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38076 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 16:04:50 +00:00
Dominik Schilling
8756f2912f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38075 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 15:31:29 +00:00
Sergey Biryukov
f160118827 I18N: Change unnecessary uppercased words in WP_Upgrader::generic_strings() to lower case.
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38074 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 13:28:13 +00:00
Sergey Biryukov
bc2a58755f I18N: Combine two duplicate "Unable to locate WordPress Theme directory" strings.
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38073 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 12:57:06 +00:00
Sergey Biryukov
751f76fbaf Text Changes: After [37297], replace two more instances of "WordPress.org Plugin Directory" with "WordPress Plugin Directory".
See #35938.

git-svn-id: https://develop.svn.wordpress.org/trunk@38072 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 12:49:12 +00:00
Sergey Biryukov
8308164a77 I18N: After [38057], consistently use a context for other instances of Activate %s, Network Activate %s, and Delete %s strings.
See #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@38071 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 23:19:05 +00:00
Boone Gorges
a33080dbf5 On term.php, use $taxnow when fetching currently edited term.
[36874] changed the `get_term()` call so that no `$taxonomy` parameter
was passed, as 4.4 made the parameter optional. This change made it
impossible to access a shared term that has not yet been splitr, since
passing an ambiguous `$term_id` to `get_term()` results in an error.
Restoring the `$taxonomy` parameter fixes the regression.

Props alleynoah, dlh.
Fixes #37205.

git-svn-id: https://develop.svn.wordpress.org/trunk@38069 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 18:36:15 +00:00
Sergey Biryukov
cc4bc59293 Permalinks: Rename $usingpi to $using_index_permalinks for clarity.
See #37380.

git-svn-id: https://develop.svn.wordpress.org/trunk@38067 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 12:45:01 +00:00
Sergey Biryukov
d5ba63e6a5 Permalinks: After [37747], make sure $usingpi, $writable, and $update_required are defined before checking them on permalinks update.
Props Clorith.
Fixes #37380.

git-svn-id: https://develop.svn.wordpress.org/trunk@38066 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 12:43:16 +00:00
Dominik Schilling
f24f22ce4c Users: Update help text for user-new.php to remove reference to sending passwords via email.
Props anneschmidt.
Fixes #36763.

git-svn-id: https://develop.svn.wordpress.org/trunk@38064 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-14 21:50:45 +00:00
Dominik Schilling
94c2212de8 Update/Install: Give context to some install/update strings to allow for differentiation between theme and plugin translations.
Props swissspidy, SergeyBiryukov.
Fixes #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@38057 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 17:31:15 +00:00
Drew Jaynes
55692a6e6b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38051 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 15:23:04 +00:00
Dominik Schilling
e332cfbed8 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38046 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 12:53:06 +00:00
Andrew Ozz
afea5ef3a7 TinyMCE: preserve <script> and <style> tags inside the editor.
Uses image placeholders for the tags and makes then visible. That way the tags can also be deleted from inside the editor.

Props iseulde, azaozz.
Fixes #32923.

git-svn-id: https://develop.svn.wordpress.org/trunk@38039 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 22:08:28 +00:00
Pascal Birchler
68cff6ac40 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38033 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-11 21:49:30 +00:00
Dominik Schilling
1991213da7 Multisite: Use hash_equals() when comparing hashes to mitigate timing attacks.
Fixes #37324.

git-svn-id: https://develop.svn.wordpress.org/trunk@38032 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 19:42:02 +00:00
Dominik Schilling
310d406274 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38031 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 19:30:20 +00:00
Drew Jaynes
13ec34335a Docs: Standardize references to "meta box" or "meta boxes" as two distinct words throughout core documentation per the core spelling guide.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38029 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 00:55:21 +00:00
Drew Jaynes
5cf0ef170a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38028 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 00:50:21 +00:00
Dominik Schilling
408ac29bfb Docs: Fix a typo in the DocBlock for themes_api(), themes_api, plugins_api(), and plugins_api.
See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38025 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 14:38:33 +00:00
Drew Jaynes
ea78fbdcdb Docs: Fix minor formatting and syntax for wp-admin/* elements introduced in 4.6.
See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38024 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:59:16 +00:00
Drew Jaynes
c717040925 Docs: Cross-reference parent classes in DocBlocks for upgrader classes moved to their own files in 4.6
See #36618. See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38023 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:44:23 +00:00
Drew Jaynes
871fadef86 Docs: Improve usefulness of DocBlocks for ajax-actions.php functions introduced in 4.6.
See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38022 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:22:57 +00:00
Pascal Birchler
d1db1f5e10 Upgrade/Install: Do not remove event handlers when trying to update a theme.
Previously, when clicking "Update now" the callbacks were erroneously removed. This prevented opening the filesystem credentials modal for a second time.

Fixes #37285.

git-svn-id: https://develop.svn.wordpress.org/trunk@38019 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 11:42:04 +00:00
Dominik Schilling
c68f1ec772 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38015 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 14:36:37 +00:00
Sergey Biryukov
ec1f83f770 Docs: Fix typo in a comment in Core_Upgrader::upgrade().
Props Zuige.
Fixes #37314.

git-svn-id: https://develop.svn.wordpress.org/trunk@38014 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 13:18:31 +00:00
Rachel Baker
437d80e56c Revisions: Allow autosaves to be restored when revisions are disabled.
Fixes bug introduced in [23639] where autosaves are not restored if revisions are disabled.

Props adamsilverstein.
Fixes #36262.




git-svn-id: https://develop.svn.wordpress.org/trunk@38009 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 01:15:19 +00:00