Commit Graph

1281 Commits

Author SHA1 Message Date
Scott Taylor
5a75531f19 Replace the ancient phpfreaks.com RegEx to extract urls to ping with a more robust matcher. URLs with commas and things like & were not being pinged. The new matcher even works for most IDN URLs. Adds unit tests.
Fixes #9064.



git-svn-id: https://develop.svn.wordpress.org/trunk@25313 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-10 03:17:51 +00:00
Scott Taylor
e72ffa5d96 Move checks for post_type being an array inline. See [25291], [25292], #18614.
git-svn-id: https://develop.svn.wordpress.org/trunk@25312 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-10 03:01:10 +00:00
Andrew Nacin
7f7aacbdec wp_allowed_protocols() should not contain 'data', as it is not safe. see #19354.
git-svn-id: https://develop.svn.wordpress.org/trunk@25301 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-08 19:41:14 +00:00
Sergey Biryukov
c47302e70f Use correct paths in multisite.xml. see [25165]. see #25088.
git-svn-id: https://develop.svn.wordpress.org/trunk@25294 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-07 15:19:56 +00:00
Scott Taylor
e688f070dc Check the value passed to get_post_type_object(). If it's an array, use the first item. get_query_var( 'post_type' ) can be an array if the query has been altered via filters/actions. There are several places in core that pass the query var. Adds unit tests.
In `template-loader.php`, move `is_post_type_archive()` and `is_tax()` directly below `is_home()`.

See #18614, [25291].



git-svn-id: https://develop.svn.wordpress.org/trunk@25292 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 23:38:51 +00:00
Scott Taylor
48dc7e576b Ensure that the post type object is the queried object when a post type has been registered with has_archive => true. Ensure it is not stomped when decorated with tax_query. Adds unit tests.
Props nacin.
Fixes #18614.



git-svn-id: https://develop.svn.wordpress.org/trunk@25291 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 22:06:40 +00:00
Scott Taylor
0474a18863 Allow is_tag() to accept term_id, slug, 'term_name or array of any. Many other is_*()` funcs already do this. Adds unit tests.
Props ramiy.
Fixes #18746.



git-svn-id: https://develop.svn.wordpress.org/trunk@25287 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 17:26:04 +00:00
Scott Taylor
09b9c44de9 Check bad dates and redirect, instead of 404ing, as necessary and appropriate.
Adds query, conditional, and canonical Unit Tests.

Props kovshenin, SergeyBiryukov, DrewAPicture.
Fixes #10935.



git-svn-id: https://develop.svn.wordpress.org/trunk@25280 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 16:35:22 +00:00
Scott Taylor
93cfccac2d Add unit test for tax_query against attachments.
See #22556.



git-svn-id: https://develop.svn.wordpress.org/trunk@25278 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 14:43:49 +00:00
Andrew Nacin
27b0660c5f Add a test case for calling get_page_uri() with a non-existent post.
see #24491, [25262].


