Commit Graph

34456 Commits

Author SHA1 Message Date
Sergey Biryukov c298cefcd4 Docs: Fix typo in a comment in `check_and_publish_future_post()`.
See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@37403 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-08 12:45:18 +00:00
Dominik Schilling (ocean90) 3cd86d0e21 External Libraries: Replace `split()` with `explode()` in the deprecated Atom and MagpieRSS files.
Before PHP7 `split()` was throwing a deprecated notice, in PHP7 the function is completely removed and throws a fatal error.

Props achbed.
Fixes #20673.

git-svn-id: https://develop.svn.wordpress.org/trunk@37402 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-07 15:58:42 +00:00
Nikolay Bachiyski d61dabfc3c External Libraries: Update plupload from upstream
git-svn-id: https://develop.svn.wordpress.org/trunk@37383 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-06 18:01:13 +00:00
Dominik Schilling (ocean90) 42e9b6a8a8 External Libraries: Update MediaElement.js from upstream.
git-svn-id: https://develop.svn.wordpress.org/trunk@37370 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-06 17:50:53 +00:00
Sergey Biryukov 427c92cafe Options: After [33738], consistently pass option name as the second parameter to the `'default_option_' . $option` filter in `add_option()` and `update_option()`.
Props dlh.
Fixes #36761.

git-svn-id: https://develop.svn.wordpress.org/trunk@37367 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-05 20:23:43 +00:00
Drew Jaynes 265afb64a9 Docs: Remove backticks from the DocBlock summary for `WP::$request`, added in [37356].
Markdown formatting is not supported in DocBlock summaries, per the inline documentation standards for PHP :-)

See #32246. See #36674.


git-svn-id: https://develop.svn.wordpress.org/trunk@37366 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-05 20:02:19 +00:00
Jeremy Felt 356514e994 Multisite: Use the admin-multisite Dashicon for sites
This icon was added to Dashicons in 4.3, but not applied to anything in our CSS.

Uses the more appropriate `dashicons-admin-multisite` when displaying the sites menu item.

Props Ipstenu, ocean90.
Fixes #36754.


git-svn-id: https://develop.svn.wordpress.org/trunk@37365 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-05 17:12:12 +00:00
Jeremy Felt 705b36d63d Revert [37362], which incorrectly changed Dashicons CSS
`dashicons.css` is an external-ish library and the change there is incorrect.

See #36754.


git-svn-id: https://develop.svn.wordpress.org/trunk@37364 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-05 15:28:24 +00:00
Helen Hou-Sandi 2ed0e470ba Revive `grunt-rtlcss`, which does not appear to enjoy syntax errors.
props netweb.
see #36753, #29792.


git-svn-id: https://develop.svn.wordpress.org/trunk@37363 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-05 15:21:10 +00:00
Jeremy Felt fdcacb5ca9 Multisite: Use the admin-multisite Dashicon in the admin menu and bar
This icon was added to Dashicons in 4.3, but not applied to anything in our CSS.

Props Ipstenu.
Fixes #36754.


git-svn-id: https://develop.svn.wordpress.org/trunk@37362 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-05 04:28:36 +00:00
Helen Hou-Sandi 0671f3a8d3 Drop Open Sans in the admin in favor of system fonts.
Rejoice, for your admins will feel more native to your surrounding computing environment and likely load faster, especially when offline, as they no longer have to talk to The Google Overlord.

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

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

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

props mattmiklic.
see #36753.


git-svn-id: https://develop.svn.wordpress.org/trunk@37361 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-04 22:06:27 +00:00
Boone Gorges f3ccef62be Users: The 'who' parameter should not interfere with 'meta_key' + 'meta_value' in `WP_User_Query`.
Props adrianosilvaferreira.
Fixes #36724.

git-svn-id: https://develop.svn.wordpress.org/trunk@37360 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-04 18:56:58 +00:00
Boone Gorges e415270afb Tests: Correct 'meta_query' syntax in test related to `WP_User_Query` 'who' param.
The test, introduced in [32207], used the incorrect syntax for 'meta_query' -
one fewer level of array-nesting than what `WP_Meta_Query` requires. This
slip uncovered a bug introduced into `WP_User_Query` in [30094], whereby
an incorrectly formatted 'meta_query' parameter would be properly parsed by
`WP_User_Query` when passed alongside `who=authors`.

We need to fix the inconsistent syntax in order to resolve #36724.

