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
Scott Taylor
9ece28e545
Add an action at the end of WP_Query::parse_tax_query()
called (wait for it...) parse_tax_query
which will enable developers to alter $this->tax_query->queries
before SQL is generated. pre_get_posts
is too early for many scenarios.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25311 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-10 02:35:26 +00:00
Scott Taylor
14e44dcd05
Make sure the queried object is non-null before accessing its properties.
...
Props markoheijnen, ryan.
Fixes #21394 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25310 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-10 02:27:24 +00:00
Dion Hulse
d0a189c6be
WP_HTTP: Correct the @since, and, @deprecated PHPDoc tags to reflect the class history. See #25007
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25309 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-09 08:09:20 +00:00
Dion Hulse
4a56e07c75
Switch to using HTTPS connections for Plugin and Theme API requests when SSL is available. See #18577
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25308 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-09 07:53:15 +00:00
Dion Hulse
d92f3ab536
WP_HTTP: When streaming to file, ensure that fwrite() suceeds and correctly writes the file to disk. Fixes #16057
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25303 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-09 01:17:17 +00:00
Sergey Biryukov
22aa493cfc
Inline documentation for hooks in http.php.
...
props tw2113.
see #25229 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25302 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-08 22:03:14 +00:00
Sergey Biryukov
6f6decc3f2
Document 'wp_link_query_args' and 'wp_link_query' filters. props DrewAPicture. fixes #18042 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25299 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-07 19:46:26 +00:00
Sergey Biryukov
8e4a6b31cd
Avoid PHP notices when configuring the Incoming Links dashboard widget. fixes #25250 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25298 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-07 18:16:09 +00:00
Sergey Biryukov
f6b4d33ae9
Add 'wp_link_query_args' and 'wp_link_query' filters to allow for customizing the internal linking dialog. props CoenJacobs, goldenapples. fixes #18042 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25293 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-07 12:20:57 +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
22278ec6a9
Introduce wp_using_ext_object_cache()
- mimic wp_suspend_cache_invalidation()
and discourage direct access to $_wp_using_ext_object_cache
, cleaning up importing of globals in functions and provides function to modify that global. Loads the packaged object cache when an external cache hasn't been loaded or doesn't contain wp_cache_init()
.
...
Fixes #21401 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25289 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 18:09:24 +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
Andrew Nacin
c4068bc95b
Inline docs for hooks in MagPie.
...
props natejacobs.
see #25229 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25286 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 17:18:33 +00:00
Andrew Nacin
8a0ac73f60
Document the 'query' filter in wp-db.
...
props natejacobs.
see #25229 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25284 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 17:07:00 +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
Sergey Biryukov
12647e132d
Deprecate get_blogaddress_by_domain(), unused since [25261]. props jeremyfelt. fixes #25235 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25276 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 11:40:58 +00:00
Andrew Nacin
37d92f4851
Short descriptions for inline docs should end with a period, per the vast majority of core. see #25229 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25273 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 01:37:59 +00:00
Dion Hulse
9095e4b866
Upgrader: Make clearing the Plugin and Theme update caches optional during install and upgrade proceedures. See #22704
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25272 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 01:32:09 +00:00
Andrew Nacin
760d5825ad
More adjustments and improvements for inline documentation for get_pages(). see #25186 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25271 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 01:20:17 +00:00
Scott Taylor
bd610dd68a
Simplify the check for false-y child_of
arg.
...
Props SergeyBiryukov.
See #25230 , [25245].
git-svn-id: https://develop.svn.wordpress.org/trunk@25270 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 23:35:30 +00:00
Scott Taylor
a73d205ab8
Move get_meta_type()
into the WP_Meta_Query
class as get_cast_for_type()
. WP_Query
can then access it like: $this->meta_query->get_cast_for_type()
.
...
See #21621 , [25255].
git-svn-id: https://develop.svn.wordpress.org/trunk@25269 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 23:31:28 +00:00
Scott Taylor
d765349b75
Fix spacing in docs for get_pages()
.
...
Props DrewAPicture.
See #25186 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25268 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 23:20:20 +00:00
Scott Taylor
dbdc3ce528
Add docs to the woefully under-documented get_pages()
.
...
Props DrewAPicture.
Fixes #25186 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25266 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 22:12:17 +00:00
Scott Taylor
a7a070cc2c
Only variables should be passed by reference.
...
Props Askapache.
Fixes #23032 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25263 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 21:52:44 +00:00
Scott Taylor
eb63aeff1c
Add check to make sure a valid argument was passed to get_page_uri()
.
...
Props Viper007Bond.
Fixes #24491 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25262 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 21:41:48 +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: SELECT
ing 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
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
Andrew Nacin
9e6705f24e
Ensure zxcvbn.min.js loads when we are guessing the wp-includes URL.
...
props iandunn, SergeyBiryukov.
fixes #25201 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25246 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 21:16:00 +00:00
Scott Taylor
44011782d3
Set hierarchical
to false
when parent
is passed to get_pages()
and child_of
is not.
...
Fixes #25230 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25245 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 20:59:20 +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
89997e4c80
Introduce description__like
arg to get_terms()
. Make description__like
and name__like
perform LIKE
s 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
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
Sergey Biryukov
67500203f9
Move check_password_reset_key(), reset_password(), and register_new_user() from wp-login.php to wp-includes/user.php, to make them reusable. props beaulebens for initial patch. fixes #20279 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25231 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 08:58:41 +00:00
Sergey Biryukov
7aa0fd9a78
Add phpdoc for 'wp_redirect' and 'wp_redirect_status' filters. props DrewAPicture. fixes #25215 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25230 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 08:30:37 +00:00
Sergey Biryukov
f5770d15c1
Update phpdoc for get_current_site(). props jeremyfelt. fixes #25040 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25229 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 08:25:57 +00:00
Dion Hulse
d18ca83a2d
WP_HTTP: Re-enable curl, it was accidentally left out of [25224]. See #25007 See #16606
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25225 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 04:49:40 +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
Dion Hulse
a2a7f08b1b
WP_HTTP: Add a filter for the available HTTP Transports to allow plugins to alter the order which HTTP Transports are tried, or to add their own.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25222 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-03 08:38:56 +00:00
Dion Hulse
cbf4ed3a68
WP_HTTP: Clean up some comments style and remove outdated information.
...
The change to the proxy block here is for consistency, WP_HTTP_Proxy::block_request() is never called before parse_url() has successfully operated on the URL, and in the event we cannot read the URL, it shouldn't be requested.
git-svn-id: https://develop.svn.wordpress.org/trunk@25221 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-03 08:36:05 +00:00
Dion Hulse
ac84f12d0e
Core Updates: Ensure that the system supports outgoing HTTPS requests before making an update check over HTTPS. Fixes a typo in [25219]. See #22704
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25220 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-03 07:11:35 +00:00
Dion Hulse
2da41fa7f0
Core Updates: Switch to using a new 1.7 version check API which will return extra auto-update packages when requested over SSL. The new API has switched to returning JSON. See #22704
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25219 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-03 03:21:59 +00:00
Sergey Biryukov
ba667f56d8
Escape URLs in feed_links(). props Chouby. fixes #25212 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25207 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-02 10:10:09 +00:00
Sergey Biryukov
52c050254f
Use an array as a default value for $meta in multisite signup-related functions. fixes #25149 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25205 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-02 03:32:49 +00:00