git-svn-id: https://develop.svn.wordpress.org/trunk@25265 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 22:02:42 +00:00
Andrew Nacin
f280a2f525 Remove old WP version checks from PHPUnit test cases now that tests are branched with each version.
git-svn-id: https://develop.svn.wordpress.org/trunk@25264 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 21:56:10 +00:00
Scott Taylor
a5d3bde7a0 Avoids incorrect results when url_to_postid() checking is not strict enough. Adds a bunch of Unit Tests for `url_to_postid()', which is currently only tested lightly in some XML-RPC tests.
Props gcorne, gradyetc.
Fixes #20560.



git-svn-id: https://develop.svn.wordpress.org/trunk@25258 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 17:28:52 +00:00
Scott Taylor
e8c7634e79 Avoid database error when include or exclude is not really a term_id. Adds more unit tests.
Props kovshenin.
Fixes #11823.



git-svn-id: https://develop.svn.wordpress.org/trunk@25257 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 17:14:54 +00:00
Scott Taylor
83d1992d34 When meta_type is passed with orderby => meta_value, orderby must also use CAST() to avoid scenarios like: SELECTing by UNSIGNED and then ordering by CHAR. Adds unit test.
Fixes #21621.


git-svn-id: https://develop.svn.wordpress.org/trunk@25255 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 16:56:36 +00:00
Scott Taylor
16ef2c2e36 Remove lingering instances of call time pass-by-reference, limited to instances of callable - use $this instead of &$this.
Props jdgrimes.
See #25160.



git-svn-id: https://develop.svn.wordpress.org/trunk@25254 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 16:33:50 +00:00
Scott Taylor
57b1d5ab28 Introduce author__in and author__not_in query vars. Fixes issue with multiple author exclusion when comma-separated string is passed for author. Adds a bunch of missing unit tests.
Props pollett for initial patch.
Fixes #16854.



git-svn-id: https://develop.svn.wordpress.org/trunk@25248 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 21:32:11 +00:00
Scott Taylor
0b28c0137d Allow get_pages() to accept an array for the arg parent. Adds unit tests, some will fail until the next commit.
Fixes #9470.



git-svn-id: https://develop.svn.wordpress.org/trunk@25244 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 20:55:05 +00:00
Scott Taylor
0877a3eda4 Remove error_reporting() debug cruff.
git-svn-id: https://develop.svn.wordpress.org/trunk@25242 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 19:56:06 +00:00
Scott Taylor
89997e4c80 Introduce description__like arg to get_terms(). Make description__like and name__like perform LIKEs with a wildcard on both sides of passed string. Previously, strings had to match the beginning of the name, so searching for burrito in This is a burrito would fail. Adds unit tests.
Props aaroncampbell for the original patch, 5 years ago.
Fixes #8214.



git-svn-id: https://develop.svn.wordpress.org/trunk@25241 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 19:40:17 +00:00
Scott Taylor
d10b9d32a0 Remove unnecessary checks before setting $wp_settings_* arrays. Adds unit test for setting a nonexistent variable to a multi-dimensional array.
Props scribu.
Fixes #17884.



git-svn-id: https://develop.svn.wordpress.org/trunk@25240 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 19:06:13 +00:00
Scott Taylor
24bf60bb4f Kill the query in the following edge case: post_type => 'any' but exclude_from_search => false returns no valid post types. Adds unit tests.
Props mitchoyoshitaka.
Fixes #19198.



git-svn-id: https://develop.svn.wordpress.org/trunk@25239 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 18:50:04 +00:00
Scott Taylor
0d0b17b617 Convert category__and to category__in (less expensive) and unset it when only one category is passed. Adds unit tests.
Fixes #24245.




git-svn-id: https://develop.svn.wordpress.org/trunk@25238 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 18:16:31 +00:00
Andrew Nacin
db5f9800d4 add_theme_support( 'html5' ) now defaults to comment-list, comment-form, and search-form.
This was the implicit case in 3.6.0, modified in [25193].

see #24932.


git-svn-id: https://develop.svn.wordpress.org/trunk@25235 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 17:43:29 +00:00
Scott Taylor
1e0d32406d Allow int to be passed in lieu of array, add append arg to wp_set_post_categories(). Adds more extensive unit tests for wp_set_post_categories().
Props ptahdunbar for initial patch.
Fixes #16550.



git-svn-id: https://develop.svn.wordpress.org/trunk@25234 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 17:41:03 +00:00
Dion Hulse
5d57f260ed WP_HTTP: Replacing the Fsockopen & Streams Transports with a new Streams transport which fully supports HTTPS communication.
This changeset also bundles ca-bundle.crt from the Mozilla project to allow for us to verify SSL certificates on hosts which have an incomplete, outdated, or invalid local SSL configuration.
Props rmccue for major assistance getting this this far. See #25007 for discussion, also Fixes #16606 


git-svn-id: https://develop.svn.wordpress.org/trunk@25224 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 04:48:21 +00:00
Sergey Biryukov
59989c2de0 Update tests/README.txt to reflect the new tests directory structure. props jdgrimes. fixes #25133.
git-svn-id: https://develop.svn.wordpress.org/trunk@25199 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-31 13:42:56 +00:00
Andrew Nacin
788973ffb2 Case insensitivity for is_email_address_unsafe().
props jkudish.
fixes #25046.


git-svn-id: https://develop.svn.wordpress.org/trunk@25197 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-31 04:35:15 +00:00
Andrew Nacin
afe7f94304 Fix 'html5' theme support.
* Require it to have a second argument when adding.
 * Merge, rather than replace, on second add.
 * Make current_theme_supports() work when two arguments are passed.

Adds unit tests.

props nathanrice for initial patch.
see #24932 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@25193 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-31 01:29:08 +00:00
Andrew Nacin
f6966d20b3 Basic tests for wp_parse_id_list() to ensure positive integers. see [25169].
git-svn-id: https://develop.svn.wordpress.org/trunk@25170 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:58:40 +00:00
Scott Taylor
f458d16c01 Improve the include / exclude SQL generation in get_pages() by using IN and NOT IN where applicable. Adds unit tests for include / exclude.
Fixes #22074.



git-svn-id: https://develop.svn.wordpress.org/trunk@25168 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:48:29 +00:00
Andrew Nacin
8045afd81b Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root.

see #25088.


git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:39:34 +00:00