Commit Graph

34611 Commits

Author SHA1 Message Date
Jeremy Felt c5944fedf8 Multisite: Filter the links displayed on "Edit Site" views
Introduce the `network_edit_site_nav` function, which DRYs up the code used to display a common set of links at the top of "Edit Site" views.

Introduce the `network_edit_site_nav_links` filter, which allows plugins to modify the list of links displayed at the top of Edit Site views as a "tabbed" interface.

Props johnjamesjacoby, c3mdigital, Bueltge.
Fixes #15800.


git-svn-id: https://develop.svn.wordpress.org/trunk@37466 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-19 21:47:06 +00:00
Boone Gorges 63755028e8 Introduce `required` argument for `wp_dropdown_categories()`.
This allows the HTML5 `required` attribute to be added to the `select` element.

Props wzislam, pcarvalho.
Fixes #31909.

git-svn-id: https://develop.svn.wordpress.org/trunk@37465 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-19 02:38:33 +00:00
Boone Gorges 510bbfcb9c Move `wp_dropdown_categories()` tests into their own file.
See #31909.


git-svn-id: https://develop.svn.wordpress.org/trunk@37464 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-19 02:22:59 +00:00
Boone Gorges 20fbd41ebe Beautify, simplify, lovelify, alignify the default argument array in `wp_dropdown_categories()`.
See #31909.

git-svn-id: https://develop.svn.wordpress.org/trunk@37463 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-19 02:16:36 +00:00
Sergey Biryukov ce467a3191 Docs: Correct variable type for `WP_Upgrader::$strings`.
Props mt8.biz.
Fixes #36883.

git-svn-id: https://develop.svn.wordpress.org/trunk@37462 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-19 00:35:32 +00:00
Sergey Biryukov cebd606438 External Libraries: After [37402], replace two more instances of `split()` with `explode()` in `wp-includes/atomlib.php`.
Props josephscott.
Fixes #20673.

git-svn-id: https://develop.svn.wordpress.org/trunk@37461 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-19 00:05:02 +00:00
Drew Jaynes e6afe609a5 Docs: Fix an incorrect Codex link in the file header for wp-includes/cache.php.
Introduced in [7990].

Props michaelbeil.
See #36880.


git-svn-id: https://develop.svn.wordpress.org/trunk@37460 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-18 22:06:39 +00:00
Aaron Jorbin 63cdf85fad Correct usage of @Covers for Tests_Post_Types
When @covers is used with a plain alphanumeric string, PHPUnit assumes that it is covering a class. If there is no class, it fails and exits rather than continuing to generate coverage. To cover a global function, the name must start with ::. See https://phpunit.de/manual/5.3/en/appendixes.annotations.html#appendixes.annotations.covers

Introduced in [36768].

Fixes #36867. See #35985



git-svn-id: https://develop.svn.wordpress.org/trunk@37459 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-18 17:13:11 +00:00
Dominik Schilling (ocean90) c3f1088548 Remove duplicate CSS selectors in `forms.css`.
Props bassgang.
Fixes #36580.

git-svn-id: https://develop.svn.wordpress.org/trunk@37458 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-18 12:19:26 +00:00
Pascal Birchler 8345fc60c7 Customize: Change attachment condition in the site icon control to prevent errors.
Props neverything.
Fixes #36749 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@37456 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 20:38:20 +00:00
Pascal Birchler e4ed65d87b Embeds: Change attachment metadata condition to prevent a warning in the embeds template.
See #35237.
Fixes #36838 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@37452 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 20:32:09 +00:00
Aaron Jorbin 747a327c3c Set a whitelist for PHPUnit code coverage.
PHPUnit requires a whitelist as of version 5 in order to generate code coverage. See https://github.com/sebastianbergmann/phpunit-documentation/issues/335 .

Fixes #36867.



git-svn-id: https://develop.svn.wordpress.org/trunk@37449 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 20:22:57 +00:00
Pascal Birchler e7d31d1641 Bootstrap/Load: Silence `ini_set()` in `wp_debug_mode()`.
Props SergeyBiryukov.
Fixes #36708 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@37448 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 20:21:33 +00:00
Aaron Jorbin ead6585754 Correct usage of Covers for Tests_Update_Comment_Count_Now
When @covers is used with a plain alphanumeric string, PHPUnit assumes that it is covering a class. If there is no class, it fails and exits rather than continuing to generate coverage. To cover a global function, the name must start with ::. See https://phpunit.de/manual/5.3/en/appendixes.annotations.html#appendixes.annotations.covers

