Commit Graph

42745 Commits

Author SHA1 Message Date
Sergey Biryukov
f7c520c1d5 Sitemaps: Center the container for sitemap content.
Props ramiy, swissspidy.
Fixes #50658.
Built from https://develop.svn.wordpress.org/trunk@49221


git-svn-id: http://core.svn.wordpress.org/trunk@48983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 02:22:07 +00:00
desrosj
d2fb6101c4 Bundled Themes: Make Twenty Twenty-One the default theme.
After being imported in [49216], Twenty Twenty-One can now be set as the default theme in WordPress.

See #48110.
Built from https://develop.svn.wordpress.org/trunk@49220


git-svn-id: http://core.svn.wordpress.org/trunk@48982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 02:04:07 +00:00
Sergey Biryukov
9c82dfada2 Help/About: Serve the image on the Freedoms page locally.
Serving the files locally is beneficial for reasons of privacy and speed.

Props garrett-eclipse, pputzer, hellofromTonya.
Fixes #46363.
Built from https://develop.svn.wordpress.org/trunk@49219


git-svn-id: http://core.svn.wordpress.org/trunk@48981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 02:02:06 +00:00
Sergey Biryukov
5cbad34501 Help/About: Update Privacy page to include illustration.
This brings some consistency with the Freedoms page.

Follow-up to [43938].

Props melchoyce, garrett-eclipse, hareesh-pillai, ryelle.
Fixes #45395.
Built from https://develop.svn.wordpress.org/trunk@49218


git-svn-id: http://core.svn.wordpress.org/trunk@48980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 01:47:06 +00:00
desrosj
a4edd896b4 Bundled Themes: Add the theme screenshot for Twenty Twenty-One
Follow up to [49216].

See #51526.
Built from https://develop.svn.wordpress.org/trunk@49217


git-svn-id: http://core.svn.wordpress.org/trunk@48979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 01:29:03 +00:00
desrosj
3ea8930f37 Bundled Themes: Import Twenty Twenty-One, the new default theme for WordPress 5.6.
Welcome to the bundled themes family!

Twenty Twenty-One is a blank canvas for your ideas, making the block editor your best brush.

Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwentyone/.

Props poena, melchoyce, luminuu, elmastudio, bethsoderberg, williampatton, aristath, jffng, kjellr, jeffikus, audrasjb, fabiankaegy, mukesh27, dingo_d, kellylawrence, acosmin, whyisjake, metodiew, ryelle, nielslange, littlebigthing, mahesh901122, zebulan, kishanjasani, lukecavanagh, scruffian, abhijitrakas, utz119, sudoshreyansh, kau-boy, justinahinon, joostdevalk, bduclos, hareesh-pillai, mager19, rolfsiebers, webmigrates, sresok, guidooffermans, francina, marybaum, hareshlive, navanathbhosale, afercia, richtabor, joyously, sarahricker, nrqsnchz, glauberglauber, sabernhardt, kraftbj, ItsJonQ, joen, CTMartin0, decrecementofeliz, bhautikvirani.
See #51526.
Built from https://develop.svn.wordpress.org/trunk@49216


git-svn-id: http://core.svn.wordpress.org/trunk@48978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 01:14:10 +00:00
Sergey Biryukov
651f426b3a General: Remove noreferrer from wp_targeted_link_rel() and other uses.
When `noopener noreferrer` was originally added in #37941 and related tickets, the `noreferrer` bit was specifically included due to Firefox not supporting `noopener` at the time.

Since `noopener` has been supported by all major browsers for a while, it should now be safe to remove the `noreferrer` attribute from core.

Props Mista-Flo, audrasjb, joostdevalk, jonoaldersonwp, peterwilsoncc, elgameel.
Fixes #49558.
Built from https://develop.svn.wordpress.org/trunk@49215


git-svn-id: http://core.svn.wordpress.org/trunk@48977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 23:39:04 +00:00
Sergey Biryukov
caa75a04a8 Themes: Add a return value to set_theme_mod() to allow for error handling.
Props latifi, hareesh-pillai.
Fixes #51296.
Built from https://develop.svn.wordpress.org/trunk@49214


git-svn-id: http://core.svn.wordpress.org/trunk@48976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 22:45:03 +00:00
Sergey Biryukov
80be8c138d Administration: Remove obsolete .ac_results class references.
Core does not use the jQuery.suggest plugin since [38797].

