Commit Graph

31743 Commits

Author SHA1 Message Date
Jeremy Felt
fbce07b386 Docs: Clarify $user parameter documentation in wpmu_validate_blog_signup.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34676 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 01:32:47 +00:00
John Blackbourn
f0200152be Revert r34674 due to failures on PHP < 5.4.
See #16859


git-svn-id: https://develop.svn.wordpress.org/trunk@34675 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 01:00:17 +00:00
John Blackbourn
2183725c54 Avoid stripping square brackets from URLs, and instead correctly encode them.
Square brackets must be encoded in the path, path parameters, query parameters, and fragment, but must not be encoded in anything up to the domain and port.

Adds a bunch of tests, including square brackets in query parameters, IPv6 URLs, and several other permutations.

See #16859


git-svn-id: https://develop.svn.wordpress.org/trunk@34674 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 00:40:30 +00:00
Jeremy Felt
8f4a6370f0 Fixes #33816.
MS: Adjust formatting of code in `site-new.php` to improve readability.

Fixes #34066.


git-svn-id: https://develop.svn.wordpress.org/trunk@34673 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 23:29:40 +00:00
Jeremy Felt
bf4846985f MS: Delete rewrite_rules when updating a switched site's URL.
Previously, rewrite rules could be flushed and regenerated in the context of another site. Deleting the rules when in a switched state allows for them to be generated properly on the next page view.

Fixes #33816.


git-svn-id: https://develop.svn.wordpress.org/trunk@34672 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 23:23:44 +00:00
Helen Hou-Sandi
94f596278c Sample permalink: Buttons still need the .button class.
Also fixes unit tests post-[34670]. The test methods have been slightly renamed because it is no longer a button. Hopefully this name will be more future-proof.

see #18306.


git-svn-id: https://develop.svn.wordpress.org/trunk@34671 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 22:06:15 +00:00
Helen Hou-Sandi
106f0b7b7b Edit: Remove the redundant "View Post" button-link and link the sample permalink.
Previously there were two persistent "View Post" links on an edit screen: next to the permalink and in the toolbar. This would then become three links after a post was published or updated, as a link is also included in the admin notice. This is a lot of redundancy and visual noise for a flow that is not your primary action upon starting to edit a post. The "View Post" link next to the sample permalink was particularly bad because it is styled like a button, but unlike a button, does not keep you on the current screen.

Because the permalink is now linked, there is no highlighted slug that you can click to edit, but rather just the "Edit" button.

props scribu, lessbloat, sabreuse, SergeyBiryukov, DrewAPicture, helen.
see #18306.


git-svn-id: https://develop.svn.wordpress.org/trunk@34670 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 20:09:19 +00:00
Boone Gorges
f261d3ac8a Fix comment_order for single page comment threads.
The old comment pagination logic had a separate block for comment threads that
appeared on a single page. After the refactoring in [34561], all comment
pagination logic is unified.

This change ensures that 'comment_order' is respected in all scenarios.

Fixes #8071.

git-svn-id: https://develop.svn.wordpress.org/trunk@34669 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 19:29:22 +00:00
John Blackbourn
ac85963ad4 Correctly slash post fields when trashing and untrashing posts.
Fixes #27550
Props dmenard, Denis-de-Bernardy


git-svn-id: https://develop.svn.wordpress.org/trunk@34668 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 19:25:05 +00:00
John Blackbourn
9271360932 Correct the logic used when determining whether to display the 'Mine' link on post list tables. It should only be shown when the count for the user's posts differs for the total count of posts. is_multi_author() cannot be used because it only considers Posts.
Fixes #19609


git-svn-id: https://develop.svn.wordpress.org/trunk@34667 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 19:14:56 +00:00
John Blackbourn
aaa6e1c27e Add a nav_menu_item_title filter for filtering nav menu item titles.
Fixes #33447
Props paulwilde


