* Take the ampersand pattern out of the loop for speed.
* Fix old bugs in the ampersand pattern.
* Refactor `_wptexturize_pushpop_element()` without PCRE for speed.
* Update unit tests.
Props miqrogroove.
Fixes#28623.
git-svn-id: https://develop.svn.wordpress.org/trunk@28831 602fd350-edb4-49c9-b593-d223f7449a82
* Check `! empty( $postarr['file'] )` before calling `update_attached_file()`
* Add a unit test: `test_update_attachment_fields()`
* Run the same logic for empty `guid` for attachments that always ran in `wp_insert_post()`, as per #18310. This fixes a unit test that would have broken when this ticket was marked closed.
* Updated the unit test in `Tests_Media::test_wp_prepare_attachment_for_js()` to account for `url` no longer being empty
Props kovshenin, wonderboymusic.
See #21963.
git-svn-id: https://develop.svn.wordpress.org/trunk@28788 602fd350-edb4-49c9-b593-d223f7449a82
* Set better defaults in `paginate_links()`, so that themes don't have to calculate them on their own, like Twenty Fourteen does now.
* Don't set page 1 to `?page=1` or `/page/1/` - that will force a canonical redirect.
* Add and cleanup unit tests
Props obenland, SergeyBiryukov, wonderboymusic.
Fixes#24606.
git-svn-id: https://develop.svn.wordpress.org/trunk@28785 602fd350-edb4-49c9-b593-d223f7449a82
* Allow well-formed HTML inside of shortcode attributes
* Restrict recursion. HTML is allowed but ignored.
* Do not allow exotic HTML comments in shortcode attributes.
* Continue to ignore the [ and ] chars if they appear in any HTML attribute.
* Update related regex patterns.
* Update unit tests.
Props miqrogroove.
Fixes#28564.
git-svn-id: https://develop.svn.wordpress.org/trunk@28773 602fd350-edb4-49c9-b593-d223f7449a82
Silence some unit tests that have never passed and may no longer be applicable.
Props miqrogroove.
Fixes#18549.
git-svn-id: https://develop.svn.wordpress.org/trunk@28764 602fd350-edb4-49c9-b593-d223f7449a82
* Only place an apostrophe before a number when it has exactly two digits.
* Never match '99' with the single prime pattern.
* Always assume '99' is an abbreviated year at the end of a quotation.
* Add unit tests.
* Resolves the unit test broken in [28721] for #8775.
See #26850.
git-svn-id: https://develop.svn.wordpress.org/trunk@28761 602fd350-edb4-49c9-b593-d223f7449a82
Prevents creating an endless number of terms like `A+` or `$$$$` in any given taxonomy.
Props wonderboymusic, SergeyBiryukov, aaroncampbell.
Fixes#17689.
git-svn-id: https://develop.svn.wordpress.org/trunk@28733 602fd350-edb4-49c9-b593-d223f7449a82
`shortcode_unautop()` and `wptexturize()` now use `wp_spaces_regexp()` instead of raw regex.
Adds unit tests.
Props miqrogroove.
See #27588.
git-svn-id: https://develop.svn.wordpress.org/trunk@28716 602fd350-edb4-49c9-b593-d223f7449a82
* Deprecate `like_escape()`
* Add a method to `$wpdb`, `->esc_like()`, and add unit tests
`$wpdb::esc_like()` is not used yet. As such, many unit tests will throw `Unexpected deprecated notice for like_escape`. Subsequent commits will alleviate this.
Props miqrogroove.
See #10041.
git-svn-id: https://develop.svn.wordpress.org/trunk@28711 602fd350-edb4-49c9-b593-d223f7449a82
* [28673] - title attributes are no longer expected to be present in some assertions
* [28704] - Fix `Declaration of Tests_Canonical_HTTPS::test() should be compatible with Tests_Canonical::test($test_url, $expected, $ticket = 0)`
* [28679] - Add `@expectedDeprecated get_all_category_ids`
git-svn-id: https://develop.svn.wordpress.org/trunk@28706 602fd350-edb4-49c9-b593-d223f7449a82
Code coverage analysis takes forever to run, and these annotations will cause it to fail in the middle.
See #26999.
git-svn-id: https://develop.svn.wordpress.org/trunk@28625 602fd350-edb4-49c9-b593-d223f7449a82
There will be "dupes" when the function is called with `'fields' => 'all_with_object_id'`, but the objects will actually be unique due to the `object_id` addition, so they shouldn't be filtered out.
Adds unit tests. All other unit tests pass.
Fixes#11003.
git-svn-id: https://develop.svn.wordpress.org/trunk@28583 602fd350-edb4-49c9-b593-d223f7449a82