Props afercia, hareesh-pillai, garrett-eclipse.
Fixes #40260.
Built from https://develop.svn.wordpress.org/trunk@49213


git-svn-id: http://core.svn.wordpress.org/trunk@48975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 22:33:08 +00:00
Helen Hou-Sandí
bdfd1a954f Multisite: More specific caching for get_dirsize.
Instead of one cache entry for all upload folders for a site on multisite, this now caches for each folder and invalidates that cache based on context. In multisite, this should speed up `get_dirsize` calls since older directories that are much less likely to change will no longer have the size recalculated.

Props janthiel, A5hleyRich, batmoo.
Fixes #19879.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 21:51:06 +00:00
Sergey Biryukov
1c1aadbe54 Pings/Trackbacks: Split do_all_pings() into several functions:
* `do_all_pingbacks()`
* `do_all_enclosures()`
* `do_all_trackbacks()`

This allows for the specific removal/replacement of one of more services.

Props dshanske, garrett-eclipse, Mista-Flo, azaozz, hellofromTonya.
Fixes #36576.
Built from https://develop.svn.wordpress.org/trunk@49211


git-svn-id: http://core.svn.wordpress.org/trunk@48973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 21:16:02 +00:00
Sergey Biryukov
18d3866ab2 Editor: Expose the embed core block on the server.
Props ntsekouras, gziolo.
Fixes #51531.
Built from https://develop.svn.wordpress.org/trunk@49210


git-svn-id: http://core.svn.wordpress.org/trunk@48972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 20:57:07 +00:00
Sergey Biryukov
e209e00734 Coding Standards: Fix WPCS issues in [49207].
See #46866.
Built from https://develop.svn.wordpress.org/trunk@49209


git-svn-id: http://core.svn.wordpress.org/trunk@48971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 20:45:06 +00:00
Sergey Biryukov
3d02b5b585 Bundled Themes: Declare support for the html5 feature navigation-widgets.
Widgets that output a list of links are now wrapped within `<nav>` elements to improve semantics and accessibility.

The `<nav>` elements are native landmark regions, which helps assistive technology users to navigate through them.

Follow-up to [48349], [49177].

Props hareesh-pillai, justinahinon, afercia, williampatton.
Fixes #51445.
Built from https://develop.svn.wordpress.org/trunk@49208


git-svn-id: http://core.svn.wordpress.org/trunk@48970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 20:32:05 +00:00
antpb
9556c08b35 Media: Add 'Uploaded to' for individual media items in the media editor.
Adds a link in the media editor showing which post a media item was uploaded to.
Props karmatosed, garrett-eclipse, Mista-Flo, SergeyBiryukov, joemcgill, hellofromTonya.
Fixes #46866.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 20:29:05 +00:00
Sergey Biryukov
fbc1622741 Coding Standards: Use more specific checks for $wpdb->get_row() results.
If `$wpdb->get_row()` is successful and the `$output` parameter has not been set, the output will be an instance of `stdClass`, so test to confirm that instead of testing against "not null".

This affects:
* `wpmu_validate_user_signup()`
* `wpmu_validate_blog_signup()`

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49206


git-svn-id: http://core.svn.wordpress.org/trunk@48968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 20:20:04 +00:00
antpb
9d13ae60e4 Media: Indicate if media is header video in media library.
This introduces a label to indicate if a piece of media is being used as a video header in the media library.
Props desrosj, Mista-Flo, mikeschroder.
Fixes #42929.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 18:32:07 +00:00
desrosj
570a4e8872 Build/Test Tools: Improve the clarity for PHPUnit workflow strategy.
This change makes better use of the job strategy matrix for workflows. By using `include`, the memcached and test reporting job can be configured more clearly.

Props ocean90.
See #50401.
Built from https://develop.svn.wordpress.org/trunk@49204


git-svn-id: http://core.svn.wordpress.org/trunk@48966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 18:24:10 +00:00
Sergey Biryukov
19545d255c Widgets: Introduce before_sidebar and after_sidebar arguments for register_sidebar().
Props deepaklalwani, flixos90, christophherr, dgwyer, markoheijnen, morganestes, audrasjb.
Fixes #19709.
Built from https://develop.svn.wordpress.org/trunk@49203