See #36724, #32019, #23849, #27026.

git-svn-id: https://develop.svn.wordpress.org/trunk@37359 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-04 18:48:08 +00:00
Boone Gorges 8e417dd09b Tests: Introduce `reset_phpmailer_instance()` function.
This function provides a more convenient method for resetting the
PHPMailer instance than the previous technique of reaching into the global.

Props welcher.
Fixes #36658.

git-svn-id: https://develop.svn.wordpress.org/trunk@37358 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-04 03:48:46 +00:00
Boone Gorges 23b3f3e2ee Add tests for `is_serialized_string()`.
Props borgesbruno.
Fixes #35952.

git-svn-id: https://develop.svn.wordpress.org/trunk@37357 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-04 03:29:47 +00:00
Eric Andrew Lewis 9e504d6476 Rewrite Rules: Add self-describing variables to rewrite matcher.
The rewrite rule matching code in WP::parse_request() used an unclear variable `$request` to represent the requested path (e.g. "2016/05/03") as well as a deceptively named variable `$request_uri`, which actually represents the requested file when an install used PATHINFO links. 

Those variables are replaced with `$requested_path` and `$requested_file` respectively for clarity.

Fixes #36674.


git-svn-id: https://develop.svn.wordpress.org/trunk@37356 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-03 19:35:20 +00:00
Drew Jaynes 20715283ce Docs: Add a missing hook doc for the `parse_comment_query` hook, added in [31793].
Props flixos90.
See #24826. Fixes #36740.


git-svn-id: https://develop.svn.wordpress.org/trunk@37355 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-03 16:21:03 +00:00
Boone Gorges c064ac690c `date_query` should be a property on `WP_Comment_Query` objects.
Instead of a local variable.

Props flixos90.
Fixes #36741.

git-svn-id: https://develop.svn.wordpress.org/trunk@37354 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-03 16:14:28 +00:00
Drew Jaynes 1c25b93a97 Links: Rename the `$link_id` parameter in `get_link_to_edit()` to `$link` to better reflect that it can accept a link ID or object.
Props tloureiro for the initial patch.
Fixes #36736.


git-svn-id: https://develop.svn.wordpress.org/trunk@37353 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 23:42:27 +00:00
Weston Ruter 0321612c4d Customize: Handle filtering `sidebars_widgets` when the underlying option is non-existent.
Fixes warning related to a non-array argument for `array_merge()` in `WP_Customize_Widgets::customize_register()`. 

See [37166].
See #36389.
Fixes #36660.


git-svn-id: https://develop.svn.wordpress.org/trunk@37352 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 23:41:18 +00:00
Drew Jaynes a76767e2ed Links: Clarify documentation for the `$link_id` parameter to mention that it accepts either an integer or object.
Props tloureiro.
See #36736.


git-svn-id: https://develop.svn.wordpress.org/trunk@37351 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 23:39:12 +00:00
Weston Ruter 018f988654 Customize: Pass `WP_Customize_Setting` instance as second argument to `customize_value_{$id_base}` filter.
Adds parity with setting instance being passed as second argument to `customize_sanitize_{$id}` and `customize_sanitize_js_{$id}`. Allows the actual ID of the (multidimensional) setting value being filtered to be inspected.

Props celloexpressions, westonruter.
Fixes #36452.


git-svn-id: https://develop.svn.wordpress.org/trunk@37350 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 22:41:36 +00:00
Drew Jaynes e85c0d94b9 Comments: Realign parameter documentation in the DocBlocks for `comment_author_email_link()` and `get_comment_author_email_link()` following [37348].
Also adds a missing return description for `get_comment_author_email_link()`.

Props flixos90 for the initial patch.
Fixes #36571.


git-svn-id: https://develop.svn.wordpress.org/trunk@37349 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 20:03:24 +00:00
Drew Jaynes 0f468dd456 Comments: Adjust `comment_author_email_link()` and `get_comment_author_email_link()` to each accept a new optional fourth parameter, `$comment`, which enables overriding the `$comment` global.
Adds tests.

Props flixos90, boonebgorges, DrewAPicture.
See #36571.


git-svn-id: https://develop.svn.wordpress.org/trunk@37348 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 19:58:23 +00:00
Weston Ruter bef15d72a4 Customize: Allow Esc key to collapse the currently-expanded panel, section (or control).
Pressing Esc collapses any expanded widget or nav menu item controls, or any control that implements the expanding interface. Also improves alignment between `WidgetControl` and `MenuItemControl`, adding the `expanded` state and associated `expand`/`collapse` methods to nav menu items.

