John Blackbourn
80a839de13
Docs: Misc corrections and additions to inline documentation.
...
See #39130
Props keesiemeijer
Built from https://develop.svn.wordpress.org/trunk@39639
git-svn-id: http://core.svn.wordpress.org/trunk@39579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 09:28:40 +00:00
John Blackbourn
d327c92e4b
Docs: Add and correct @since docs for a variety of functions and methods.
...
Props keesiemeijer, chris_dev
Fixes #39343 , #39357 , #39344
See #39130
Built from https://develop.svn.wordpress.org/trunk@39638
git-svn-id: http://core.svn.wordpress.org/trunk@39578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 09:21:44 +00:00
John Blackbourn
4548b08236
General: Use interpolation instead of concatenation for all dynamic hook names.
...
This fixes the rendering of the hook names on developer.wordpress.org.
Props keesiemeijer
Fixes #39148
Built from https://develop.svn.wordpress.org/trunk@39600
git-svn-id: http://core.svn.wordpress.org/trunk@39540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 04:18:42 +00:00
John Blackbourn
efa99585e3
Posts, Post Types: Ensure is_page_template() can only return true when viewing a singular post query.
...
Props natereist, dlh
Fixes #39211
Built from https://develop.svn.wordpress.org/trunk@39599
git-svn-id: http://core.svn.wordpress.org/trunk@39539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 03:43:43 +00:00
John Blackbourn
5b15e8c11b
Build/Test Tools: Remove some more randomness.
...
See #37371
Built from https://develop.svn.wordpress.org/trunk@39556
git-svn-id: http://core.svn.wordpress.org/trunk@39496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 00:02:41 +00:00
John Blackbourn
da5255777a
Build/Test Tools: Reuse another fixture in the user capability tests.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39555
git-svn-id: http://core.svn.wordpress.org/trunk@39495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 23:36:41 +00:00
John Blackbourn
b5f7ab46dd
Build/Test Tools: Remove commented out tests that have existed in an unimplemented state since the dawn of the test infrastructure.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39554
git-svn-id: http://core.svn.wordpress.org/trunk@39494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 23:12:41 +00:00
John Blackbourn
16371b99d8
Users: Style the super admin message on the user editing screen as a notice, not a success message.
...
Fixes #39131
Built from https://develop.svn.wordpress.org/trunk@39531
git-svn-id: http://core.svn.wordpress.org/trunk@39471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 01:28:40 +00:00
John Blackbourn
042d09001a
Taxonomy: Correct the type for the first parameter of the the_category filter.
...
See #39130
Built from https://develop.svn.wordpress.org/trunk@39530
git-svn-id: http://core.svn.wordpress.org/trunk@39470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 01:23:42 +00:00
John Blackbourn
597627fb92
Role/Capability: Don't assign the delete_site capability to anyone on single site installs.
...
This capability is not relevant on single site installs; it only applies to deleting a site on a multisite installation.
Fixes #38326
Built from https://develop.svn.wordpress.org/trunk@39494
git-svn-id: http://core.svn.wordpress.org/trunk@39434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 22:07:39 +00:00
John Blackbourn
5ffc6a7fe0
Users: Clarify the return value of get_current_user_id() for non-logged-in users.
...
Props ovenall
Fixes #39051
Built from https://develop.svn.wordpress.org/trunk@39486
git-svn-id: http://core.svn.wordpress.org/trunk@39426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:25:16 +00:00
John Blackbourn
89ef3af655
Build/Test Tools: Correctly set up the current screen during list table tests so that they don't fail when run individually.
...
Props desrosj
Fixes #38761
Built from https://develop.svn.wordpress.org/trunk@39481
git-svn-id: http://core.svn.wordpress.org/trunk@39421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:04:43 +00:00
John Blackbourn
9011477638
Build/Test Tools: Add an extra WP_Error assertion when testing a valid user activation key. This provides a better failure message if the assertion does fail.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39364
git-svn-id: http://core.svn.wordpress.org/trunk@39304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:58:10 +00:00
John Blackbourn
b8ca8e16e5
Build/Test Tools: When testing the output of wp_list_pages(), use a known and fixed date for each post so the tests don't fail when the date changes between the beginning and end of a test.
...
Props xrmx
Fixes #38688
Built from https://develop.svn.wordpress.org/trunk@39363
git-svn-id: http://core.svn.wordpress.org/trunk@39303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:57:42 +00:00
John Blackbourn
c2d709e9d6
I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment.
...
See #38882
Built from https://develop.svn.wordpress.org/trunk@39326
git-svn-id: http://core.svn.wordpress.org/trunk@39266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 02:46:30 +00:00
John Blackbourn
40af377f57
Remove an erroneous @TODO introduced in [39323].
...
See #38882
Built from https://develop.svn.wordpress.org/trunk@39324
git-svn-id: http://core.svn.wordpress.org/trunk@39264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:26:30 +00:00
John Blackbourn
4cf5550d8d
I18n: Begin introducing translator comments for strings which include placeholders but no accompanying translator comment.
...
Adds context to one string used in two different contexts for the new user and new site signup email notification.
More to come.
See #38882
Built from https://develop.svn.wordpress.org/trunk@39323
git-svn-id: http://core.svn.wordpress.org/trunk@39263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:22:32 +00:00
John Blackbourn
7e11873b43
Build/Test Tools: Re-use a bunch of fixtures in test classes for user and XMLRPC tests.
...
Shaves a couple of seconds off of the tests.
See #30017 , #38716
Built from https://develop.svn.wordpress.org/trunk@39189
git-svn-id: http://core.svn.wordpress.org/trunk@39129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 01:54:33 +00:00
John Blackbourn
b9033ad6a1
Docs: Improve the documentation for parameters which accept OBJECT, ARRAY_A, and ARRAY_N as parameters.
...
See #37770
Built from https://develop.svn.wordpress.org/trunk@39188
git-svn-id: http://core.svn.wordpress.org/trunk@39128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 23:00:32 +00:00
John Blackbourn
cf786e592c
Build/Test Tools: Utilise assertWPError() and assertNotWPError() in more places.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39174
git-svn-id: http://core.svn.wordpress.org/trunk@39114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 00:02:30 +00:00
John Blackbourn
11d46ae3a8
Build/Test Tools: Utilise assertFileExists() and assertFileNotExists() in more places.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39173
git-svn-id: http://core.svn.wordpress.org/trunk@39113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:50:33 +00:00
John Blackbourn
6941992403
Themes: Re-use fixtures in the wp_get_document_title() tests.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39172
git-svn-id: http://core.svn.wordpress.org/trunk@39112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:32:33 +00:00
John Blackbourn
fa5b5199e8
Editor: Correct the docblock for the wp_default_editor filter.
...
Props dimadin
See #38327
Built from https://develop.svn.wordpress.org/trunk@39139
git-svn-id: http://core.svn.wordpress.org/trunk@39079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:17:56 +00:00
John Blackbourn
5c7aa3c5b8
Editor: Correct the description of the parameter passed to the wp_default_editor filter.
...
Props goto10
Fixes #38327
Built from https://develop.svn.wordpress.org/trunk@39074
git-svn-id: http://core.svn.wordpress.org/trunk@39016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 19:56:30 +00:00
John Blackbourn
766ff15532
I18N: Revert [39069] as it needs some more work.
...
See #38485
Built from https://develop.svn.wordpress.org/trunk@39070
git-svn-id: http://core.svn.wordpress.org/trunk@39012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 16:07:32 +00:00
John Blackbourn
0ff0dcc7de
Plugins: Correct the since docs for the various plugin_action_links filters.
...
Props tfrommen, SergeyBiryukov
Built from https://develop.svn.wordpress.org/trunk@39063
git-svn-id: http://core.svn.wordpress.org/trunk@39005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 19:38:47 +00:00
John Blackbourn
babd79fb36
Posts, Post Types: Prevent users from being able to delete a protected meta field from a post.
...
Previously a user could remove a protected meta field by using their browser developer tools to alter the form field properties in the Custom Fields meta box, given that they know the ID of the protected meta field. This change prevents this by preventing any change to a protected meta field, including changing its key.
Props ajoah, johnbillion, peterwilsoncc
Fixes #38293
Built from https://develop.svn.wordpress.org/trunk@39062
git-svn-id: http://core.svn.wordpress.org/trunk@39004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 19:30:32 +00:00
John Blackbourn
8c811f8f90
XML-RPC: Correctly handle empty and duplicate comments.
...
This prevents `wp_die()` being sent in response to an XML-RPC call that attempts to submit a duplicate comment, and correctly returns an error in response to an attempt to submit an empty comment.
Props markoheijnen, websupporter.
Fixes #14452 , #38466 .
See #36901
Built from https://develop.svn.wordpress.org/trunk@39045
git-svn-id: http://core.svn.wordpress.org/trunk@38987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 01:27:31 +00:00
John Blackbourn
5b0d11791f
Role/Capability: Introduce capability tests for promoting, removing, and deleting users, and capability tests for editing comments.
...
Also introduces a shared fixture for a super admin user.
See #38236
Built from https://develop.svn.wordpress.org/trunk@39035
git-svn-id: http://core.svn.wordpress.org/trunk@38977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:31:33 +00:00
John Blackbourn
2d0d9cfbf9
Customize: Avoid using assertNotFalse() in tests because it's not available in PHPUnit 3.6.
...
See #35395
Built from https://develop.svn.wordpress.org/trunk@39020
git-svn-id: http://core.svn.wordpress.org/trunk@38962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 15:42:36 +00:00
John Blackbourn
328922cc82
Customize: Correct the CRUD tests for custom CSS on multisite.
...
See #35395
Built from https://develop.svn.wordpress.org/trunk@39017
git-svn-id: http://core.svn.wordpress.org/trunk@38959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 14:04:30 +00:00
John Blackbourn
2b6ceeb465
Customize: Correct the capability mapping and associated tests for the unfiltered_css capability.
...
Fixes #35395
Built from https://develop.svn.wordpress.org/trunk@39016
git-svn-id: http://core.svn.wordpress.org/trunk@38958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 12:47:31 +00:00
John Blackbourn
2f7f2c68f0
Role/Capability: Reuse a fixture in a couple more unit tests.
...
See #30017
Built from https://develop.svn.wordpress.org/trunk@39008
git-svn-id: http://core.svn.wordpress.org/trunk@38950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 00:33:42 +00:00
John Blackbourn
bc5c87710e
Administration: Standardise the docblocks for the handle_bulk_actions-* filters.
...
Props ericlewis, Veraxus
Fixes #16031
Built from https://develop.svn.wordpress.org/trunk@38958
git-svn-id: http://core.svn.wordpress.org/trunk@38901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:45:29 +00:00
John Blackbourn
d2173fd5b0
Administration: Switch to handle_network_bulk_actions-{$screen} for the bulk listing screen actions in the network admin area.
...
Props ericlewis, Veraxus
See #16031
Built from https://develop.svn.wordpress.org/trunk@38957
git-svn-id: http://core.svn.wordpress.org/trunk@38900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:37:29 +00:00
John Blackbourn
6161ad9020
Formatting: Don't overwrite the status header for Ajax responses that use output buffering or otherwise set their headers early.
...
Fixes #35666
Built from https://develop.svn.wordpress.org/trunk@38956
git-svn-id: http://core.svn.wordpress.org/trunk@38899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:32:28 +00:00
John Blackbourn
b4db9fbe3d
Build/Test Tools: Continue eliminating randomness in tests.
...
See #37371
Built from https://develop.svn.wordpress.org/trunk@38938
git-svn-id: http://core.svn.wordpress.org/trunk@38881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 01:24:43 +00:00
John Blackbourn
1e6a12db38
Feeds: Don't attempt to generate RSS feeds for invalid feed URLs such as wp-content/feed.
...
Props stevenkword, JRGould, lyubomir_popov, johnbillion
Fixes #30210
Built from https://develop.svn.wordpress.org/trunk@38929
git-svn-id: http://core.svn.wordpress.org/trunk@38872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 21:54:31 +00:00
John Blackbourn
d151e08aa6
Feeds: Greatly reduce the number of dummy posts that are generated for the Atom tests, following on from [38924].
...
See #35160
Built from https://develop.svn.wordpress.org/trunk@38927
git-svn-id: http://core.svn.wordpress.org/trunk@38870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:59:30 +00:00
John Blackbourn
92dfd29aee
Feeds: Greatly reduce the number of dummy posts that are generated for the RSS2 tests. This speeds the tests up.
...
See #35160 , #30210
Built from https://develop.svn.wordpress.org/trunk@38924
git-svn-id: http://core.svn.wordpress.org/trunk@38867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:17:37 +00:00
John Blackbourn
2dfc3a7572
General: Correct the docs for the default HTTP status code used by wp_die().
...
See #37770
Built from https://develop.svn.wordpress.org/trunk@38884
git-svn-id: http://core.svn.wordpress.org/trunk@38827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 13:13:58 +00:00
John Blackbourn
4e65c0cfb4
REST API: Correct a documentation typo.
...
Props Zuige
Fixes #38458
See #38456
Built from https://develop.svn.wordpress.org/trunk@38879
git-svn-id: http://core.svn.wordpress.org/trunk@38822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 15:56:30 +00:00
John Blackbourn
f96940f574
REST API: Correct a documentation typo.
...
Props Zuige
Fixes #38458
Built from https://develop.svn.wordpress.org/trunk@38878
git-svn-id: http://core.svn.wordpress.org/trunk@38821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 15:52:40 +00:00
John Blackbourn
e099b4d947
Role/Capability: Add tests for the exist user capability.
...
See #38236
Built from https://develop.svn.wordpress.org/trunk@38861
git-svn-id: http://core.svn.wordpress.org/trunk@38804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 14:12:32 +00:00
John Blackbourn
16ccab2ef9
Role/Capability: Improve the test which asserts that a user can edit their own profile.
...
All users can edit their own profile, as this ability is not linked to an explicit capability. Technically, it should map to the `exist` capability, which will be addressed at a later date.
See #31518
Built from https://develop.svn.wordpress.org/trunk@38860
git-svn-id: http://core.svn.wordpress.org/trunk@38803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 13:47:33 +00:00
John Blackbourn
7696a3a8c6
oEmbed: Remove the oEmbed provider unit tests.
...
This reverts [38454] along with its follow-up commits, [38512], [38514], and [38692]. These tests are currently not pass
ing, and maybe they never will. The tests are in a group which does not run by default without a flag, making them quest
ionably useful.
We can re-visit this at a later date.
See #32360
Built from https://develop.svn.wordpress.org/trunk@38840
git-svn-id: http://core.svn.wordpress.org/trunk@38783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:16:30 +00:00
John Blackbourn
f5a3446e4d
Customize: Improve the labelling of background and header images in the list mode of the media library.
...
Props deltafactory, coreymcollins, desrosj
Fixes #22857
Built from https://develop.svn.wordpress.org/trunk@38831
git-svn-id: http://core.svn.wordpress.org/trunk@38774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 23:03:31 +00:00
John Blackbourn
374a079746
Role/Capability: Disregard the order of capabilities when testing that single site and multisite capability tests match.
...
See #38191
Built from https://develop.svn.wordpress.org/trunk@38802
git-svn-id: http://core.svn.wordpress.org/trunk@38745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 23:36:28 +00:00
John Blackbourn
afff60c378
Themes: Improve the inline documentation for the get_*_template() functions by providing examples instead of verbose explanations.
...
Fixes #38249
See #37770
Built from https://develop.svn.wordpress.org/trunk@38789
git-svn-id: http://core.svn.wordpress.org/trunk@38732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 14:20:29 +00:00
John Blackbourn
dec7dd74ea
Users: Use the role name instead of the role display name when fetching the list of users with no role. This avoids false positives when dealing with user roles that, for example, contain spaces in the display name.
...
Props procodewp, choongsavvii
Fixes #38234
Built from https://develop.svn.wordpress.org/trunk@38787
git-svn-id: http://core.svn.wordpress.org/trunk@38730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 12:05:30 +00:00
John Blackbourn
35e1f5faa5
Role/Capability: Add tests for all user roles that check custom capabilities that do not have any form of handling (eg. in a map_meta_cap filter).
...
See #38191
Built from https://develop.svn.wordpress.org/trunk@38769
git-svn-id: http://core.svn.wordpress.org/trunk@38712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 14:40:30 +00:00
John Blackbourn
45edc9ec57
Build/Test Tools: Continue eliminating randomness in tests.
...
See [38762]
See #37371
Built from https://develop.svn.wordpress.org/trunk@38763
git-svn-id: http://core.svn.wordpress.org/trunk@38706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 01:30:29 +00:00
John Blackbourn
72ccdfd70b
Build/Test Tools: Begin eliminating unnecessary randomness in tests.
...
Although unlikely, clashes in randomly generated strings could cause unexpected failures. In addition, most randomness is entirely unnecessary, is bad practice, and increases test time (however small it may be).
See #37371
Built from https://develop.svn.wordpress.org/trunk@38762
git-svn-id: http://core.svn.wordpress.org/trunk@38705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 01:12:31 +00:00
John Blackbourn
0b0868efc3
Build/Test Tools: Revert [38759]. PHPUnit's @requires syntax was introduced in PHPUnit 3.7, but the tests for PHP 5.2 use PHPUnit 3.6 because it's the latest version that supports PHP 5.2.
...
Fixes #38256
Built from https://develop.svn.wordpress.org/trunk@38761
git-svn-id: http://core.svn.wordpress.org/trunk@38704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 22:43:31 +00:00
John Blackbourn
282864e2fc
Media: Correct the hostname used in the wp_get_attachment_metadata() test.
...
See #36246
Built from https://develop.svn.wordpress.org/trunk@38760
git-svn-id: http://core.svn.wordpress.org/trunk@38703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 12:05:30 +00:00
John Blackbourn
615b70b45f
Build/Test Tools: Make use of PHPUnit's @requires notation.
...
Fixes #38256
Built from https://develop.svn.wordpress.org/trunk@38759
git-svn-id: http://core.svn.wordpress.org/trunk@38702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 01:20:29 +00:00
John Blackbourn
ebe86537ce
HTTP API: Remove an unnecessary duplicate HTTP request in the HTTP tests.
...
See #30017
Built from https://develop.svn.wordpress.org/trunk@38758
git-svn-id: http://core.svn.wordpress.org/trunk@38701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 01:03:29 +00:00
John Blackbourn
e82de0c7fb
HTTP API: Convert the POST redirect test to use a dataProvider in order for its speed to be more accurately measured.
...
See #38237
Built from https://develop.svn.wordpress.org/trunk@38757
git-svn-id: http://core.svn.wordpress.org/trunk@38700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 00:30:30 +00:00
John Blackbourn
c0f1a49575
Themes: Remove paged.php from the theme template hierarchy.
...
The position of this template within the hierarchy is of so little use that zero themes in the WordPress.org theme directory make use of it. It's second only to `index.php` in the hierarchy, meaning that any archive template such as `category.php` or `archive.php` will be chosen before it.
Fixes #38162
Props ryankienstra for initial patch
Built from https://develop.svn.wordpress.org/trunk@38755
git-svn-id: http://core.svn.wordpress.org/trunk@38698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 21:03:31 +00:00
John Blackbourn
0383319aef
Role/capability: Add more complete capability and role assertions to existing user capability tests. Also reuses one more user account fixtures.
...
Fixes #38236
See #38235
Built from https://develop.svn.wordpress.org/trunk@38732
git-svn-id: http://core.svn.wordpress.org/trunk@38675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 17:18:28 +00:00
John Blackbourn
7869eaa0c6
Role/Capability: Reuse some user account fixtures in the user capability tests.
...
See #38235
Built from https://develop.svn.wordpress.org/trunk@38731
git-svn-id: http://core.svn.wordpress.org/trunk@38674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 16:57:30 +00:00
John Blackbourn
b84023ea33
Taxonomy: Introduce more fine grained capabilities for managing taxonomy terms.
...
This introduces the singular `edit_term`, `delete_term`, and `assign_term` meta capabilities for terms, and switches the base capability name for tags from `manage_categories` to `manage_post_tags` and the corresponding `edit_post_tags`, `delete_post_tags`, and `assign_post_tags`.
All of these capabilities ultimately map to `manage_categories` so by default there is no change in the behaviour of the capabilities for categories, tags, or custom taxonomies. The `map_meta_cap` filter and the `capabilities` argument when registering a taxonomy now allow for control over editing, deleting, and assigning individual terms, as well as a separation of capabilities for tags from those of categories.
Fixes #35614
Props johnjamesjacoby for feedback
Built from https://develop.svn.wordpress.org/trunk@38698
git-svn-id: http://core.svn.wordpress.org/trunk@38641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:40:28 +00:00
John Blackbourn
16674f715f
Role/Capability: Introduce tests that assert the primitive and meta capability tests test the correct capabilities.
...
Fixes #38191
Built from https://develop.svn.wordpress.org/trunk@38697
git-svn-id: http://core.svn.wordpress.org/trunk@38640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:12:28 +00:00
John Blackbourn
8ee12405a5
Role/Capability: Correct some meta capabilities that were incorrectly listed as primitive capabilities in the role and capability tests.
...
See #38191
Built from https://develop.svn.wordpress.org/trunk@38696
git-svn-id: http://core.svn.wordpress.org/trunk@38639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:11:28 +00:00
John Blackbourn
52cf3d3d0f
Role/Capability: Add explicit cases to map_meta_cap() for various meta capabilities that are used in core. This will allow more complete meta and primitive capability unit tests in #38191 .
...
Fixes #38201
Built from https://develop.svn.wordpress.org/trunk@38695
git-svn-id: http://core.svn.wordpress.org/trunk@38638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:06:28 +00:00
John Blackbourn
a51267269b
HTTP API: Add a $component parameter to wp_parse_url() to give it parity with PHP's parse_url() function.
...
Fixes #36356
Props jrf
Built from https://develop.svn.wordpress.org/trunk@38694
git-svn-id: http://core.svn.wordpress.org/trunk@38637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 21:47:28 +00:00
John Blackbourn
a1ef815d04
Built/Test Tools: Unify the way the permastructure is set when used in conjunction with re-registering the initial taxonomies. This ensure that rewrite rules for taxonomies are consistently available.
...
Fixes #35452
Built from https://develop.svn.wordpress.org/trunk@38654
git-svn-id: http://core.svn.wordpress.org/trunk@38597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-26 17:02:29 +00:00
John Blackbourn
61ff4980a4
Administration: Remove the input qualifier for the .regular-text class rule. This allows for other elements such as textareas to be styled with the same width as regular text inputs.
...
Fixes #20928
Props curdin
Built from https://develop.svn.wordpress.org/trunk@38653
git-svn-id: http://core.svn.wordpress.org/trunk@38596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-26 16:46:33 +00:00
John Blackbourn
34a7bc4e67
Upgrade/Install: Automatically log users in after installation.
...
This change means that after entering their site's settings upon installation, users are immediately logged in and redirected to the admin dashboard, instead of being presented with the 'Success!' screen and then being asked to log in. This reduces friction and reduces the number of steps for installation.
Fixes #34084
Built from https://develop.svn.wordpress.org/trunk@38619
git-svn-id: http://core.svn.wordpress.org/trunk@38562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 11:42:30 +00:00
John Blackbourn
e482549183
Themes: Add the non-encoded form of the queried item slug to the template hierarchy when the slug contains non-ASCII characters.
...
This affects category, tag, and custom taxonomy archives, and single posts, pages, and custom post types.
Fixes #37655
Built from https://develop.svn.wordpress.org/trunk@38583
git-svn-id: http://core.svn.wordpress.org/trunk@38526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 00:48:28 +00:00
John Blackbourn
e6e6cbf21f
Taxonomy: Revert accidental changes introduced in [38578].
...
See #18302
Built from https://develop.svn.wordpress.org/trunk@38579
git-svn-id: http://core.svn.wordpress.org/trunk@38522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 22:58:28 +00:00
John Blackbourn
c0bb9c2562
Themes: Improve child theme file inheritance by introducing functions for locating and fetching the URL or path to files within child and parent themes.
...
The most useful function this introduces is `get_theme_file_uri()`, which returns the URL to the specified file in the child theme if it exists, and falls back to the URL to the specified file in the parent theme. This allows parent themes to reference files (including enqueuing CSS and JavaScript files) that can be overridden by the child theme simply by existing.
This change also introduces `get_theme_file_path()`, which is the file path equivalent of `get_theme_file_uri()`.
Finally, `get_parent_theme_file_uri()` and `get_parent_theme_file_path()` are also introduced, which allow a theme to specifically reference a file URL or file path in the parent theme. These can be used as replacements for `get_template_directory_uri()` and `get_template_directory()` respectively, for consistency.
Props johnbillion, georgestephanis, gma992.
Fixes #18302
Built from https://develop.svn.wordpress.org/trunk@38578
git-svn-id: http://core.svn.wordpress.org/trunk@38521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 22:54:32 +00:00
John Blackbourn
3afaf2147c
Formatting: Don't send an HTTP status code in wp_send_json() by default. This avoids clobbering an HTTP status code that may have been set prior to calling this function.
...
Props westonruter
See #35666
Built from https://develop.svn.wordpress.org/trunk@38576
git-svn-id: http://core.svn.wordpress.org/trunk@38519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 13:45:34 +00:00
John Blackbourn
8bec516c18
Menus: Correct the docblocks for Walker_Nav_Menu, wp_nav_menu(), and walk_nav_menu_tree().
...
This corrects the parameter type for the `$args` and `$item` parameters passed throughout these functions, class methods, and hooks.
See #24587
See #35206
See #37770
Built from https://develop.svn.wordpress.org/trunk@38559
git-svn-id: http://core.svn.wordpress.org/trunk@38502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-07 16:15:30 +00:00
John Blackbourn
cfe941cd6f
Role/Capability: Correct the multisite cap tests after [38521].
...
See #35614
See #32394
Built from https://develop.svn.wordpress.org/trunk@38522
git-svn-id: http://core.svn.wordpress.org/trunk@38463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-05 12:09:30 +00:00
John Blackbourn
9cf899d6f9
Role/Capability: Split meta and primitive capabilities in the helper functions in the roles and capability tests so primitive capability tests can be made more accurate.
...
See #35614
See #32394
Built from https://develop.svn.wordpress.org/trunk@38521
git-svn-id: http://core.svn.wordpress.org/trunk@38462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-05 11:00:32 +00:00
John Blackbourn
d098687501
Taxonomy: Introduce some taxonomy capability tests in preparation for introducing more fine grained capabilities for terms.
...
See #35614
Built from https://develop.svn.wordpress.org/trunk@38516
git-svn-id: http://core.svn.wordpress.org/trunk@38457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-03 02:15:36 +00:00
John Blackbourn
a3b581ce64
Embeds: Clarify some assertion failure messages and correct a test URL for Twitter timelines.
...
See #32360
Built from https://develop.svn.wordpress.org/trunk@38514
git-svn-id: http://core.svn.wordpress.org/trunk@38455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 22:53:30 +00:00
John Blackbourn
2559ade0ae
Embeds: Update the oEmbed provider test suite.
...
* Remove the manual flag for HTTPS support and replace it with a simple check on the URL format.
* Ensure `testOembedTestsCoverAllProviders()` actually fails when a new provider is added without a corresponding test.
See #32360
Built from https://develop.svn.wordpress.org/trunk@38512
git-svn-id: http://core.svn.wordpress.org/trunk@38453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 21:36:44 +00:00
John Blackbourn
69c152cee7
Taxonomy: Correct the function description for wp_ajax_add_link_category().
...
See #37770
Built from https://develop.svn.wordpress.org/trunk@38490
git-svn-id: http://core.svn.wordpress.org/trunk@38431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 00:49:29 +00:00
John Blackbourn
01c3ae084b
Taxonomy: Update various docs for parameters which are now WP_Term objects.
...
See #37770
See #14162
Built from https://develop.svn.wordpress.org/trunk@38489
git-svn-id: http://core.svn.wordpress.org/trunk@38430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 00:40:29 +00:00
John Blackbourn
14e40fd20c
Role/Capability: Add two missing meta capabilities to the caps tests.
...
See #32394
Built from https://develop.svn.wordpress.org/trunk@38482
git-svn-id: http://core.svn.wordpress.org/trunk@38423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 21:34:30 +00:00
John Blackbourn
049c36d11f
HTTP API: Revert changes to wp_parse_url() while PHP 5.2 errors are investigated.
...
See #36356
Built from https://develop.svn.wordpress.org/trunk@38456
git-svn-id: http://core.svn.wordpress.org/trunk@38397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 00:24:31 +00:00
John Blackbourn
d412234bc1
HTTP API: Separate the test for wp_parse_url() with -1 as its component into a separate test, so the remaining tests can use strict type checking. This helps avoid gotches with the potentially empty values (ie. null) that we're testing for.
...
See #36356
Built from https://develop.svn.wordpress.org/trunk@38453
git-svn-id: http://core.svn.wordpress.org/trunk@38394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 18:31:30 +00:00
John Blackbourn
fad4b94bab
HTTP API: The tests for wp_parse_url() can't be strict on type because this causes the tests to fail on PHP 5.2 which, bizarrely, returns the results of parse_url() (when called with a $component parameter) in a different order to later PHP versions.
...
Fixes #36356
Built from https://develop.svn.wordpress.org/trunk@38452
git-svn-id: http://core.svn.wordpress.org/trunk@38393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 17:49:29 +00:00
John Blackbourn
3a9cc4bf11
Posts, Post Types: Introduce a missing private query var that should have been introduced as part of #15459 .
...
This private query var allows the hierarchical page query on the Pages listing screen to query for `wp_posts.ID, wp_posts.post_parent` instead of `wp_posts.*`. This introduces large memory and time savings when the site contains a large number of Pages. Combined with the processing time savings introduced in [31730] this makes the Pages listing screen considerably more performant.
Fixes #34982
Props rodrigosprimo
Built from https://develop.svn.wordpress.org/trunk@38451
git-svn-id: http://core.svn.wordpress.org/trunk@38392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 17:40:30 +00:00
John Blackbourn
ebe159a4bc
HTTP API: Prevent a fatal error on PHP < 5.4.7 due to changes introduced in [38449].
...
Fixes #36356
Built from https://develop.svn.wordpress.org/trunk@38450
git-svn-id: http://core.svn.wordpress.org/trunk@38391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 17:16:30 +00:00
John Blackbourn
4fd9ad1ce2
HTTP API: Add a $component parameter to wp_parse_url() to give it parity with PHP's parse_url() function.
...
Fixes #36356
Props jrf
Built from https://develop.svn.wordpress.org/trunk@38449
git-svn-id: http://core.svn.wordpress.org/trunk@38390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 16:36:28 +00:00
John Blackbourn
27770f200c
Themes: Correct the type for the $name parameter of the get_header, get_footer, get_sidebar, and get_template_part_{$slug} hooks.
...
See #37770
Built from https://develop.svn.wordpress.org/trunk@38434
git-svn-id: http://core.svn.wordpress.org/trunk@38375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 20:42:30 +00:00
John Blackbourn
a96f20f9b5
Comments: Add support for all HTTP protocol versions when returning a 405 from wp-comments-post.php.
...
Fixes #37863
Props tnash
Built from https://develop.svn.wordpress.org/trunk@38432
git-svn-id: http://core.svn.wordpress.org/trunk@38373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 12:00:32 +00:00
John Blackbourn
b3faafc632
Themes: Correct the list of possible values for the dynamic portion of the {$type}_template_hierarchy and {$type}_template filters.
...
See #14310
Built from https://develop.svn.wordpress.org/trunk@38428
git-svn-id: http://core.svn.wordpress.org/trunk@38369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 23:57:49 +00:00
John Blackbourn
dbdc1c28b1
I18N: Correct various instances of incorrect usage of esc_attr_e().
...
Fixes #37457
Props henry.wright, afercia
Built from https://develop.svn.wordpress.org/trunk@38424
git-svn-id: http://core.svn.wordpress.org/trunk@38365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:06:30 +00:00
John Blackbourn
a7c3974cdc
Upgrade/Install: Don't display PHP errors during installation.
...
If a user is installing WordPress for the first time and has set `WP_DEBUG` to true, a PHP error during installation makes for a visually jarring experience.
Fixes #37358
Built from https://develop.svn.wordpress.org/trunk@38423
git-svn-id: http://core.svn.wordpress.org/trunk@38364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 17:50:29 +00:00
John Blackbourn
348c50b2a8
Formatting: Add a parameter to wp_send_json_error(), wp_send_json_success(), and wp_send_json() for specifying the HTTP response code.
...
Defaults to `200` in all cases, but can be used, for example, to return a `403` when using `wp_send_json_error()`.
Fixes #35666
Props stephenharris
Built from https://develop.svn.wordpress.org/trunk@38422
git-svn-id: http://core.svn.wordpress.org/trunk@38363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 17:42:28 +00:00
John Blackbourn
a1d61a95e1
Security: Return a 403 instead of a 200 HTTP status when check_ajax_referer() fails.
...
This is, unfortunately, untestable in the current test suite, even in the AJAX tests.
Fixes #36362
Built from https://develop.svn.wordpress.org/trunk@38421
git-svn-id: http://core.svn.wordpress.org/trunk@38362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 17:31:30 +00:00
John Blackbourn
b85e322e35
Security: Trigger a _doing_it_wrong() when check_ajax_referer() is called without its first parameter. This brings it inline with check_admin_referer().
...
Fixes #36361
Built from https://develop.svn.wordpress.org/trunk@38420
git-svn-id: http://core.svn.wordpress.org/trunk@38361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 17:15:28 +00:00
John Blackbourn
6b3a3713fd
Themes: Introduce tests for the theme template hierarchy.
...
See #14310
Built from https://develop.svn.wordpress.org/trunk@38419
git-svn-id: http://core.svn.wordpress.org/trunk@38360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 16:19:28 +00:00
John Blackbourn
d346835bfb
Themes: Update filter names in the inline documentation for the get_*_template() functions.
...
See #14310 , #37770
Built from https://develop.svn.wordpress.org/trunk@38418
git-svn-id: http://core.svn.wordpress.org/trunk@38359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 16:15:30 +00:00
John Blackbourn
5985804f1f
Permalinks: Correct an invalid peramstructure tag in a test.
...
Fixes #37858
Built from https://develop.svn.wordpress.org/trunk@38417
git-svn-id: http://core.svn.wordpress.org/trunk@38358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 12:53:29 +00:00
John Blackbourn
17db8134c4
Query: Add and improve tests for query conditionals on the front page and home page.
...
See #37851
Built from https://develop.svn.wordpress.org/trunk@38413
git-svn-id: http://core.svn.wordpress.org/trunk@38354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 02:02:32 +00:00