Commit Graph

34148 Commits

Author SHA1 Message Date
Rachel Baker
1bee2ff07a 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

git-svn-id: https://develop.svn.wordpress.org/trunk@37313 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-26 20:28:46 +00:00
Rachel Baker
3518df091f Tests: Fix typo current_theme_support() -> current_theme_supports() from [37308]
git-svn-id: https://develop.svn.wordpress.org/trunk@37309 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-26 17:30:19 +00:00
Rachel Baker
2ff19ab7d3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37308 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-26 17:04:25 +00:00
Sergey Biryukov
274902b03a Build/Test Tools: Reset the PHPMailer mock in Tests_Mail::tearDown().
Props welcher.
Fixes #36609.

git-svn-id: https://develop.svn.wordpress.org/trunk@37307 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-23 08:15:11 +00:00
Scott Taylor
aba30dc390 Unit Tests: prevent rewrite spillage from @group author unit tests.
See #36587.


git-svn-id: https://develop.svn.wordpress.org/trunk@37306 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 23:47:27 +00:00
Scott Taylor
a776b0b6df Comments: add a $comment parameter to get_comment_author_url_link().
Add unit tests (none exist).

Props flixos90, wonderboymusic.
Fixes #36573.


git-svn-id: https://develop.svn.wordpress.org/trunk@37305 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 22:44:33 +00:00
Rachel Baker
7dd7992179 Comments: Add unordered list styling to Comments List Table rows and Moderate Comment screen.
Fixes #36160

Props juanfra.

git-svn-id: https://develop.svn.wordpress.org/trunk@37304 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 21:46:06 +00:00
Rachel Baker
9e81e20916 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37303 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 21:42:38 +00:00
Scott Taylor
e2b9072267 Dashboard: toggle the "View" link for comments when Approving / Unapproving from the Dashboard widget.
Fixes #35518.


git-svn-id: https://develop.svn.wordpress.org/trunk@37302 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 21:29:19 +00:00
Andrew Ozz
457f5ac6a0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37301 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 19:10:18 +00:00
Jeremy Felt
5af20a3de3 Tests: Account for flexible IDs in main network deletion test
After [37299], the network IDs encountered by this test may be larger than "100".

This adjusts the test to respond accordingly until we have a better way to delete networks.

See #36566.


git-svn-id: https://develop.svn.wordpress.org/trunk@37300 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 15:21:14 +00:00
Boone Gorges
7c79386135 Tests: Use the same incrementor for all fields belonging to a given text fixture.
[35244] changed the way that `WP_UnitTest_Generator_Sequence()` created an
incrementor for object fields (like 'post_name' and 'user_email'), by making
incrementor static across the entire run of the test suite. While this helped
to enforce uniqueness across the tests, it has the side effect of bumping the
incrementor between fields on the same object (so that, eg, the same post might
have `post_name` "post-12" but `post_title` "Post 13". By switching to a
technique that uses the same incrementor for each field belonging to a given
fixture, we conform better to the expectations of developers using
`WP_UnitTest_Factory`.

Fixes #35199.

git-svn-id: https://develop.svn.wordpress.org/trunk@37299 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 14:35:52 +00:00
Gary Pendergast
f9e1cf5de0 Smilies: Move convert_smilies to happen later in the the_content filter.
In particular, we want it to occur after shortcode handling. The smiley conversion routine doesn't have any concept of shortcode structure, so may inadvertantly replace a smiley with HTML inside a shortcode attribute, which will cause the shortcode to not be parsed correctly.

Props Unyson for the initial suggested fix.

Fixes #36306. 



git-svn-id: https://develop.svn.wordpress.org/trunk@37298 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 07:07:03 +00:00
Sergey Biryukov
0cc8d27fda Text Changes: Consistently refer to https://wordpress.org/plugins/ and https://wordpress.org/themes/ as WordPress Plugin Directory and WordPress Theme Directory, respectively.
Props mpol.
Fixes #35938.

git-svn-id: https://develop.svn.wordpress.org/trunk@37297 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 06:56:20 +00:00
Gary Pendergast
74e88010c0 Emoji: The :roll: smiley is now an emoji.
Unicode 8 added `U+1F644`, "Face with Rolling Eyes", which matches our `:roll:` smiley. Continuing our ever present quest to rid the world of legacy smilies, we now translate that smiley into its emoji form.

Sadly, `:mrgreen:` remains sorely under-represented in the Unicode standard, I'm inclined to think that we should buy a voting membership of the Unicode Consortium, in order to rectify that situation. (Personally, I'm hoping for a green skin tone modifier.)