Props purcebr, celloexpressions, westonruter.
Fixes #22237.


git-svn-id: https://develop.svn.wordpress.org/trunk@37347 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 19:52:01 +00:00
Weston Ruter a216627419 Customize: Ensure settings modified during an open save request remain dirty when save request completes.
Also disables Save & Publish button while save request is open. After the save request completes, any settings changed during the request can then be saved via an additional click to the button.

Props chandrapatel, westonruter.
Fixes #32941.


git-svn-id: https://develop.svn.wordpress.org/trunk@37346 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 19:12:37 +00:00
Eric Andrew Lewis 32ed4fadf2 Posts: Allow `get_page_uri()` to be called without a $page argument.
`get_page_uri()` can now be called without an argument, which will return the page URI for the current post in the loop.

Props pollett.
Fixes #26284.


git-svn-id: https://develop.svn.wordpress.org/trunk@37345 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 18:28:04 +00:00
Drew Jaynes 0efe87a4fb Tests: Remove debug cruft left over from [34816].
See #17078.


git-svn-id: https://develop.svn.wordpress.org/trunk@37344 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 16:23:47 +00:00
Drew Jaynes dbba2255f8 Docs: Improve the class DocBlock for `WP_Widget` to clarify which methods "should" vs "must" be overridden by extending sub-classes.
Props Frank-Klein.
Fixes #36703.


git-svn-id: https://develop.svn.wordpress.org/trunk@37343 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 04:52:55 +00:00
Drew Jaynes c7bed4f8c6 Docs: Remove inline `@see` tags from function, class, and method references in inline docs.
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.

Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37342 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 03:59:56 +00:00
Dominik Schilling (ocean90) 97dc4022c8 Customize: Increase the target size of the expand/collapse button in the customizer.
To improve accessibility on touch devices increase the size of the button in the collapsed view from 24×28 to 44×45 pixel.

Props celloexpressions.
Fixes #36093.

git-svn-id: https://develop.svn.wordpress.org/trunk@37341 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 20:28:22 +00:00
Dominik Schilling (ocean90) e420b09560 Travis CI: Include `npm prune` in the `before_script` command.
Caching of node modules was added in [37058]. `npm prune` removes extraneous packages so the cache contains only current modules.

Props netweb.
Fixes #36490.

git-svn-id: https://develop.svn.wordpress.org/trunk@37340 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 20:03:59 +00:00
Dominik Schilling (ocean90) 5d3bf61e3b Customize: Don't auto-close the customizer when a new theme is activated.
Props celloexpressions.
Fixes #35320.

