Make `url_to_postid()` work for custom post type URLs. Use `get_post_types()` and `get_taxonomies()` instead of directly accessing globals. Adds unit test.

Props faishal, for the globals fix.
Fixes #19744.



git-svn-id: https://develop.svn.wordpress.org/trunk@25659 602fd350-edb4-49c9-b593-d223f7449a82
Add a default value to `WP_UnitTest_Factory_For_Comment::default_generation_definitions['comment_content']` to avoid a tornado of database errors in PHP 5.5/MySQL 5.6, even when `WP_DEBUG` is turned off.

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25660 602fd350-edb4-49c9-b593-d223f7449a82
`post_content` does not have a default value in the `$wpdb->posts` table. Add a default value of empty string to `wp_insert_attachment()` to avoid a tornado of database errors in PHP 5.5/MySQL 5.6, even when debug mode is turned off.

See #25282.



git-svn-id: https://develop.svn.wordpress.org/trunk@25661 602fd350-edb4-49c9-b593-d223f7449a82
Rather than adding a `taxonomy` arg to `get_category()`, convert all uses of `get_category()` in core to `get_term()`. By doing so, we negate the need to call `_make_cat_compat()` in a few places that are only looking for a single property.

Fixes #8722.



git-svn-id: https://develop.svn.wordpress.org/trunk@25662 602fd350-edb4-49c9-b593-d223f7449a82