[37445] for trunk

See #35060, #36867



git-svn-id: https://develop.svn.wordpress.org/trunk@37447 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 20:19:50 +00:00
Ella Iseulde Van Dorpe 2617f950fa TinyMCE: use new non-editable implementation
Use TinyMCE's implementation of `contenteditable="false"` for views.

First pass.

See #36434.



git-svn-id: https://develop.svn.wordpress.org/trunk@37446 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 18:48:54 +00:00
Ryan McCue bd49bb180e REST API: Use prepared JSON data correctly.
This was modifying a variable that was never used. Oops.

Fixes #36358.
Props jrf.


git-svn-id: https://develop.svn.wordpress.org/trunk@37444 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 03:54:37 +00:00
Boone Gorges 55961a5613 Tests: Use factory method to generate fixtures for `wp_unique_post_slug()` tests.
Props mintindeed.
See #20419.

git-svn-id: https://develop.svn.wordpress.org/trunk@37443 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 01:48:58 +00:00
Helen Hou-Sandi b34c03c5b0 System font: The stack does not work with the `font` shorthand property.
see #36753.


git-svn-id: https://develop.svn.wordpress.org/trunk@37442 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-17 01:44:36 +00:00
Dominik Schilling (ocean90) 54ede3d3fc Editor: Merge two strings.
Props pavelevap.
See #27756.

git-svn-id: https://develop.svn.wordpress.org/trunk@37441 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-16 18:56:52 +00:00
Dominik Schilling (ocean90) 999af2444c I18N: In `get_translations_for_domain()` check if the global `$l10n` was set by `_load_textdomain_just_in_time()` before accessing it.
Props danielhuesken.
Fixes #34114.

git-svn-id: https://develop.svn.wordpress.org/trunk@37440 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-16 15:09:33 +00:00
Andrea Fercia a595b2ff53 Accessibility: make the tab order match the visual order in the Edit terms screens.
Fixes #35664.

git-svn-id: https://develop.svn.wordpress.org/trunk@37439 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-16 13:02:00 +00:00
Dominik Schilling (ocean90) 6f88dcc7ee Version bump.
Fixes #36845.

git-svn-id: https://develop.svn.wordpress.org/trunk@37438 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-16 10:23:50 +00:00
Weston Ruter 9cd6dd9aae Customize: Include shortcut button in Custom Menu widget to edit the selected menu in the Customizer.
Clicking on the Edit Menu button focuses on the corresponding nav menu section. Upon collapsing the nav menu section, the focus is returned to the Custom Menu widget instead of taking the user to the menus root panel. In this way, the back button behavior is modified once to serve as breadcrumb/history navigation. The Edit Menu button with the breadcrumb back button behavior greatly reduce the number of UI interactions needed to edit a menu referenced in a Custom Menu widget.

Props celloexpressions, westonruter.
Fixes #32683.


git-svn-id: https://develop.svn.wordpress.org/trunk@37437 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-16 07:21:22 +00:00
Ryan McCue 62dc6e6dfa HTTP API: Pass array-like object to http_api_debug.
This was mistakingly passing the Requests_Response object, which caused fatal errors with debugging tools.

See #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@37436 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-16 06:11:58 +00:00
Joe McGill f805805f44 Media: Remove medium_large size from `$whitelist_options['media']` in `options.php`.
The `medium_large_size_w` and `medium_large_size_h` options were added to the
$whitelist_options['media'] in options.php in [35479], which causes both options
to be set to `0` when the media settings are changed. When this occurs, the
medium_large image size will no longer be created when an image is uploaded.

Since these options aren't meant to be updated via the settings UI, they can be
safely removed from the whitelist.

Fixes #36531.


git-svn-id: https://develop.svn.wordpress.org/trunk@37435 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-15 22:37:20 +00:00
Dominik Schilling (ocean90) 0268b1645d Credits: Add a missing closing tag.
Props ramiy for initial patch.
Fixes #35911.