Fixes #36365.
 



git-svn-id: https://develop.svn.wordpress.org/trunk@37296 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 06:28:51 +00:00
Gary Pendergast
9a4c6dc3de Database: Suppress connection error messages when WP_DEBUG isn't enabled.
This is a partial revert of [35860], which has been causing un-catchable warnings to be generated on some server configurations.

Fixes #36629 for trunk.
See #21870.



git-svn-id: https://develop.svn.wordpress.org/trunk@37292 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-22 05:18:08 +00:00
Dominik Schilling (ocean90)
153610292d Media: Remove an extra quote when sending a link of a media file to the editor.
Introduced in [37035].

Props joemcgill, swissspidy, boonebgorges.
Fixes #36578.

git-svn-id: https://develop.svn.wordpress.org/trunk@37288 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 21:20:26 +00:00
Dominik Schilling (ocean90)
d434c58404 Themes: Update list of WordPress theme features.
* Remove color tags.
* Layout: Add Grid Layout, remove Fixed Layout, Fluid Layout, and Responsive Layout.
* Features: Add Footer Widgets, remove Blavatar.
* Subject: Add Blog, E-Commerce, Education, Entertainment, Food & Drink, Holiday, News, Photography and Portfolio, remove Photoblogging and Seasonal.

Props grapplerulrich, davewarfel.
Fixes #33407.

git-svn-id: https://develop.svn.wordpress.org/trunk@37287 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 21:10:03 +00:00
Dominik Schilling (ocean90)
8be6905a89 Media: Don't cache the results of wp_mkdir_p() in a persistent cache.
To improve the performance of `wp_upload_dir()` the result of `wp_mkdir_p()` was stored in a persistent cache, introduced in [36565]. But this becomes an issue when WordPress is scaled horizontally. You may end up caching a value for a server where the directory doesn't exist which will prevent further uploads on other servers because of the persistent cache.
The fix is to use a non-persistent cache.

Props azaozz, ocean90.
See #34359.
Fixes #36621.

git-svn-id: https://develop.svn.wordpress.org/trunk@37285 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 19:57:03 +00:00
Weston Ruter
842274b66d Customize/Formatting: Move sanitize_hex_color(), sanitize_hex_color_no_hash(), and maybe_hash_hex_color() from class-wp-customize-manager.php into formatting.php.
Adds missing braces.

See #33413.
Props downstairsdev, tollmanz.
Fixes #27583.


git-svn-id: https://develop.svn.wordpress.org/trunk@37283 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 19:21:40 +00:00
John Blackbourn
b41fc5595b Feeds: Revert [36230] which removed the rss-http feed content type. Removing this means that any feeds which are using this feed content type are now being served as application/octet-stream instead of text/xml.
See #36620


git-svn-id: https://develop.svn.wordpress.org/trunk@37282 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 18:56:37 +00:00
Sergey Biryukov
ee2b95d273 Docs: Move the clarification of is_tax() and WP_Query::is_tax() return value added in [37235] to @return description.
Props DrewAPicture.
Fixes #36331.

git-svn-id: https://develop.svn.wordpress.org/trunk@37281 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 17:46:46 +00:00
Boone Gorges
ce350d5d5d Tests: More explicit fixture content when testing s=0 query string.
After [36647], the unit test generator sequence can put a 0 into the
'post_excerpt' field of a post fixture, causing false positives.

See [36520] for a parallel fix involving 'post_content'.

Fixes #36622.

git-svn-id: https://develop.svn.wordpress.org/trunk@37280 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 15:52:33 +00:00
Sergey Biryukov
23d737bc53 Administration: Introduce admin_print_footer_scripts-$hook_suffix", a dynamic version of the admin_print_footer_scripts hook.
This is now more consistent with the generic `admin_print_scripts` and the dynamic `admin_print_scripts-$hook_suffix` hooks fired in `wp-admin/admin-header.php`.

Props tfrommen.
Fixes #34334.