git-svn-id: https://develop.svn.wordpress.org/trunk@34666 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 18:40:56 +00:00
John Blackbourn
01ae35dc58 Add a missing @param doc for confirm_another_blog_signup().
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@34665 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 17:57:05 +00:00
John Blackbourn
06caa4bb37 Avoid using assertNotFalse() which is only available in phpunit >= 4.0.0
See #33070


git-svn-id: https://develop.svn.wordpress.org/trunk@34664 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 16:27:18 +00:00
John Blackbourn
8823432749 Update get_the_post_thumbnail_url() so it returns false on failure, to bring it inline with wp_get_attachment_image_url(). Correct and introduce new tests.
Fixes #33070


git-svn-id: https://develop.svn.wordpress.org/trunk@34663 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 15:33:12 +00:00
Drew Jaynes
7fce79698a Widgets: Pass $instance to the widget_nav_menu_args filter in the Custom Menu widget.
Props walterbarcelos for the initial patch.
Fixes #33944.


git-svn-id: https://develop.svn.wordpress.org/trunk@34662 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 15:30:21 +00:00
Boone Gorges
c1d7e7f5aa In get_page_of_comment(), use a true COUNT query.
This improves memory usage by not compiling a list of comment IDs.

See #34057.

git-svn-id: https://develop.svn.wordpress.org/trunk@34661 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 15:09:46 +00:00
Boone Gorges
05e0a3b97e Use correct 'page_id' parameter in get_page_of_comment().
See #34057.

git-svn-id: https://develop.svn.wordpress.org/trunk@34660 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 15:09:34 +00:00
Gary Pendergast
6d87c4cecb Rewrite: When redirecting old slugs, include URL endpoints.
Historically, `wp_old_slug_redirect()` has only ever redirected the old slug of posts, it hasn't included URL endpoints, or worked with comment feed URLs. By adding support for these, we ensure a greater range of URLs aren't killed when the slug changes.

Props swissspdy.

Fixes #33920.



git-svn-id: https://develop.svn.wordpress.org/trunk@34659 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 06:56:54 +00:00
Scott Taylor
b59df508cf Theme Editor: ensure that files named index.php in theme subfolders are not labeled as "Main Index Template"
Props MikeHansenMe, wonderboymusic, bravokeyl, Shelob9.
Fixes #27201.


git-svn-id: https://develop.svn.wordpress.org/trunk@34658 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 03:10:08 +00:00
Scott Taylor
9d0f206ee1 After [34629], use $size_class instead of $size.
See #32093.


git-svn-id: https://develop.svn.wordpress.org/trunk@34657 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 02:49:05 +00:00
Aaron Jorbin
963e92a7dc Exclude external HTTP tests from multisite run
In [30298] the unit tests default confirguration was modified to exclude external-http tests.  This change was never migrated to the multisite XML configuration. The external HTTP code doesn't follow different logic in multisite, so the logic to exclude the tests then ( The external-http tests are very slow, and Wp_Http functionality is fairly isolated ) holds true here as well.

See #33968


git-svn-id: https://develop.svn.wordpress.org/trunk@34656 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 02:36:23 +00:00
Gary Pendergast
2b78c9579a WPDB: Make sure we don't run sanity checks on DB dropins.
Previously, we'd run the sanity checks if `is_mysql` was not set to `false`. This caused problems for DB drop-ins that didn't define `is_mysql` at all. Instead, we can just check if `is_mysql` is `empty()`.

Also fix some unit tests that accidently ran correctly because of the strict `false ===` comparison.

Fixes #33501.



git-svn-id: https://develop.svn.wordpress.org/trunk@34655 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 01:16:29 +00:00
Drew Jaynes
416dc6642a Tests: Add a test for the 'before' and 'after' arguments in wp_page_menu() when used as a fallback for wp_nav_menu().
When `wp_page_menu()` is used as a fallback for `wp_nav_menu()`, the `before` and `after` arguments should be set and output as `<ul>` and `</ul>`, respectively.

See #11095. See [34653].