git-svn-id: https://develop.svn.wordpress.org/trunk@37434 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-14 18:58:01 +00:00
Dominik Schilling (ocean90) ad701666a5 External Libraries: Update jQuery to 1.12.4-pre.
This version includes a fix for the media library which didn't open under certain conditions. The issue was tracked upstream as "Specific table CSS style breaks `.is(':visible')`", see https://github.com/jquery/jquery/issues/3065.
Also fixed: "Element which is not in page is still :visible in IE8", see https://github.com/jquery/jquery/issues/3043.

Changelog: https://github.com/jquery/jquery/compare/1.12.3...376caf4d

See #36533.

git-svn-id: https://develop.svn.wordpress.org/trunk@37433 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 21:14:32 +00:00
Dominik Schilling (ocean90) 5925994a30 Upgrader: Add changelog entries for when the classes were moved to its own file.
See #36618.

git-svn-id: https://develop.svn.wordpress.org/trunk@37432 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 20:58:47 +00:00
Drew Jaynes 195572596b Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.

Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.

Props ocean90.
Fixes #36835.


git-svn-id: https://develop.svn.wordpress.org/trunk@37431 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 18:40:19 +00:00
Ryan McCue db0ecb6469 HTTP API: Fix compatibility with cURL <7.22
Ensure connections are closed after usage to fix an issue with WP.com URLs used in the tests.

Resynched from GitHub at 95518ce.

See #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@37430 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 11:14:06 +00:00
Ryan McCue 8d0c62ad50 HTTP API: Add browser compatibility hook for 3xx redirects.
WordPress erroneously follows browser-style behaviour with 3xx redirects, where a POST to 302 becomes a GET. Requests instead follows the specification and keeps the same method. Requests also exposes a hook to allow changing the behaviour.

[37428] used the wrong method of adding this hook, now corrected.

See #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@37429 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 05:10:52 +00:00
Ryan McCue 9074e9f93b HTTP API: Replace internals with Requests library.
Requests is a library very similar to WP_HTTP, with a high level of unit test coverage, and has a common lineage and development team. It also supports parallel requests.

See #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@37428 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 04:41:45 +00:00
Dominik Schilling (ocean90) e2329076f3 Widgets: Create `WP_Widget_Mock` as a mock of `WP_Widget` which can be used for widget tests.
You cannot instantiate an abstract class. Not even in WordPress world.

See #35981.

git-svn-id: https://develop.svn.wordpress.org/trunk@37427 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-12 21:24:18 +00:00
Weston Ruter c1ec341ddb Customize: Clean up media control CSS.
Removes unnecessary wrapper elements and refactors class names to eliminate duplication of rule selectors.

Props celloexpressions.
Fixes #30618.


git-svn-id: https://develop.svn.wordpress.org/trunk@37426 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-12 20:22:45 +00:00
Dominik Schilling (ocean90) 5cb475e617 Widgets: Make `WP_Widget` a real abstract class.
This removes the `die()` call from `WP_Widget::widget()` and converts it to an abstract method.
`WP_Widgets` (later renamed to `WP_Widget`) was introduced in [10764] where the minimum PHP requirement was 4.3, thus no `abstract` was available.

Props johnbillion.
Fixes #35981.

git-svn-id: https://develop.svn.wordpress.org/trunk@37425 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-12 20:22:15 +00:00
Dominik Schilling (ocean90) 7773a713c4 Posts: Fire a `post_action_{$action}` action for a custom post action request.
Props jfarthing84, Mte90, brianvan, sudar, DrewAPicture.
Fixes #27056.

git-svn-id: https://develop.svn.wordpress.org/trunk@37424 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-12 15:43:48 +00:00
Rachel Baker 8f14aed705 Comments: Add `$data` parameter to include the comment data in the `edit_comment` action.
Props dshanske.

Fixes #36427.



git-svn-id: https://develop.svn.wordpress.org/trunk@37423 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-12 15:36:58 +00:00
Dominik Schilling (ocean90) ab3afd670d List Tables: Pass the `$which` parameter to `restrict_manage_posts` and `restrict_manage_users`.
`$which` contains the location of the extra table nav markup: 'top' or 'bottom'.

Props martin.krcho.
Fixes #35307.

