Make sure the queried object is non-null before accessing its properties.

Props markoheijnen, ryan.
Fixes #21394.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Move checks for `post_type` being an array inline. See [25291], [25292], #18614.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace the ancient `phpfreaks.com` RegEx to extract urls to ping with a more robust matcher. URLs with commas and things like `&amp;` were not being pinged. The new matcher even works for most IDN URLs. Adds unit tests.

Fixes #9064.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Show the IP address, if available, in the comment edit screen submit meta box. props leewillis77. fixes #24638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Consistently wrap `author` and `excerpt` nodes with `CDATA` in feeds.

Fixes #18056.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ignore user ID post data.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Tighten allowed upload file types.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Validate referrers to prevent off-domain redirects.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Better protocol validation in set_url_scheme().

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


git-svn-id: http://core.svn.wordpress.org/trunk@25281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Loose validation for is_serialized() in maybe_serialize().

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


git-svn-id: http://core.svn.wordpress.org/trunk@25282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introduce `get_previous_post_link()`, `get_next_post_link()`, and `get_adjacent_post_link()`. Allows developers to retrieve the value without `echo`ing.

Props yoavf, markjaquith, SergeyBiryukov.
Fixes #17302.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add filter `flush_rewrite_rules_hard` to give devs chance to prevent writing to file when hard-flushing rewrite rules.

Props jeremyfelt, nacin.
Fixes #23491.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add an additional available param (the `WP_User` instance) to the `user_has_cap` filter.

Props Viper007Bond.
Fixes #24490.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Check `$profileuser->rich_editing` for empty before using it in Edit User admin code.

Props sorich87, c3mdigital.
Fixes #17328.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Support `orderby => meta_value` in `WP_User_Query`. Adds unit test.

Props wpsmith.
Fixes #21581.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use `wp_get_nav_menus()` instead of `get_terms('nav_menu')` in `WP_Nav_Menu_Widget` to preserve use of `wp_get_nav_menus' filter.

Props Frank Klein.
Fixes #25263.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove dead code in `add_query_arg()`.

Props hakre, c3mdigital.
Fixes #16942.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add `term_taxonomy_id` to available fields in `get_term_by()`. Adds unit test.

Props jchristopher.
Fixes #21651.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Don't call `sanitize_title_with_dashes( $taxonomy )` in `register_taxonomy()` unless `$args['rewrite']['slug']` is empty.

Props SergeyBiryukov.
Fixes #23668.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25297 1a063a9b-81f0-0310-95a4-ce76da25c4cd