git-svn-id: https://develop.svn.wordpress.org/trunk@37279 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 15:16:52 +00:00
Sergey Biryukov
80601ba5f7 Docs: Reflect the new 'user' option for wp_new_user_notification()'s $notify parameter added in [37276] in wp_send_new_user_notifications() docs as well.
Props ocean90.
Fixes #36009.

git-svn-id: https://develop.svn.wordpress.org/trunk@37278 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 12:00:44 +00:00
Sergey Biryukov
d5e795ca9e Users: Add a unit test for [37276].
See #36009.

git-svn-id: https://develop.svn.wordpress.org/trunk@37277 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 11:51:59 +00:00
Sergey Biryukov
cbe4f5d9c7 Users: In wp_new_user_notification(), sdd 'user' option for the $notify parameter, which allows for sending notification only to the user created.
Props akibjorklund.
Fixes #36009.

git-svn-id: https://develop.svn.wordpress.org/trunk@37276 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 10:19:42 +00:00
Pascal Birchler
c52f851308 Rewrite Rules: After [36953], correctly replace existing rules on IIS when updating them.
Props WiZZarD_.
Fixes #36506 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@37273 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 09:32:42 +00:00
Dominik Schilling (ocean90)
eec3f16b24 Upgrader: Clear plugin/theme caches directly after a plugin/theme has been updated.
`wp_update_plugins()` and `wp_update_themes()` are both hooked into `upgrader_process_complete` with priority 10. But at this stage the caches in `get_plugins()`, `search_theme_directories()`, and `wp_get_themes()` aren't refreshed yet so both functions couldn't fetch any translations for the new plugin/theme.
To reset the caches, `wp_clean_themes_cache()` and `wp_clean_plugins_cache()` are now hooked into `upgrader_process_complete` with priority 9.

This is a follow-up to [34751].

See #34029.
Fixes #36383.

git-svn-id: https://develop.svn.wordpress.org/trunk@37272 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 09:08:11 +00:00
Drew Jaynes
6c4c867b89 Tests: Pre-declare the $year_url property before initialization in Tests_Get_Archives::setUp().
Props pbearne.
Fixes #36611.


git-svn-id: https://develop.svn.wordpress.org/trunk@37271 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 02:55:52 +00:00
Drew Jaynes
6261a0b439 Docs: Add missing return descriptions for WP_Filesystem_SSH2::chown() and WP_Filesystem_SSH2::run_command().
Fixes #30989.


git-svn-id: https://develop.svn.wordpress.org/trunk@37270 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-21 02:37:36 +00:00
Jeremy Felt
888d3524f5 Tests: Exclude ms-files test group from default PHPUnit config
Multisite specific tests run as normal with `phpunit.xml.dist` and multisite constants defined. The `ms-files` group causes pollution when mixed with the rest of the tests, so it should be excluded here too.

See #36566.


git-svn-id: https://develop.svn.wordpress.org/trunk@37269 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 17:10:21 +00:00
Aaron Jorbin
5cb70bd017 Don't announce PR builds in Slack
People may submit a PR to our travis build repo, we shouldn't notify slack when that happens.
See https://docs.travis-ci.com/user/notifications/#Slack-notifications

Fixes #36607



git-svn-id: https://develop.svn.wordpress.org/trunk@37268 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 17:08:13 +00:00
Jeremy Felt
67e6dc1c43 Tests: Add speedTrapListener to multisite's PHPUnit config
See #36566, #30017.


git-svn-id: https://develop.svn.wordpress.org/trunk@37267 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 17:01:07 +00:00
Jeremy Felt
f692459926 Tests: Allow override of MULTISITE and SUBDOMAIN_INSTALL constants
Props rmccue.
Fixes #36567.


git-svn-id: https://develop.svn.wordpress.org/trunk@37266 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 16:51:58 +00:00
Drew Jaynes
26f2705558 Docs: Clarify the return descriptions for get_the_time(), get_post_time(), and get_post_modified_time() to specify when an integer in the form of a Unix timestamp should be expected.
See [30674]. See #30989.


git-svn-id: https://develop.svn.wordpress.org/trunk@37265 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 15:54:20 +00:00
Drew Jaynes
f5d4eb7dd3 Docs: Clarify return descriptions in the DocBlocks for set_user_setting() and delete_user_setting().
See [32613]. See #30989.