git-svn-id: https://develop.svn.wordpress.org/trunk@37422 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-12 15:12:11 +00:00
Dominik Schilling (ocean90) 954eeba053 Filesystem API: Don't add `'.'` to the list of directories which need to be checked/created when extracting a file.
Prevents a PHP warning by `WP_Filesystem_Direct::mkdir()` when installing a language pack which doesn't have subdirectories.

Props tfrommen.
Fixes #36570.

git-svn-id: https://develop.svn.wordpress.org/trunk@37421 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-12 12:39:49 +00:00
Helen Hou-Sandi 8d6d88ffbb Admin font: Remove a redundant `sans-serif` declaration.
props samantha-miller.
see #36753.


git-svn-id: https://develop.svn.wordpress.org/trunk@37419 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-12 02:13:43 +00:00
Jeremy Felt 4429638da6 Tests: Set `public` to `1` in the default blog factory
When no `$meta` arguments are passed to `wpmu_create_blog()`, `public` is set to `0` in the database for new sites. This is fine, but also does not match the default implied when most sites are created via `site-new.php`.

The only current use of the `$meta` argument in the tests is to (re)mark `public` as `0`. All existing tests pass with this change. Tests for `WP_Site_Query` can now rely on better default expectations.

See #36566.


git-svn-id: https://develop.svn.wordpress.org/trunk@37418 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-11 19:21:22 +00:00
Weston Ruter d5bcff481f Customize: Remove use of reserved word `default` in Underscore template which breaks IE8.
Fixes regression introduced in r30712.

Props adamsilverstein.
Fixes #36793.


git-svn-id: https://develop.svn.wordpress.org/trunk@37417 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-11 19:07:01 +00:00
Pascal Birchler fb1e009393 I18N: Add changes missed in [37415].
See #34114.

git-svn-id: https://develop.svn.wordpress.org/trunk@37416 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-10 20:30:19 +00:00
Pascal Birchler 0151b0ebae I18N: Remove the requirement to call `load_plugin_textdomain()` / `load_theme_textdomain()`.
By initially scanning the `wp-content/languages` directory and loading available MO files just-in-time, plugins and themes do not need to manually load text domains anymore.

Props swissspidy, ocean90.
Fixes #34114

git-svn-id: https://develop.svn.wordpress.org/trunk@37415 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-10 20:04:52 +00:00
Pascal Birchler 8dcef2785b I18N: Reverse the order of loading plugin and theme translations.
`load_theme_textdomain()`, `load_plugin_textdomain()` and `load_muplugin_textdomain()` now try to load the .mo file from the `wp-content/languages` directory first. After the introduction of language packs, translation files are more likely to be located there.

Props swissspidy, sebastian.pisula.
Fixes #34213.

git-svn-id: https://develop.svn.wordpress.org/trunk@37414 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-10 18:49:21 +00:00
Dominik Schilling (ocean90) c9570340dd Upgrader: Remove debug cruft.
See #36618.

git-svn-id: https://develop.svn.wordpress.org/trunk@37413 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-10 18:31:29 +00:00
Dominik Schilling (ocean90) 0f47b70106 Upgrader: After [37409] move the hook docs for `upgrader_process_complete` to `WP_Upgrader::run()`.
Add changelog entry for [23912].

Part 7/8.
See #36618.

git-svn-id: https://develop.svn.wordpress.org/trunk@37412 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-10 12:19:18 +00:00
Dominik Schilling (ocean90) f76181d7af Upgrader: Update `wp-admin/includes/class-wp-upgrader.php` to `require_once` the new files added in [37406] and [37409].
Part 6/8.
See #36618.

git-svn-id: https://develop.svn.wordpress.org/trunk@37411 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-10 11:58:03 +00:00
Dominik Schilling (ocean90) 859f72cc00 Upgrader: Update file headers for new files added in [37409].
Part 5/8.
See #36618.

git-svn-id: https://develop.svn.wordpress.org/trunk@37410 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-10 11:51:16 +00:00
Dominik Schilling (ocean90) e646bb2dd2 Upgrader: Copy `WP_Upgrader` subclasses into one file per class.
Part 4/8.
See #36618.

git-svn-id: https://develop.svn.wordpress.org/trunk@37409 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-10 11:44:06 +00:00