Commit Graph

32311 Commits

Author SHA1 Message Date
Scott Taylor b6b2baccbd Unit Tests: create more fixtures for `Tests_User`. When using a factory to create ad hoc users, use the inherited static prop `$static_factory` instead of the instance prop, `$factory`. If 2 factories are used out of sync, the generator sequences diverge and dupes can be created, causing an untold number of unforeseen errors. Yay.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35188


git-svn-id: http://core.svn.wordpress.org/trunk@35154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 05:30:25 +00:00
Sergey Biryukov 09ee95ea49 Themes: Add Install Parent Theme button for child themes that are missing a parent theme.
Props rabmalin for initial patch.
Fixes #32668.
Built from https://develop.svn.wordpress.org/trunk@35187


git-svn-id: http://core.svn.wordpress.org/trunk@35153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 05:11:24 +00:00
Scott Taylor 5cebd10ced Unit Tests: implement `setUpBeforeClass()` and `tearDownAfterClass()` on `WP_UnitTestCase`. Use late static binding (plus a gross fallback for PHP 5.2) to check if `wpSetUpBeforeClass()` or `wpTearDownAfterClass()` exist on the called class, and then call it and pass a static `WP_UnitTest_Factory` instance via Dependency Injection, if it exists.
This makes it way easier to add fixtures, and tear them down, without needing to instantiate `WP_UnitTest_Factory` in every class - removes the need to call `commit_transaction()` in each individual class.

See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35186


git-svn-id: http://core.svn.wordpress.org/trunk@35152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 04:44:25 +00:00
Scott Taylor e62864ce46 Unit Tests: in `Tests_Term`, create fixtures for posts.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35185


git-svn-id: http://core.svn.wordpress.org/trunk@35151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 03:48:25 +00:00
Sergey Biryukov e63ba31f93 Acessibility: Add back-compat styles for plugins that use `h3` inside the `.metabox-holder` container.
Props afercia.
Fixes #33557.
Built from https://develop.svn.wordpress.org/trunk@35184


git-svn-id: http://core.svn.wordpress.org/trunk@35150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 03:38:25 +00:00
Scott Taylor ad90d33285 Unit Tests: in `Tests_Post`, create fixtures for users.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35183


git-svn-id: http://core.svn.wordpress.org/trunk@35149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 03:31:24 +00:00
Helen Hou-Sandí f3107e5842 Make some primary action buttons look primary.
* User deletion/removal
* Site status change (multisite)
* Network upgrade
* Import file upload
* Media browser upload

props Dezzy for the initial patch.
fixes #23738.

Built from https://develop.svn.wordpress.org/trunk@35182


git-svn-id: http://core.svn.wordpress.org/trunk@35148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 03:08:24 +00:00
Scott Taylor 2c46a4dcba Unit Tests: in `Tests_Media::test_wp_get_attachment_image_srcset_array_no_width()`, just toggle metadata, instead of creating a new attachment. Shaves 75ms off the test.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35181


git-svn-id: http://core.svn.wordpress.org/trunk@35147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 02:55:24 +00:00
Sergey Biryukov 6d91caa931 Theme Editor: Repurpose the `'wp_theme_editor_filetypes'` filter added in [35134] to actually filter file types instead of files.
Default types include 'php' and 'css' and cannot be removed, only new types can be added.

Props DrewAPicture, SergeyBiryukov.
Fixes #22924.
Built from https://develop.svn.wordpress.org/trunk@35180


git-svn-id: http://core.svn.wordpress.org/trunk@35146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 02:20:24 +00:00
Scott Taylor 317d62bfad Unit Tests: make a fixture in `Tests_Media` to represent the large image, instead of creating it 10 times.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35179


git-svn-id: http://core.svn.wordpress.org/trunk@35145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 01:43:24 +00:00
Scott Taylor 60ad26b4fd Unit Tests: move some oEmbed tests that can trigger HTTP calls to `Tests_External_HTTP_OEmbed`.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35178


git-svn-id: http://core.svn.wordpress.org/trunk@35144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 01:29:24 +00:00
Scott Taylor f19e4c9b46 Unit Tests: `Tests_Canonical` doesn't need to call `wp_set_current_user()` or implement `tearDown` because its grandparent calls `wp_set_current_user( 0 )` in `tearDown()`.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35177


git-svn-id: http://core.svn.wordpress.org/trunk@35143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 01:18:24 +00:00
Scott Taylor 972e76991f Unit Tests: `Tests_Comment` needs a `tearDownAfterClass` impl to avoid spillage.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35176