git-svn-id: https://develop.svn.wordpress.org/trunk@37339 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 19:53:13 +00:00
Drew Jaynes 87ae28c40b Docs: Add backtick escaping for two inline code samples in docs.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37338 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 17:31:15 +00:00
Drew Jaynes 93c7d6becd Docs: Standardize on using `::` for `Class::method()` references in WP_Customize_Control` inline docs.
See #32246. See #meta1483.


git-svn-id: https://develop.svn.wordpress.org/trunk@37337 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 17:27:58 +00:00
Andrea Fercia 0f983ab261 Themes: restore Theme Installer missing spinner.
Fixes #36730.

git-svn-id: https://develop.svn.wordpress.org/trunk@37336 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 15:42:58 +00:00
Sergey Biryukov 8d99819276 Dashboard: Display the comment counts in `wp_dashboard_right_now()` in the rare initial condition when there are 0 approved comments and only pending comments, so the AJAX count update could work.
Props afercia.
Fixes #35519.

git-svn-id: https://develop.svn.wordpress.org/trunk@37335 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 11:05:48 +00:00
Sergey Biryukov 74fc4c6603 Docs: Document the `@return` value of `wp_add_trashed_suffix_to_post_name_for_post()`.
Props Shelob9.
Fixes #36728.

git-svn-id: https://develop.svn.wordpress.org/trunk@37334 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 10:15:51 +00:00
Weston Ruter f660ffb601 Widgets: Provide PHP 5.2 fallback for `spl_object_hash()` if disabled in logic for registering and unregistering pre-instantiated widgets.
Fixes #28216.


git-svn-id: https://develop.svn.wordpress.org/trunk@37333 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-30 22:35:27 +00:00
Dominik Schilling (ocean90) d62141c38d Plugins: In `plugin_basename()` normalize the file path before unresolving symlinks.
`$wp_plugin_paths` contains normalized paths, see `wp_register_plugin_realpath()`.

Props jdgrimes, voldemortensen, flyingdr, ocean90.
Fixes #29154.

git-svn-id: https://develop.svn.wordpress.org/trunk@37332 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-30 15:08:06 +00:00
Dominik Schilling (ocean90) c39a438d65 Plugins: In `uninstall_plugin()` pass the plugin file to `wp_register_plugin_realpath()`.
`wp_register_plugin_realpath()` calls `dirname( $file );` to remove the basename. The basename must be included in the argument or the symlinked directory won't be registered.

Props andy.
Fixes #36709.

git-svn-id: https://develop.svn.wordpress.org/trunk@37331 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-30 15:03:14 +00:00
Andrea Fercia ee30b90714 Accessibility: improve the Star Ratings hiding empty elements for assistive technologies.
Fixes #36725.

git-svn-id: https://develop.svn.wordpress.org/trunk@37330 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-30 14:32:40 +00:00
Weston Ruter 7ad11aaad8 Widgets: Allow `WP_Widget` subclass instances (objects) to be registered/unregistered in addition to `WP_Widget` subclass names (strings).
Allows widgets to be registered which rely on dependency injection. Also will allow for new widget types to be created dynamically (e.g. a Recent Posts widget for each registered post type).

See #35990.
Props mdwheele, PeterRKnight, westonruter.
Fixes #28216.


git-svn-id: https://develop.svn.wordpress.org/trunk@37329 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-29 18:48:27 +00:00
Scott Taylor ec0614cf17 Media/Unit Tests: ensure that image sizes are indeed removed when errors are raised before assertions in `Tests_Media`.
See #36588.


git-svn-id: https://develop.svn.wordpress.org/trunk@37328 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-29 17:51:54 +00:00
Scott Taylor fe85e78329 Media/Unit Tests: ensure that the GD absrtraction is used for GD unit tests for Images. Some of the procedural GD API functions can still throw `ImagickException`, which is fun.
See #36588.


git-svn-id: https://develop.svn.wordpress.org/trunk@37327 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-29 16:15:37 +00:00
Jeremy Felt 32dfe766e8 Multisite: Add the `pre_get_blogs_of_user` filter
This allows a plugin to short circuit `get_blogs_of_user()` in cases where the default behavior of the function is unnecessary or slow. (e.g. A user is a member of thousands of sites.)

Props jsternberg.
See #31746, Fixes #36707.


git-svn-id: https://develop.svn.wordpress.org/trunk@37326 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-29 15:52:34 +00:00
Scott Taylor 6dcd17ff9c Comments: pass `$comment` to `comment_text()` in `Walker_Comment::comment()` instead of using a function which can skip the cache.
Props rachelbaker.
Fixes #35433.


git-svn-id: https://develop.svn.wordpress.org/trunk@37325 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-29 15:46:39 +00:00
Boone Gorges 00c39a3f98 Query: Discard non-scalar 'm' instead of attempting to sanitize.
`WP_Query` discards most non-array date values ('year', 'monthnum', etc) by
casting to integer. Since [25138], the 'm' parameter has been handled
as a string; see #24884. However, the string-handling introduced in [25138]
blindly attempted to handle arrays and other non-scalar types as strings,
resulting in PHP notices and invalid MySQL syntax.

Props vortfu.
Fixes #36718.

git-svn-id: https://develop.svn.wordpress.org/trunk@37324 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-29 13:14:18 +00:00
Rachel Baker d73d355250 Widgets: When the Inactive Widgets section is hidden also hide the “Clear Inactive Widgets” button description text.
Props welcher.

Fixes #35592.



git-svn-id: https://develop.svn.wordpress.org/trunk@37323 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-28 20:39:22 +00:00
Weston Ruter 5989bc82ba Customize: Remove format placeholders from widget templates and selectors, fixing a jQuery selector syntax error and the broken highlight/shift-click behaviors.
The issues occur in themes that register sidebars that reference a single format placeholder (`%1$s` and `%2$s`) multiple times, such as in the `id` and `class` attributes for `$before_widget`.

Props martin.krcho, westonruter.
Fixes #36473.


git-svn-id: https://develop.svn.wordpress.org/trunk@37322 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-28 18:19:15 +00:00