git-svn-id: https://develop.svn.wordpress.org/trunk@34654 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 00:46:19 +00:00
Scott Taylor
a155c5dcfd After [34200], force 'before' and 'after' to <ul> and </ul> when wp_nav_menu() falls back to wp_page_menu().
See #11095.


git-svn-id: https://develop.svn.wordpress.org/trunk@34653 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 23:38:32 +00:00
Drew Jaynes
8594d93d7b Docs: Improve the hook documentation for the plugins_api_args filter.
Standardizes the hook doc summary and expands on the expected type for the `$args` parameter.

See #34035. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34652 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 23:02:47 +00:00
Drew Jaynes
df542a1802 Docs: Improve the hook documentation for the themes_api filter.
Standardizes the hook doc summary and expands on expected behavior when short-circuiting the request, which is dependent on the `$action` type.

Also updates the expected types on the `$override` parameter.

See #34036. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34651 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 23:00:08 +00:00
Drew Jaynes
c6c2afd70b Docs: Normalize the data table spacing in the themes_api() DocBlock following a typo fix in [34649].
See #34036.


git-svn-id: https://develop.svn.wordpress.org/trunk@34650 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:48:06 +00:00
Drew Jaynes
8fa143dc2e Docs: Fix two typos in the DocBlock description for themes_api():
* The fourth `$action` type is 'feature_list'
* The first `$action` type in the data table should be 'query_themes'

See #34036.


git-svn-id: https://develop.svn.wordpress.org/trunk@34649 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:46:37 +00:00
Drew Jaynes
9e4c655b2a Docs: Adjust the themes_api() DocBlock description to clarify the "second" available hook, themes_api, and add new information for the "third" hook, themes_api_result.
See #34036.


git-svn-id: https://develop.svn.wordpress.org/trunk@34648 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:44:18 +00:00
Drew Jaynes
c82483fcbc Docs: Improve the hook documentation for the plugins_api filter.
Standardizes the hook doc summary and expands on expected behavior when short-circuiting the request, which is dependent on the `$action` type.

See #34035. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34647 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:28:38 +00:00
John Blackbourn
cb66358b9b Switch several assertions to assertNotWPError() so more context is provided when the assertion fails.
git-svn-id: https://develop.svn.wordpress.org/trunk@34646 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:26:16 +00:00
Drew Jaynes
ed0ef8e2c0 Docs: Adjust the plugins_api() DocBlock description to clarify the "second" available hook, plugins_api, and add new information for the "third" hook, plugins_api_result.
See #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34645 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:22:32 +00:00
Drew Jaynes
c64bab4531 Docs: Slightly improve the readability of the data table in the DocBlock description for the oembed_providers hook by centering the HTTPS column.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34644 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:11:01 +00:00
Scott Taylor
813bff7bdb Canonical: after [34272], don't redirect rewrite endpoints on attachment URLs when pretty permalinks are enabled.
Fixes #19918.


git-svn-id: https://develop.svn.wordpress.org/trunk@34643 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:10:08 +00:00
Drew Jaynes
b9944f6331 Docs: Update the DocBlock summary for plugins_api() to reflect the "WordPress.org" Plugins API.
See #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34642 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:06:37 +00:00
Drew Jaynes
40c3091ee3 Docs: Further improve documentation for plugins_api().
* Adds a matrix-like data table demonstrating which arguments are available for the different `$action` types
* Adjusts the return types to accommodate an `array` for the 'hot_tags' `$action` choice

Props ocean90.
See #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34641 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 21:59:12 +00:00
Drew Jaynes
e712f041e2 Docs: Vastly improve documentation for themes_api().
Adds:
* A hash notation with descriptions for all accepted arguments
* A matrix-like data table demonstrating which arguments are available for the different `$action` types
* A better summary and description with linked hooks
* An improved return description with a link to external information

Props ocean90.
See #34036.