git-svn-id: http://core.svn.wordpress.org/trunk@35142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 01:06:24 +00:00
Scott Taylor 083537d213 Unit Tests: `Tests_Auth` needs a `tearDownAfterClass` impl to avoid spillage.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35175


git-svn-id: http://core.svn.wordpress.org/trunk@35141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 01:04:24 +00:00
Scott Taylor b7e9b93be3 Unit Tests: call `commit_transaction()` in `Tests_Auth` set up.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35174


git-svn-id: http://core.svn.wordpress.org/trunk@35140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 00:49:24 +00:00
Scott Taylor b1a39f1a6a Unit Tests: reuse fixtures in `Tests_Comment`.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35173


git-svn-id: http://core.svn.wordpress.org/trunk@35139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 00:39:23 +00:00
Scott Taylor e9db7c15fd Unit Tests: move `->test_readme()` out of `Tests_Basic` and into `Tests_External_HTTP_Basic` in `tests/external-http/`.
I intend to move other `wp_remote_get()` tests into similar classes.

See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35172


git-svn-id: http://core.svn.wordpress.org/trunk@35138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 00:23:24 +00:00
Scott Taylor 351d78fbac Unit Tests: wrestle performance out of `Tests_Auth` by cloning the same user for a majority of the tests.
See #30017, #33968.

Built from https://develop.svn.wordpress.org/trunk@35171


git-svn-id: http://core.svn.wordpress.org/trunk@35137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 00:11:24 +00:00
Drew Jaynes 217b661703 Docs: Add missing descriptions for the `$wpdb` global in DocBlocks all the places.
See #32246.

Built from https://develop.svn.wordpress.org/trunk@35170


git-svn-id: http://core.svn.wordpress.org/trunk@35136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 23:44:25 +00:00
Drew Jaynes 43c10f7d35 Docs: Fix third-person singular verbs for summaries in wp-admin/includes/bookmarks.php.
Also adds some missing parameter, return, and global descriptions, and one missing summary.

See #32246.

Built from https://develop.svn.wordpress.org/trunk@35169


git-svn-id: http://core.svn.wordpress.org/trunk@35135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 23:25:25 +00:00
Drew Jaynes c78ee60edd Docs: Standardize file header summary for wp-admin/includes/ajax-actions.php.
See #33701.

[ci skip]

Built from https://develop.svn.wordpress.org/trunk@35168


git-svn-id: http://core.svn.wordpress.org/trunk@35134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 22:49:24 +00:00
Drew Jaynes c3ee28ea06 Docs: wp-admin/includes/admin-filters.php is part of the Administration subpackage, update the summary.
See #33701.

Built from https://develop.svn.wordpress.org/trunk@35167


git-svn-id: http://core.svn.wordpress.org/trunk@35133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 22:35:24 +00:00
Drew Jaynes 2e2e898802 Docs: Add a version and standardize the file header summary for wp-admin/includes/admin.php.
See #33701.

Built from https://develop.svn.wordpress.org/trunk@35166


git-svn-id: http://core.svn.wordpress.org/trunk@35132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 22:32:24 +00:00
Boone Gorges a53fe085aa Fix incorrect variable names from [35164].
Cool story - the tests appeared to pass with the typos.

See #30017, #33968.
Built from https://develop.svn.wordpress.org/trunk@35165


git-svn-id: http://core.svn.wordpress.org/trunk@35131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 22:00:26 +00:00
Boone Gorges ba37dc9123 Share fixtures in `Tests_Admin_includesListTable` tests.
See #30017, #33968.
Built from https://develop.svn.wordpress.org/trunk@35164


git-svn-id: http://core.svn.wordpress.org/trunk@35130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 21:41:24 +00:00
Boone Gorges cb8a2f2e47 Share fixtures in `Tests_Get_Archives`.
See #30017, #33968.
Built from https://develop.svn.wordpress.org/trunk@35163


git-svn-id: http://core.svn.wordpress.org/trunk@35129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 21:30:25 +00:00
Boone Gorges 530111994d Create fewer fixtures in some tests.
See #30017, #33968.
Built from https://develop.svn.wordpress.org/trunk@35162


