* Revert parts of [28773] and [28727] and [29748].
* Do not crash PHP. Make the shortcode quantifier possessive to avoid backtracks.
* Reduce backtracking in long HTML comments by 100x.
* Do not ignore unclosed HTML comments.
* Do not break unregistered shortcodes, e.g. `[hello attr="value"]`.
* Do not break HTML in shortcode attributes, e.g. `[hello attr="<"]`.
* Do not match for shortcodes when there is extra whitespace, e.g. `[ hello ]`.
* Add unit tests to show #12690 was not fully resolved.
* Tested PHP 5.2.4, 5.2.13, 5.4.32, and 5.5.8.
Adds/modifies unit tests.
Props miqrogroove.
See #29557.
git-svn-id: https://develop.svn.wordpress.org/trunk@29781 602fd350-edb4-49c9-b593-d223f7449a82
Adds unit tests that use `DOMDocument` since `assertTag` is being deprecated - see #29545, [29746].
Props obenland, wonderboymusic.
Fixes#29636.
git-svn-id: https://develop.svn.wordpress.org/trunk@29780 602fd350-edb4-49c9-b593-d223f7449a82
Adds logical explanations of what some of the various comment checks are checking for, as well as some general cleanup and syntax fixes.
Fixes#29734.
git-svn-id: https://develop.svn.wordpress.org/trunk@29763 602fd350-edb4-49c9-b593-d223f7449a82
* Removes two duplicate sentences from the long description
* Tightens up phrasing elsewhere in the long description for specific checks
* Clarifies the parameter and return descriptions, and adds periods
See #29734.
git-svn-id: https://develop.svn.wordpress.org/trunk@29762 602fd350-edb4-49c9-b593-d223f7449a82
The shortcode callbacks for `gallery` and `playlist` check for `'RAND' == $atts['order']`, which isn't a valid value for `order`. Remove those checks and update the docs.
In `WP_Query`, if the value of `orderby` is `rand`, `order` is irrelevant and should be unset.
Adds unit tests.
Fixes#29629.
git-svn-id: https://develop.svn.wordpress.org/trunk@29760 602fd350-edb4-49c9-b593-d223f7449a82
This allows you to instantiate a library that includes and/or excludes specific attachments by passing a single ID or an array of IDs.
Example usage:
{{{
wp.media({frame: 'post', library: {include: [414, 415]}}).open()
wp.media({frame: 'post', library: {include: 414}}).open()
wp.media({frame: 'post', library: {exclude: [414, 415]}}).open()
wp.media({frame: 'post', library: {exclude: 414}}).open()
}}}
Fixes#26587.
git-svn-id: https://develop.svn.wordpress.org/trunk@29759 602fd350-edb4-49c9-b593-d223f7449a82
`wp_comment_reply()`'s output can be complete overridden by the `wp_comment_reply` filter, so this check is justified and makes the AJAX callback more flexible.
Props nerrad.
Fixes#29704.
git-svn-id: https://develop.svn.wordpress.org/trunk@29758 602fd350-edb4-49c9-b593-d223f7449a82
* In Bulk Edit mode, don't attempt to delete or trash an attachment that doesn't have a `delete` nonce. The subsequent `_requery()` will then properly display the attachment still present in the library.
* Remove all updated models from the selection at the same time to avoid async race conditions. The selection is reset when the grid's `select` mode is deactivated, but this allows this view instance to be more portable.
This fix allows users to set caps on individual attachments without confusing the grid's library. This issue was present for bulk actions in general, had nothing to do with `MEDIA_TRASH` specifically.
Fixes#29597.
git-svn-id: https://develop.svn.wordpress.org/trunk@29755 602fd350-edb4-49c9-b593-d223f7449a82
* Improves the `@see` reference for `register_post_type()` to mention that it contains information about accepted arguments
* Adds a description of the accepted values for the `$operator` parameter
* Fixes a typo
Fixes#29721.
git-svn-id: https://develop.svn.wordpress.org/trunk@29752 602fd350-edb4-49c9-b593-d223f7449a82
* Expand the `wptexturize()` RegEx to include the list of registered shortcodes.
* Avoid backtracking after `[` chars by not filtering params in registered shortcodes. This will cause escaped shortcodes and their params to become texturized if not registered.
* Registered shortcode params will never be texturized, even when escaped.
* Move all tests involving unregistered shortcodes to a new and improved unit.
* Update one test involving HTML within shortcode params.
Props miqrogroove.
See #29557.
git-svn-id: https://develop.svn.wordpress.org/trunk@29748 602fd350-edb4-49c9-b593-d223f7449a82