Following [45585], older versions of PHP could segfault when attempting to autop paragraphs with 10,000+ characters.
Rather than having to negative lookahead for every character in the paragraph (which could run into recursion limits), we can quickly jump ahead to the next tag and start checking from there.
See #27350.
git-svn-id: https://develop.svn.wordpress.org/trunk@45587 602fd350-edb4-49c9-b593-d223f7449a82
- Update the `_wp_specialchars()` docs to match the function signature.
- Update the `human_time_diff()` function signature to match the docs.
Props subrataemfluence.
Fixes#46845.
git-svn-id: https://develop.svn.wordpress.org/trunk@45586 602fd350-edb4-49c9-b593-d223f7449a82
`autop()` can sometimes get confused and not clean up stray `<p>` or `</p>` tags inside block level elements, which produces sub-optimal HTML. While browsers can generally handle it, there's no need to make things harder for them if we don't have to.
Props pento, ayubi, pbearne, jond, azaozz, 1994rstefan, dionysous, MikeHansenMe, jorbin, miqrogroove, niallkennedy.
Fixes#27350.
git-svn-id: https://develop.svn.wordpress.org/trunk@45585 602fd350-edb4-49c9-b593-d223f7449a82
Add a new `terms_pre_query` filter which returns null by default. Return a non-null value to bypass WordPress's default `get_terms` queries.
Props jarocks, boonebgorges, spacedmonkey.
Fixes#41246.
git-svn-id: https://develop.svn.wordpress.org/trunk@45584 602fd350-edb4-49c9-b593-d223f7449a82
Inline `<svg>`s should generally work, as browsers should just ignore `<p>` or `<br/>` tags that shouldn't be inside the `<svg>`. To keep things neat, however, it's better not add them in the first place.
Props jared_smith, nacin, pento.
Fixes#9437.
git-svn-id: https://develop.svn.wordpress.org/trunk@45577 602fd350-edb4-49c9-b593-d223f7449a82
The previous assertion was always valid because we assumed it returned a single object,
while in reality it was returning an array.
Props hideokamoto.
Fixes#47622.
git-svn-id: https://develop.svn.wordpress.org/trunk@45575 602fd350-edb4-49c9-b593-d223f7449a82
It can be tricky to know when `wpautop()` should add `<p>` tags, but one thing we can be certain about is that they really shouldn't be anywhere near `<hr>` tags.
Now they aren't.
Props solarissmoke, MattyRob, pento.
Fixes#14674.
git-svn-id: https://develop.svn.wordpress.org/trunk@45574 602fd350-edb4-49c9-b593-d223f7449a82
The web has gotten so much faster since `human_time_diff()` was created, we need to be able to measure time differences with much finer granularity. Now, we can.
Props johnjamesjacoby, pento.
Fixes#35655.
git-svn-id: https://develop.svn.wordpress.org/trunk@45573 602fd350-edb4-49c9-b593-d223f7449a82
For a number of years, the Media modal missed an explicit ARIA role and the required attributes for modal dialogs.
This was confusing for assistive technology users, since they may not realize they're inside a dialog, and that consequently the keyboard interactions may be different from the rest of the page. Lack of an explicit label for the dialog was confusing as well, since assistive technology users didn't have an immediate sense of what the dialog is for.
This change makes the Media modal meet the ARIA Authoring Practices recommendations, helping users better understand the purpose and interactions with the modal. Also, it makes sure to hide the rest of the page content from assistive technologies, until support for `aria-modal="true"` improves.
Additionally:
- moves the modal H1 heading to the beginning of the modal content
- changes the modal left menu position to make visual and DOM order match
- improves the `wp.media.view.FocusManager` documentation
Fixes#47145.
git-svn-id: https://develop.svn.wordpress.org/trunk@45572 602fd350-edb4-49c9-b593-d223f7449a82
- Adds a local environment based on docker
- Adds the e2e tests setup
- Adds a "Hello World" e2e test to serve as a template
Props gziolo, herregroen, mcsf.
Fixes#45165.
git-svn-id: https://develop.svn.wordpress.org/trunk@45570 602fd350-edb4-49c9-b593-d223f7449a82
Smilies in ignored tags are not supposed to be converted to emoji, but this can malfunction if the tag has attributes. For example, the Preformatted block with add a `class` to the `<pre>` tag.
Props pento, jikamens.
Fixes#47489.
git-svn-id: https://develop.svn.wordpress.org/trunk@45569 602fd350-edb4-49c9-b593-d223f7449a82
Add `Cache-Control` and `Expires` HTTP headers to prevent caching of requests to WP Cron on systems supporting fastcgi_finish_request().
The fastcgi_finish_request() call prevents the setting of further HTTP headers by caching plugins subsequently loaded.
Props kingkero.
Fixes 47396.
git-svn-id: https://develop.svn.wordpress.org/trunk@45560 602fd350-edb4-49c9-b593-d223f7449a82
Fix an issue where searching installed themes for an empty string resulted in matching all themes.
Props afercia, desrosj, hesyifei, evalarumbe.
Fixes#39041.
git-svn-id: https://develop.svn.wordpress.org/trunk@45557 602fd350-edb4-49c9-b593-d223f7449a82
Time calculations should not need to rely on manipulating global PHP configuration state.
Props Rarst.
Fixes#46483.
git-svn-id: https://develop.svn.wordpress.org/trunk@45556 602fd350-edb4-49c9-b593-d223f7449a82
In [42767] the quick edit button changed from a link to a button. This caused the jQuery code that selects on a link to no longer work. This commit restores the previous behavior.
Fixes#47572.
See #43382, #38677.
git-svn-id: https://develop.svn.wordpress.org/trunk@45553 602fd350-edb4-49c9-b593-d223f7449a82
This allows for blocking plugin activation if it requires a higher version of PHP or WordPress, and does not have a `readme.txt` file.
If the headers are defined in both `readme.txt` and the main plugin file, precedence is given to the plugin file.
Props afragen, Otto42, Ipstenu.
Fixes#46938.
git-svn-id: https://develop.svn.wordpress.org/trunk@45546 602fd350-edb4-49c9-b593-d223f7449a82