git-svn-id: http://core.svn.wordpress.org/trunk@35128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 21:24:24 +00:00
Helen Hou-Sandí 6820130e33 Screen options: Improve the "Apply" button
Previously the button was output as a part of the per-page option rendering, inline with that input. While this was appropriate for core's usage, the `screen_settings` filter has allowed plugins to place additional items at the bottom of the panel, which a number take advantage of. This leads to confusing situations where plugins that don't save settings via Ajax either have to add their own button or piggyback onto the existing button, which doesn't make any sense in the flow of additional options. It also hinders core from adding any other options that need to be submitted.

Also, when the screen options panel is open, a submit button there is the primary action at that moment. The "Apply" button also does a full page load, which a primary button indicates better.

fixes #34295. see #22222, #23738.

Built from https://develop.svn.wordpress.org/trunk@35161


git-svn-id: http://core.svn.wordpress.org/trunk@35127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 18:58:25 +00:00
Andrea Fercia f1787056de Bump the "Status" H3 heading to H2 on the Edit Comment screen for better accessibility.
Fixes #34286.
Built from https://develop.svn.wordpress.org/trunk@35160


git-svn-id: http://core.svn.wordpress.org/trunk@35126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:44:24 +00:00
Jeremy Felt 9dd1462fe3 MS: Introduce action `before_signup_header`.
This aligns `wp-signup.php` a bit more `with `wp-activate.php` and, among other things, allows a plugin to redirect signup requests.

Props pbearne.
Fixes #17630.

Built from https://develop.svn.wordpress.org/trunk@35159


git-svn-id: http://core.svn.wordpress.org/trunk@35125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:32:49 +00:00
Andrea Fercia c4ff6317a7 Bump H3 headings to H2 on the legacy Link Manager screen for better accessibility.
Fixes #34285.
Built from https://develop.svn.wordpress.org/trunk@35158


git-svn-id: http://core.svn.wordpress.org/trunk@35124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:32:24 +00:00
Drew Jaynes d01f1c2e15 Docs: Add missing file headers to two Toolbar API files: wp-includes/admin-bar.php and wp-includes/class-wp-admin-bar.php.
See #32246.

Built from https://develop.svn.wordpress.org/trunk@35157


git-svn-id: http://core.svn.wordpress.org/trunk@35123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:27:25 +00:00
Jeremy Felt b9b7592ee8 MS: Add "Settings" link under "Network Admin" toolbar menu.
Props johnjamesjacoby.
Fixes #34287.

Built from https://develop.svn.wordpress.org/trunk@35156


git-svn-id: http://core.svn.wordpress.org/trunk@35122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:00:26 +00:00
Andrea Fercia 19eb905f58 Accessibility: update a jQuery selector used for the Plugin Cards after [35009].
When updating a plugin from its details modal dialog, focus should be moved back to the plugin title which now is a H3 heading.

Fixes #33818.
Built from https://develop.svn.wordpress.org/trunk@35155


git-svn-id: http://core.svn.wordpress.org/trunk@35121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 15:27:27 +00:00
Boone Gorges fde30ae8b7 Create fewer fixtures in XML-RPC `getComments` tests.
See #30017, #33968.
Built from https://develop.svn.wordpress.org/trunk@35154


git-svn-id: http://core.svn.wordpress.org/trunk@35120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 14:39:27 +00:00
John Blackbourn a5cca9c5ff Reinstate the Link Category admin screen after [34359].
See [13216]

Fixes #34284

Built from https://develop.svn.wordpress.org/trunk@35153


git-svn-id: http://core.svn.wordpress.org/trunk@35119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 01:51:26 +00:00
John Blackbourn 8dd677a09f Introduce a language chooser to the site signup process on Multisite.
If your Multisite installation is one of the relatively few that allows new sites to be registered, either by existing users or by new visitors to your site, a 'Site Language' dropdown menu will now be presented if your network has additional languages installed. This option defaults to the value of the 'Default Language' setting on the Network Admin Settings screen, and is restricted to currently installed languages.

The languages available in this setting can be controlled via the `signup_get_available_languages` filter. To disable it completely, return an empty array.

Fixes #33844
Props DrewAPicture, johnbillion

Built from https://develop.svn.wordpress.org/trunk@35152


git-svn-id: http://core.svn.wordpress.org/trunk@35118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 23:46:25 +00:00
John Blackbourn 87aa982824 Include network-active plugins and inactive network-only plugins on the Plugins listing screen for individual sites on Multisite.
These plugins are only shown to users with the `manage_network_plugins` capability, which is Super Admins by default. This new feature lowers the blood pressure of Super Admins who may browse or search the Plugins listing screen of an individual site, having forgotten that a particular plugin is network-active. Showing inactive network-only plugins here also reduces friction when searching the Plugins listing screen on individual sites.

This change introduces a `show_network_active_plugins` filter which controls whether the network-active plugins and inactive network-only plugins are shown. This can be used to enable this functionality for regular site admininstrators, or, indeed, to disable this functionality for Super Admins.

Fixes #20104

Built from https://develop.svn.wordpress.org/trunk@35151


git-svn-id: http://core.svn.wordpress.org/trunk@35117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 22:12:25 +00:00
Sergey Biryukov 31b40bdbb7 Remove `fast_finish: true` from Travis CI configuration for now.
Upstream: https://github.com/travis-ci/travis-ci/issues/4928
Built from https://develop.svn.wordpress.org/trunk@35150


git-svn-id: http://core.svn.wordpress.org/trunk@35116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 21:36:24 +00:00
John Blackbourn 537ac4c2ec Improve the docs for the `$expiration` parameter in `set_transient()`, `set_site_transient()`, and associated filters.
See #32246

Built from https://develop.svn.wordpress.org/trunk@35149


git-svn-id: http://core.svn.wordpress.org/trunk@35115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 21:31:25 +00:00
Dominik Schilling a2a4bdcb9d Improve [35146] to only skip pluggable function signature tests for `wp-includes/cache.php` when an external object cache is in use.
See #31491, #33867.
Built from https://develop.svn.wordpress.org/trunk@35148


git-svn-id: http://core.svn.wordpress.org/trunk@35114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 20:45:24 +00:00
John Blackbourn a9f9cca311 Reinstate `wp_cache_get()` into the pluggable function tests. The signature tests are now skipped if an external object cache is in use.
See #31491

Built from https://develop.svn.wordpress.org/trunk@35147


git-svn-id: http://core.svn.wordpress.org/trunk@35113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 19:33:24 +00:00
John Blackbourn 74167bc09a Skip the pluggable function signature tests when an external object cache is in use.
See #31491

Built from https://develop.svn.wordpress.org/trunk@35146


git-svn-id: http://core.svn.wordpress.org/trunk@35112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 19:31:25 +00:00
John Blackbourn a13e405b4c Remove `wp_cache_reset()` from the pluggable functions signature tests, as the function is deprecated and no longer used.
See #31491, #33867

Built from https://develop.svn.wordpress.org/trunk@35145


git-svn-id: http://core.svn.wordpress.org/trunk@35111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 19:20:25 +00:00
Drew Jaynes 57e69d4a3f Upgrader: Introduce a new action hook `pre_auto_update`, which fires immediately prior to an auto-update for core, themes, plugins, or translations.
Props DavidAnderson, welcher.
Fixes #30441.

Built from https://develop.svn.wordpress.org/trunk@35144


git-svn-id: http://core.svn.wordpress.org/trunk@35110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 18:58:25 +00:00
Sergey Biryukov 4ef12c7814 Correct the error message displayed on setup when `wp-config-sample.php` does not exist.
Props bradparbs.
Fixes #23247.
Built from https://develop.svn.wordpress.org/trunk@35143


git-svn-id: http://core.svn.wordpress.org/trunk@35109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 17:36:25 +00:00
Drew Jaynes a0bbd154d9 Multisite: Improve two error strings specifying allowed characters in usernames and site names.
Also removes two error strings that were likely never being triggered anyway due to the stricter character matching higher up.

Props atomicjack, bjornjohansen, DrewAPicture.
Fixes #33336.

Built from https://develop.svn.wordpress.org/trunk@35142


git-svn-id: http://core.svn.wordpress.org/trunk@35108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 17:33:24 +00:00
Dion Hulse ecd00c2618 Update Akismet externals
git-svn-id: http://core.svn.wordpress.org/trunk@35107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 17:19:01 +00:00
Scott Taylor 55e16aa98a KSES: have you ever heard of the `<bdo>` HTML tag? Same. http://www.w3schools.com/tags/tag_bdo.asp
Adds unit test.

Props iandunn.
Fixes #34063.

Built from https://develop.svn.wordpress.org/trunk@35141


git-svn-id: http://core.svn.wordpress.org/trunk@35106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 17:18:25 +00:00
Scott Taylor 296671abcc Taxonomy: in `wp_list_categories()`, add an arg: `separator`, to allow the overriding of `<br/>`.
Props wojtek.szkutnik.
Fixes #9025.

Built from https://develop.svn.wordpress.org/trunk@35140


git-svn-id: http://core.svn.wordpress.org/trunk@35105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 17:02:25 +00:00