git-svn-id: https://develop.svn.wordpress.org/trunk@37264 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 15:46:53 +00:00
Drew Jaynes
bb365a5dc6 Docs: Clarify parameter and return descriptions in the DocBlock for wp_set_all_user_settings().
See [32613]. See #30989.


git-svn-id: https://develop.svn.wordpress.org/trunk@37263 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 15:44:05 +00:00
Boone Gorges
33c1cd9c10 Canonical: Use get_the_terms() to verify that a post belongs to the requested %category%.
The `get_the_terms()` wrapper provides cache support, and saves a database hit
on sites with a persistent cache backend.

Props spacedmonkey.
Fixes #36602.

git-svn-id: https://develop.svn.wordpress.org/trunk@37262 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 15:34:15 +00:00
Boone Gorges
01ef43ace7 Tests: After [37260], use WP's setUpBeforeClass() wrappers.
This ensures no leakage between tests of fixture IDs.

See #36602.

git-svn-id: https://develop.svn.wordpress.org/trunk@37261 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 15:30:40 +00:00
Boone Gorges
ddd88a79b1 Add tests for permastruct containing /%category%/.
See #36602.

git-svn-id: https://develop.svn.wordpress.org/trunk@37260 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 14:59:02 +00:00
DrewAPicture
a980543f68 Docs: Capitalize URL – an acronym for Uniform Resource Locator – when used in the context of inline docs in wp-includes/link-template.php.
Fixes #30406.


git-svn-id: https://develop.svn.wordpress.org/trunk@37259 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 14:46:02 +00:00
Drew Jaynes
181cad0c7b Docs: Notate more optional parameter defaults for a variety of function DocBlocks in wp-includes/link-template.php.
See #30406.


git-svn-id: https://develop.svn.wordpress.org/trunk@37258 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 14:36:57 +00:00
Gary Pendergast
cb70ee2e50 Emoji: The diversity support test was incorrectly passing on all browsers.
[37028] missed some logic to capture the base emoji skin tone, to compare to the modified emoji skin tone. This caused all browsers to report that they supported skin tone modifiers, regardless of whether they actually did.

Fixes #36604 for trunk.



git-svn-id: https://develop.svn.wordpress.org/trunk@37256 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 13:55:18 +00:00
Boone Gorges
17dc5ba0bf Add parameter documentation for 'post_category' to wp_insert_post().
Props Latz.
Fixes #36601.

git-svn-id: https://develop.svn.wordpress.org/trunk@37255 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 13:53:32 +00:00
Drew Jaynes
4871008d0c Docs: Notate optional parameter defaults for a variety of function DocBlocks in wp-includes/link-template.php.
See #30406.


git-svn-id: https://develop.svn.wordpress.org/trunk@37254 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 06:31:05 +00:00
Drew Jaynes
b8e183b913 Docs: Properly notate optional parameters as such in a variety of DocBlocks in wp-includes/link-template.php.
See #30406.


git-svn-id: https://develop.svn.wordpress.org/trunk@37252 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-19 23:20:32 +00:00
Andrew Ozz
9688b1040f TinyMCE: backport fixes for 4.3.10:
- Conflict with typing the Euro sign on Windows: 5462e3c1dd
- opy/paste typo in the textcolor plugin: 1fc5a733e9

See #36545, for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@37251 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-19 23:00:23 +00:00
Dominik Schilling (ocean90)
4bd7394a2e Themes: Revert [36112]
Adding the `singular` class per default to the list of body classes is breaking the layout of Twenty Eleven and other themes. Twenty Eleven adds the `.singular` class only to single pages if the page doesn't use specific page templates.

Props flixos90, swissspidy.
Fixes #36510.

git-svn-id: https://develop.svn.wordpress.org/trunk@37249 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-19 21:23:20 +00:00
Aaron Jorbin
5ecf38977e Use px instead of in in device preview
Devices are not consistent in how they handle `in` units. `in` was an attempt to cleverly disguise the exact size of the 'tablet'. The PHP code standards mentions avoiding clever code ( https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#clever-code ) but we should extend that idea to the css code as well.

Props celloexpressions
Fixes #36457



git-svn-id: https://develop.svn.wordpress.org/trunk@37247 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-19 20:49:38 +00:00