git-svn-id: https://develop.svn.wordpress.org/trunk@34640 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 21:51:18 +00:00
John Blackbourn
a0be6bbb12 Don't set CURLOPT_CAINFO when sslverify is false when sending HTTP API requests through cURL. This avoids sending redundant information to cURL, and avoids a bug in Apple's SecureTransport library which causes a request to fail when a CA bundle is set but certificate verification is disabled.
This fixes issues with local HTTPS requests (eg. WP Cron) on OS X where cURL is using SecureTransport instead of OpenSSL.

Fixes #33978


git-svn-id: https://develop.svn.wordpress.org/trunk@34639 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 21:37:00 +00:00
John Blackbourn
5ff16465f2 Introduce WP_UnitTestCase::assertNotWPError() for when a test needs to assert that something is, well, not a WP_Error.
See #33978


git-svn-id: https://develop.svn.wordpress.org/trunk@34638 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 21:28:26 +00:00
Helen Hou-Sandi
deb42cc66f Autoprefixer for [34634].
Normally when there are multiple comma-separated values in CSS, each one would go on its own indented line. However, Autoprefixer appears to be tripping up on gradients at the moment, so it's going to stay on one line until we investigate upstream.

see #33299.


git-svn-id: https://develop.svn.wordpress.org/trunk@34637 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 19:16:35 +00:00
Scott Taylor
8fa5426485 Users List Table: show the "Change role to" dropdown on the top and bottom. Currently only shows on top.
See #27743.


git-svn-id: https://develop.svn.wordpress.org/trunk@34636 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 19:10:08 +00:00
Drew Jaynes
b3f49e0cdf Docs: Fix some syntatical issues in the DocBlock for WP::send_headers() following [34632].
See #20226. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34635 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:48:14 +00:00
Scott Taylor
4dc810ad3c Feature Image: Improve the preview for transparent background images by using CSS3 to show a checkered background.
Props metodiew.
Fixes #33299.


git-svn-id: https://develop.svn.wordpress.org/trunk@34634 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:40:40 +00:00
Scott Taylor
51b3eb592d After [34629], update unit tests to reflect this change.
See #32093.


git-svn-id: https://develop.svn.wordpress.org/trunk@34633 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:29:53 +00:00
Scott Taylor
f802fef76f Update the docs in WP to explain the need to do [34476].
Fixes #20226.


git-svn-id: https://develop.svn.wordpress.org/trunk@34632 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:27:15 +00:00
Drew Jaynes
fe14c06e0a Docs: Add documentation for the $browse, $user, $search, $author, $tag, $installed_plugins, and $page parameters in plugins_api().
Props ocean90.
Fixes #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34631 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:12:59 +00:00
Scott Taylor
61d6854bae Nav Menus: in wp_nav_menu(), $container is already bound to a list of allowed tags. PHP, being its whimsical self, while return true if someone sets $container to true via in_array( true, [ 'div', 'nav' ] ). Check that $container is a string before the in_array() check. 'true' does not pass.
Props shedonist for the original patch.
Fixes #32464.


git-svn-id: https://develop.svn.wordpress.org/trunk@34630 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:12:20 +00:00
Scott Taylor
b45a72a67c Add size-$size class to <img> in wp_get_attachment_image().
Fixes #32093.


git-svn-id: https://develop.svn.wordpress.org/trunk@34629 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 17:54:01 +00:00
Boone Gorges
eb6430708b Add test for get_term_by( 'slug' ) behavior with accented chars.
When passing a value of 'slug' to `wp_insert_term()` that contains non-ASCII
characters, WordPress converts accented characters to non-accented versions.
(See `sanitize_title()` and `remove_accents()`.) The same conversion happens
when fetching when fetching a term using a slug. In this way, it's possible to
create a term and fetch it using the same accented string, even though the slug
is actually stored with non-accented characters.

See #16282.

git-svn-id: https://develop.svn.wordpress.org/trunk@34628 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 16:31:47 +00:00
Boone Gorges
148d6a37fe Move get_term_by() tests to their own file.
git-svn-id: https://develop.svn.wordpress.org/trunk@34627 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 16:09:12 +00:00