git-svn-id: http://core.svn.wordpress.org/trunk@48965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 15:40:09 +00:00
Sergey Biryukov
272df00b17 Embeds: Only catch clicks from the primary mouse button in the click handler, without any modifier keys.
This ensures that Ctrl/Cmd + click to open a link in the embed iframe in a new tab works as expected.

Props timhavinga, garrett-eclipse, smerriman, swissspidy, johnbillion, Mte90, iandunn, azaozz, afercia, audrasjb, SergeyBiryukov.
Fixes #39097.
Built from https://develop.svn.wordpress.org/trunk@49202


git-svn-id: http://core.svn.wordpress.org/trunk@48964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 13:36:08 +00:00
Sergey Biryukov
13b1b4bed3 Docs: Add a @deprecated note to WP_Community_Events::format_event_data_time().
Follow-up to [49146].

See #51130.
Built from https://develop.svn.wordpress.org/trunk@49201


git-svn-id: http://core.svn.wordpress.org/trunk@48963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 13:22:07 +00:00
Peter Wilson
a08fd6ff6f Canonical: Support multiple post types in redirect_guess_404_permalink().
Prevent `redirect_guess_404_permalink()` from throwing a notice when multiple post types are included in the `post_type` query.

Props junaidbhura.
Fixes #43056.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 23:23:05 +00:00
Sergey Biryukov
2716cc8048 Networks and Sites: Introduce network_site_info_form action.
The action fires at the end of the site info form in network admin, and complements the existing `network_site_new_form` action.

Props virgodesign.
Fixes #50704.
Built from https://develop.svn.wordpress.org/trunk@49199


git-svn-id: http://core.svn.wordpress.org/trunk@48961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 21:17:05 +00:00
John Blackbourn
1bcda42567 Media: Add an image_sideload_extensions filter to the list of allowed file extensions when sideloading an image from a URL.
Props paulschreiber, hellofromTonya

Fixes #50695

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


git-svn-id: http://core.svn.wordpress.org/trunk@48960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 21:06:05 +00:00
John Blackbourn
727922c8eb Docs: Further corrections and promotions for docblocks relating to object types.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 20:53:08 +00:00
John Blackbourn
b2515abd45 Docs: Improve the docs for the globals that are used in the actions and filters API.
See #50531, #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 19:19:06 +00:00
John Blackbourn
afbfe981fc Media: Add an audio and video player to the media manager modal.
This introduces a means of playing existing audio and video files while browsing them prior to selecting them for use.

Props antpb, Mista-Flo, garrett-eclipse, mapk

Fixes #43640

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


git-svn-id: http://core.svn.wordpress.org/trunk@48957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:39:07 +00:00
Sergey Biryukov
1faa241fb6 Code Modernization: Use instanceof instead of a comparison with get_class().
Includes adjusting external libraries which are no longer maintained externally.

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49194


git-svn-id: http://core.svn.wordpress.org/trunk@48956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:33:07 +00:00
Sergey Biryukov
0e3147c40e Coding Standards: Replace alias PHP functions with the canonical names.
Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.

This replaces all uses of the following:
* `join()` with `implode()`
* `sizeof()` with `count()`
* `is_writeable()` with `is_writable()`
* `doubleval()` with a `(float)` cast

In part, this is a follow-up to #47746.

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49193


git-svn-id: http://core.svn.wordpress.org/trunk@48955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:27:06 +00:00
Sergey Biryukov
b6f0882ddd Coding Standards: Use self when appropriate.
* `WP_List_Table::get_default_primary_column_name()` is a protected method, so calling it statically with the class name is bad practice.
* Similarly, this applies when calling a private constructor in `WP_Screen::get()`.

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49192


git-svn-id: http://core.svn.wordpress.org/trunk@48954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:18:07 +00:00
John Blackbourn
a01f94cad8 Administration: Allow WP_List_Table::get_bulk_items() to receive a nested array in order to output optgroups.
The allowed format for bulk actions is now an associative array where each element represents either a top level option value and label, or an array representing an optgroup and its options.

For a standard option, the array element key is the field value and the array element value is the field label.

For an optgroup, the array element key is the label and the array element value is an associative array of options as above.

Props goldenapples, mattkeys, valentinbora, davidbaumwald

Fixes #19278

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


