Drew Jaynes
ebfc1467bb
Links: Rename the $link_id
parameter in get_link_to_edit()
to $link
to better reflect that it can accept a link ID or object.
...
Props tloureiro for the initial patch.
Fixes #36736 .
Built from https://develop.svn.wordpress.org/trunk@37353
git-svn-id: http://core.svn.wordpress.org/trunk@37319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 23:43:27 +00:00
Weston Ruter
4113ccfc47
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 .
Built from https://develop.svn.wordpress.org/trunk@37352
git-svn-id: http://core.svn.wordpress.org/trunk@37318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 23:42:28 +00:00
Drew Jaynes
3470faa683
Links: Clarify documentation for the $link_id
parameter to mention that it accepts either an integer or object.
...
Props tloureiro.
See #36736 .
Built from https://develop.svn.wordpress.org/trunk@37351
git-svn-id: http://core.svn.wordpress.org/trunk@37317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 23:40:27 +00:00
Weston Ruter
f98a2ed41d
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 .
Built from https://develop.svn.wordpress.org/trunk@37350
git-svn-id: http://core.svn.wordpress.org/trunk@37316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 22:42:26 +00:00
Drew Jaynes
5f62db2f21
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 .
Built from https://develop.svn.wordpress.org/trunk@37349
git-svn-id: http://core.svn.wordpress.org/trunk@37315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 20:04:28 +00:00
Drew Jaynes
a6c393828d
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 .
Built from https://develop.svn.wordpress.org/trunk@37348
git-svn-id: http://core.svn.wordpress.org/trunk@37314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 19:59:27 +00:00
Weston Ruter
3a37220f2a
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 .
Built from https://develop.svn.wordpress.org/trunk@37347
git-svn-id: http://core.svn.wordpress.org/trunk@37313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 19:52:28 +00:00
Weston Ruter
a0d7e83beb
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 .
Built from https://develop.svn.wordpress.org/trunk@37346
git-svn-id: http://core.svn.wordpress.org/trunk@37312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 19:13:26 +00:00
Eric Lewis
aba14233d9
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 .
Built from https://develop.svn.wordpress.org/trunk@37345
git-svn-id: http://core.svn.wordpress.org/trunk@37311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 18:29:29 +00:00
Drew Jaynes
f3a90cd1a6
Tests: Remove debug cruft left over from [34816].
...
See #17078 .
Built from https://develop.svn.wordpress.org/trunk@37344
git-svn-id: http://core.svn.wordpress.org/trunk@37310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 16:24:29 +00:00
Drew Jaynes
6683100d2c
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 .
Built from https://develop.svn.wordpress.org/trunk@37343
git-svn-id: http://core.svn.wordpress.org/trunk@37309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 04:53:27 +00:00
Drew Jaynes
fe3b007fdd
Docs: Remove inline @see
tags from function, class, and method references in inline docs.
...
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.
Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@37342
git-svn-id: http://core.svn.wordpress.org/trunk@37308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 04:00:28 +00:00
Dominik Schilling
9354965638
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 .
Built from https://develop.svn.wordpress.org/trunk@37341
git-svn-id: http://core.svn.wordpress.org/trunk@37307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 20:29:27 +00:00
Dominik Schilling
f0962c42ab
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 .
Built from https://develop.svn.wordpress.org/trunk@37340
git-svn-id: http://core.svn.wordpress.org/trunk@37306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 20:04:27 +00:00
Dominik Schilling
823ec71cd6
Customize: Don't auto-close the customizer when a new theme is activated.
...
Props celloexpressions.
Fixes #35320 .
Built from https://develop.svn.wordpress.org/trunk@37339
git-svn-id: http://core.svn.wordpress.org/trunk@37305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 19:54:27 +00:00
Drew Jaynes
664bb85f1b
Docs: Add backtick escaping for two inline code samples in docs.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@37338
git-svn-id: http://core.svn.wordpress.org/trunk@37304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 17:32:26 +00:00
Drew Jaynes
0055c9746c
Docs: Standardize on using ::
for Class::method()
references in WP_Customize_Control` inline docs.
...
See #32246 . See #meta1483.
Built from https://develop.svn.wordpress.org/trunk@37337
git-svn-id: http://core.svn.wordpress.org/trunk@37303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 17:28:27 +00:00
Andrea Fercia
22bae92301
Themes: restore Theme Installer missing spinner.
...
Fixes #36730 .
Built from https://develop.svn.wordpress.org/trunk@37336
git-svn-id: http://core.svn.wordpress.org/trunk@37302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 15:43:27 +00:00
Sergey Biryukov
dc5815146e
Dashboard: Display the comment counts in wp_dashboard_right_now()
in the rare initial condition when there are 0 approved comments and only pending comments, so the AJAX count update could work.
...
Props afercia.
Fixes #35519 .
Built from https://develop.svn.wordpress.org/trunk@37335
git-svn-id: http://core.svn.wordpress.org/trunk@37301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 11:06:28 +00:00
Sergey Biryukov
49a47bb255
Docs: Document the @return
value of wp_add_trashed_suffix_to_post_name_for_post()
.
...
Props Shelob9.
Fixes #36728 .
Built from https://develop.svn.wordpress.org/trunk@37334
git-svn-id: http://core.svn.wordpress.org/trunk@37300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 10:16:29 +00:00
Weston Ruter
6693acdb24
Widgets: Provide PHP 5.2 fallback for spl_object_hash()
if disabled in logic for registering and unregistering pre-instantiated widgets.
...
Fixes #28216 .
Built from https://develop.svn.wordpress.org/trunk@37333
git-svn-id: http://core.svn.wordpress.org/trunk@37299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-30 22:36:28 +00:00
Dominik Schilling
4b51bc18cc
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 .
Built from https://develop.svn.wordpress.org/trunk@37332
git-svn-id: http://core.svn.wordpress.org/trunk@37298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-30 15:09:27 +00:00
Dominik Schilling
697a6d5560
Plugins: In uninstall_plugin()
pass the plugin file to wp_register_plugin_realpath()
.
...
`wp_register_plugin_realpath()` calls `dirname( $file );` to remove the basename. The basename must be included in the argument or the symlinked directory won't be registered.
Props andy.
Fixes #36709 .
Built from https://develop.svn.wordpress.org/trunk@37331
git-svn-id: http://core.svn.wordpress.org/trunk@37297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-30 15:04:27 +00:00
Andrea Fercia
93c8cdbaed
Accessibility: improve the Star Ratings hiding empty elements for assistive technologies.
...
Fixes #36725 .
Built from https://develop.svn.wordpress.org/trunk@37330
git-svn-id: http://core.svn.wordpress.org/trunk@37296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-30 14:33:29 +00:00
Weston Ruter
96104fdd30
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 .
Built from https://develop.svn.wordpress.org/trunk@37329
git-svn-id: http://core.svn.wordpress.org/trunk@37295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-29 18:49:26 +00:00
Scott Taylor
fb82d557cd
Media/Unit Tests: ensure that image sizes are indeed removed when errors are raised before assertions in Tests_Media
.
...
See #36588 .
Built from https://develop.svn.wordpress.org/trunk@37328
git-svn-id: http://core.svn.wordpress.org/trunk@37294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-29 17:52:29 +00:00
Scott Taylor
188bea204b
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 .
Built from https://develop.svn.wordpress.org/trunk@37327
git-svn-id: http://core.svn.wordpress.org/trunk@37293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-29 16:16:27 +00:00
Jeremy Felt
2e94a24e25
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 .
Built from https://develop.svn.wordpress.org/trunk@37326
git-svn-id: http://core.svn.wordpress.org/trunk@37292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-29 15:53:28 +00:00
Scott Taylor
5efc557eb8
Comments: pass $comment
to comment_text()
in Walker_Comment::comment()
instead of using a function which can skip the cache.
...
Props rachelbaker.
Fixes #35433 .
Built from https://develop.svn.wordpress.org/trunk@37325
git-svn-id: http://core.svn.wordpress.org/trunk@37291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-29 15:47:27 +00:00
Boone Gorges
9bf510260f
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 .
Built from https://develop.svn.wordpress.org/trunk@37324
git-svn-id: http://core.svn.wordpress.org/trunk@37290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-29 13:15:30 +00:00
Rachel Baker
15eaa665c1
Widgets: When the Inactive Widgets section is hidden also hide the “Clear Inactive Widgets” button description text.
...
Props welcher.
Fixes #35592 .
Built from https://develop.svn.wordpress.org/trunk@37323
git-svn-id: http://core.svn.wordpress.org/trunk@37289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-28 20:40:28 +00:00
Weston Ruter
09860ae46c
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 .
Built from https://develop.svn.wordpress.org/trunk@37322
git-svn-id: http://core.svn.wordpress.org/trunk@37288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-28 18:20:29 +00:00
Michael Arestad
7726afe693
Component: Administration
...
Setting the background color on `body` is more flexible than on the `html` element. This patch assigns the background color to `body` instead of the `html` element.
Fixes #35314
Built from https://develop.svn.wordpress.org/trunk@37321
git-svn-id: http://core.svn.wordpress.org/trunk@37287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-28 03:16:28 +00:00
Eric Lewis
cc1b2fae67
Database: Set MySQL connection collation.
...
Fixes #36649 .
Built from https://develop.svn.wordpress.org/trunk@37320
git-svn-id: http://core.svn.wordpress.org/trunk@37286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-28 01:39:26 +00:00
Eric Lewis
d6a377acdc
Build/Test Tools: Document WP_UnitTestCase->go_to()
...
Fixes #36679 .
Built from https://develop.svn.wordpress.org/trunk@37319
git-svn-id: http://core.svn.wordpress.org/trunk@37285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-27 18:25:29 +00:00
Jeremy Felt
0df948da2d
Tests: Reduce unnecessary count in create_many()
in multisite user tests
...
The tests for `is_blog_user()` and `is_user_member_of_blog()` should be refactored. Until then, we can shave several seconds from the test time by avoiding unnecessary loops of the same tests.
See #36566 .
Built from https://develop.svn.wordpress.org/trunk@37318
git-svn-id: http://core.svn.wordpress.org/trunk@37284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-27 06:33:27 +00:00
Jeremy Felt
6226af307b
Users: Prevent spammy users from resetting their passwords in multisite
...
Props r-a-y, websupporter.
Fixes #24617 .
Built from https://develop.svn.wordpress.org/trunk@37317
git-svn-id: http://core.svn.wordpress.org/trunk@37283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-27 05:55:27 +00:00
Jeremy Felt
98d8ad680b
Users: Provide a full user object when checking for a spammy multisite user
...
`is_user_spammy()` falls back to the current user if one is not provided. There is no current user during authentication, so the result is always `false`. Pass a user to fill the void.
Adds tests for `wp_authenticate_spam_check()`.
Props websupporter.
Fixes #36546 .
Built from https://develop.svn.wordpress.org/trunk@37316
git-svn-id: http://core.svn.wordpress.org/trunk@37282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-27 05:36:28 +00:00
Eric Lewis
02a4e761f2
Users: Correct inline docs for cookie expiration.
...
Props kjbenk.
Fixes #35568 .
Built from https://develop.svn.wordpress.org/trunk@37315
git-svn-id: http://core.svn.wordpress.org/trunk@37281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-27 02:52:28 +00:00
Rachel Baker
56c18bb5af
Users: Remove the “Name” column of the Users table from appearing sortable.
...
The “Name” column of the Users WP List Table is not sortable because this column displays a concatenation of two optional values, `first_name` and `last_name`. Even if WP_User_Query supported ordering queries in this manner, the resulting sequence would be chaotic.
Fixes #28064 .
Props jesin, and rachelbaker.
Built from https://develop.svn.wordpress.org/trunk@37314
git-svn-id: http://core.svn.wordpress.org/trunk@37280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-26 20:35:29 +00:00
Rachel Baker
ddbde15454
Post Thumbnails: Fix logic bug and tests from [37308] where post-thumbnails support wasn’t added if there were no previous post_types with support already.
...
See #22080
Built from https://develop.svn.wordpress.org/trunk@37313
git-svn-id: http://core.svn.wordpress.org/trunk@37279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-26 20:29:27 +00:00
Rachel Baker
e510918b4e
Tests: Fix typo current_theme_support()
-> current_theme_supports()
from [37308]
...
Built from https://develop.svn.wordpress.org/trunk@37309
git-svn-id: http://core.svn.wordpress.org/trunk@37275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-26 17:31:29 +00:00
Rachel Baker
af5c5a9a25
Post Thumbnails: When using add_theme_support( ‘post-thumbnails’, array( $post_types) )
merge the supported post_types.
...
Allow the adding of post-thumbnail support for one or more post_types without unsetting any previously added post_types. This matches the behavior of other uses of `add_theme_support()` and the expectations of a function with a prefix of “add”.
To unset post-thumbnail support use `remove_theme_support()` instead.
Fixes #22080
Props alexkingorg, jmichaelward, and flixos90.
Built from https://develop.svn.wordpress.org/trunk@37308
git-svn-id: http://core.svn.wordpress.org/trunk@37274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-26 17:05:31 +00:00
Sergey Biryukov
f3b7842281
Build/Test Tools: Reset the PHPMailer mock in Tests_Mail::tearDown()
.
...
Props welcher.
Fixes #36609 .
Built from https://develop.svn.wordpress.org/trunk@37307
git-svn-id: http://core.svn.wordpress.org/trunk@37273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-23 08:16:29 +00:00
Scott Taylor
be6a91bf58
Unit Tests: prevent rewrite spillage from @group author
unit tests.
...
See #36587 .
Built from https://develop.svn.wordpress.org/trunk@37306
git-svn-id: http://core.svn.wordpress.org/trunk@37272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 23:48:27 +00:00
Scott Taylor
8ec77ea445
Comments: add a $comment
parameter to get_comment_author_url_link()
.
...
Add unit tests (none exist).
Props flixos90, wonderboymusic.
Fixes #36573 .
Built from https://develop.svn.wordpress.org/trunk@37305
git-svn-id: http://core.svn.wordpress.org/trunk@37271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 22:45:27 +00:00
Rachel Baker
e02de569a6
Comments: Add unordered list styling to Comments List Table rows and Moderate Comment screen.
...
Fixes #36160
Props juanfra.
Built from https://develop.svn.wordpress.org/trunk@37304
git-svn-id: http://core.svn.wordpress.org/trunk@37270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 21:47:26 +00:00
Rachel Baker
8b0e1859bc
Comments: Keep comments safe in the Edit Post screen.
...
Warns users that have added a new Comment or began editing an existing without saving their changes, before they press the “update” button which would wipe out their comment changes.
Fixes #32818 .
Props polevaultweb.
Built from https://develop.svn.wordpress.org/trunk@37303
git-svn-id: http://core.svn.wordpress.org/trunk@37269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 21:43:28 +00:00
Scott Taylor
be59d289b7
Dashboard: toggle the "View" link for comments when Approving / Unapproving from the Dashboard widget.
...
Fixes #35518 .
Built from https://develop.svn.wordpress.org/trunk@37302
git-svn-id: http://core.svn.wordpress.org/trunk@37268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 21:30:28 +00:00
Andrew Ozz
59d388038e
TinyMCE: prevent showing the placeholder URL when adding a link and clicking more than once on the Insert Link button.
...
Props iseulde.
Fixes #36637 for trunk.
Built from https://develop.svn.wordpress.org/trunk@37301
git-svn-id: http://core.svn.wordpress.org/trunk@37267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 19:11:28 +00:00