git-svn-id: http://core.svn.wordpress.org/trunk@48952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 16:22:10 +00:00
Drew Jaynes
68cff74f62 Docs: Clarify documentation for what the 'count' orderby argument represents in WP_Term_Query.
Props jeremyescott.
Fixes #44443.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 08:23:06 +00:00
Sergey Biryukov
120291367a Formatting: Deprecate wp_slash_strings_only() in favor of wp_slash().
The reason for introducing `wp_slash_strings_only()` in [46454] was to keep non-string values untouched.

Later, `wp_slash()` itself was updated in [48433] to prevent changing non-string values.

To avoid confusion, `wp_slash_strings_only()` is now deprecated.

Props ayeshrajans, ocean90.
Fixes #50635.
Built from https://develop.svn.wordpress.org/trunk@49188


git-svn-id: http://core.svn.wordpress.org/trunk@48950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 06:57:04 +00:00
Sergey Biryukov
2f5aa85065 Comments: Hide the link to the initial parent comment in the reply heading when replying to another comment.
This ensures that the reply heading is updated correctly on single post URLs with the `?replytocom` query argument.

Follow-up to [47506], [48876], [48904].

Props mailnew2ster, wpamitkumar, audrasjb, desrosj, SergeyBiryukov.
Fixes #51175.
Built from https://develop.svn.wordpress.org/trunk@49187


git-svn-id: http://core.svn.wordpress.org/trunk@48949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 06:41:04 +00:00
Sergey Biryukov
5892cd545e Code Modernization: Remove unnecessary reference sign from PO::export_entry() definition.
This fixes a PHP 8 "argument must be passed by reference, value given" error when using `array_map()` in `PO::export_entries()`.

Object variables in PHP 5+ contain a reference to the object, and it's the reference that's passed around.

Props jrf.
See #50913.
Built from https://develop.svn.wordpress.org/trunk@49186


git-svn-id: http://core.svn.wordpress.org/trunk@48948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 06:29:05 +00:00
Sergey Biryukov
e2d191f710 Revisions: Explicitly declare the Text_Diff::_getTempDir() method as static.
This fixes a "Non-static method cannot be called statically" fatal error on PHP 8.

Props jrf.
Fixes #51559.
Built from https://develop.svn.wordpress.org/trunk@49185


git-svn-id: http://core.svn.wordpress.org/trunk@48947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 16:36:07 +00:00
Sergey Biryukov
30d9432760 Code Modernization: Use explicit visibility for class property declarations.
Using `var` or only `static` to declare a class property is PHP 4 code.

This updates the codebase to use explicit visibility modifiers introduced in PHP 5.

Props jrf.
Fixes #51557. See #22234.
Built from https://develop.svn.wordpress.org/trunk@49184


git-svn-id: http://core.svn.wordpress.org/trunk@48946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 16:26:09 +00:00
John Blackbourn
c16ae60deb Docs: Fix and upgrade various object docblock notations.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 16:05:09 +00:00
Sergey Biryukov
9d6a2d1c33 Feeds: Fix "Only variables should be passed by reference" PHP notice in atomlib.php.
Props jrf.
Fixes #51558.
Built from https://develop.svn.wordpress.org/trunk@49182


git-svn-id: http://core.svn.wordpress.org/trunk@48944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 15:45:06 +00:00
John Blackbourn
5a573f28f2 Docs: Miscellaneous docblock fixes.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 14:54:05 +00:00
John Blackbourn
ee96f93558 Administration: Fix a coding standards issue after [49179].
See #50699

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


git-svn-id: http://core.svn.wordpress.org/trunk@48942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 12:34:08 +00:00
Andrew Ozz
59c45c41e4 Fix and improve arranging of postboxes/metaboxes:
- Enable arranging only when the Screen Options tab is open.
- Prevent accidental/unintended dragging. Seen it happen mostly on laptops when using the mousepad/trackpad.
- Improve discoverability and usefulness by always showing the "drop zones" outline when postboxes are draggable/arrangeable.
- Add some (brief) explanation to the Screen Options tab helping the user understand what options are available and how to change them. This is especially helpful for screen reader users to give an idea how to use the screen options and what to expect.
- Fix/enhance some of the code in `postbox.js` and make it coding standards compliant.

See #50699.
Built from https://develop.svn.wordpress.org/trunk@49179


git-svn-id: http://core.svn.wordpress.org/trunk@48941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 10:00:06 +00:00
Sergey Biryukov
c5f1d21020 Administration: Wrap the list table items count to a new line on small screens.
This avoids overlapping with action buttons and brings some consistency to bottom paddings across various screens.

Props passoniate, afercia, anuj2, rolfsiebers, uxkai, ireneyoast, thijsvanloef, hellofromTonya, audrasjb, helen, SergeyBiryukov.
Fixes #49246.
Built from https://develop.svn.wordpress.org/trunk@49178


git-svn-id: http://core.svn.wordpress.org/trunk@48940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 01:13:06 +00:00
Sergey Biryukov
6dba11fb82 Accessibility: Widgets: Conditionally wrap the tag cloud widget in a <nav> element.
If the theme declares support for the `html5` feature `navigation-widgets`, the tag cloud widget is now wrapped in a `<nav>` element to improve semantics and accessibility.

The `<nav>` elements are native landmark regions, which helps assistive technology users to navigate through them.

Follow-up to [48349] for other widgets.

Props audrasjb, justinahinon, ravipatel.
Fixes #51455. See #48170.
Built from https://develop.svn.wordpress.org/trunk@49177


git-svn-id: http://core.svn.wordpress.org/trunk@48939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 18:32:06 +00:00
desrosj
fd1c2cb401 External Libraries: Update the SimplePie library to version 1.5.6.
This version fixes a handful of PHP 8 compatibility issues.

A full list of changes included in this update can be found on GitHub: https://github.com/simplepie/simplepie/compare/1.5.5...1.5.6.

Props jrf, ayeshrajans.
Fixes #51521.
Built from https://develop.svn.wordpress.org/trunk@49176


git-svn-id: http://core.svn.wordpress.org/trunk@48938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 17:20:07 +00:00
desrosj
c72bd8c75c Build/Test Tools: Specify the full working directory for PHPCS
Props ocean90.
See #50401.
Built from https://develop.svn.wordpress.org/trunk@49175


git-svn-id: http://core.svn.wordpress.org/trunk@48937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 17:14:06 +00:00
Mike Schroder
9cdd649768 Media: Work around use-cropbox bug in Ghostscript 8.70
Wraps `Imagick::readImage()` for PDFs with exception handling, trying again without `use-cropbox` if this fails.

Introduces `WP_Image_Editor_Imagick::pdf_load_source()`.

Works around a known issue in Ghostscript 8.70 (fixed in 8.71) that results in a stack underflow.
While it only affects this version, it remains a common version found on hosts, and prevented some PDF thumbnails from being generated.

See this Ghostscript bug for more details: https://bugs.ghostscript.com/show_bug.cgi?id=690676

Props azaozz, joseaneto, cranewest, dantahoua, n5hzr, mikeschroder.
Fixes #48853.
Built from https://develop.svn.wordpress.org/trunk@49174


git-svn-id: http://core.svn.wordpress.org/trunk@48936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 10:48:07 +00:00
Sergey Biryukov
6c13cdd533 Docs: Add @since tags for the fire_after_hooks parameter of wp_insert_post(), wp_update_post(), and wp_insert_attachment().
Document the parameter as optional.

Follow-up to [49172].

See #45114.
Built from https://develop.svn.wordpress.org/trunk@49173


git-svn-id: http://core.svn.wordpress.org/trunk@48935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 09:40:10 +00:00
Peter Wilson
32d193f96f REST API, Posts: Add a hook to fire once a post, its terms and meta update.
Introduces the action `wp_after_insert_post` inside a wrapper function of the same name. This hook allows plugin developers to access a posts full data (including its terms and meta data) regardless of the workflow used to save it.

A new parameter is introduced to `wp_insert_post()` to indicate whether the hook should be fired within the function call or will be fired afterward.

Props aristath, Collizo4sky, danielbachhuber, joyously, kadamwhite, kraftbj, markparnell, mikeschroder, noisysocks, peterwilsoncc, SergeyBiryukov, talldanwp, thewebprincess, TimothyBlynJacobs.
Fixes #45114.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 03:34:08 +00:00
Peter Wilson
cd8b13842f Taxonomy: Fix warnings thrown by custom term count callbacks.
Add a `use` to a closure to avoid an undefined variable throwing a warning. Adds unit tests to ensure the custom callbacks run as expected when defined.

Follow up to [49141].
Props ocean90, dd32.
Fixes #40351.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 02:43:06 +00:00