Commit Graph

7852 Commits

Author SHA1 Message Date
desrosj
e3a467a55a Upgrade/Install: Prevent removal of additional data from plugin update info.
This switches to using `wp_parse_args()` instead of a combination of `array_merge()` and `array_intersect_key()` when ensuring that all expected default keys are present in the update information for a plugin.

This prevents non-default data returned by 3rd-party plugins from being unintentionally stripped out.

Props peterwilsoncc, chriscct7.
Fixes #51609.
Built from https://develop.svn.wordpress.org/trunk@49477


git-svn-id: http://core.svn.wordpress.org/trunk@49236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-02 19:13:07 +00:00
desrosj
9c5173ffa6 Themes: Ensure that only privileged users can set a background image when a theme is using the deprecated custom background page.
Props xknown, zieladam, peterwilsoncc, whyisjake.
Merges [49379] to trunk.
Built from https://develop.svn.wordpress.org/trunk@49388


git-svn-id: http://core.svn.wordpress.org/trunk@49147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-29 18:09:13 +00:00
desrosj
1050613168 Coding standards: Modify escaping functions to avoid potential false positives.
Props xknown, zieladam, peterwilsoncc.
Merges [49375] to trunk.
Built from https://develop.svn.wordpress.org/trunk@49384


git-svn-id: http://core.svn.wordpress.org/trunk@49143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-29 18:03:11 +00:00
TimothyBlynJacobs
2df94804d4 Site Health, App Passwords: Test if the Authorization header is populated correctly.
App Passwords rely on the Authorization header to transport the Basic Auth credentials. For Apache web servers, WordPress automatically includes a RewriteRule to populate the value for servers running in CGI or FastCGI that wouldn't ordinarily populate the value. 

This tests if the header is being filled with the expected values. For Apache users, we direct the user to visit the Permalinks settings to flush their permalinks. For all other users, we direct them to a help document on developer.wordpress.org.

Props Clorith, marybaum, TimothyBlynJacobs.
Fixes #51638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-27 18:32:07 +00:00
Helen Hou-Sandí
219079f7a3 Privacy: Show failures before successes for all bulk actions.
Props garrett-eclipse.
See #44081, [49331].

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


git-svn-id: http://core.svn.wordpress.org/trunk@49094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-27 18:19:06 +00:00
Helen Hou-Sandí
f4f72498c0 Privacy: Show notices for both failed and successful bulk actions.
Props javorszky, garrett-eclipse, hellofromTonya.
Fixes #44081.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-27 17:47:08 +00:00
Andrew Ozz
7c32cbf990 Revert the improvenents to arranging of postboxes/metaboxes, [49179]. The current patch fixes about half a dozen problems, but seems more general improvements are needed to how Screen Options work.
See #50699.
Built from https://develop.svn.wordpress.org/trunk@49325


git-svn-id: http://core.svn.wordpress.org/trunk@49086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-27 10:47:12 +00:00
Sergey Biryukov
0fb5ccd4d0 Docs: Add a @global tag for $user_id in WP_Application_Passwords_List_Table::prepare_items().
Props mukesh27.
Fixes #51633.
Built from https://develop.svn.wordpress.org/trunk@49321


git-svn-id: http://core.svn.wordpress.org/trunk@49082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-27 02:12:06 +00:00
TimothyBlynJacobs
f6d39d1c51 App Passwords: Improve accessibility.
- Make form inputs stacked instead of inline.
- Provide a visible label for the app name.
- Add screen reader text to dismiss button.
- Make "Revoke" button label more descriptive.
- Use aria-disabled instead of disabled to avoid focus loss.
- Display password in a readonly input to assist copy and paste.
- Remove large sections of italic text.
- Use `.form-wrap` and `.form-field` to give consistent form styling.
- Improve labeling and placeholder text.

Props alexstine, georgestephanis, afercia, TimothyBlynJacobs.
Fixes #51580.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-24 03:34:06 +00:00
Sergey Biryukov
bb63c1cbd9 Upgrade/Install: Account for new WP_AUTO_UPDATE_CORE values in auto-updates settings form.
This updates `core_auto_updates_settings()` to account for the new `beta` and `rc` values for the `WP_AUTO_UPDATE_CORE` constant.

Additionally, recognize these new values as acceptable in Site Health tests.

Follow-up to [48804], [49245], [49254].

Fixes #51319. See #50907.
Built from https://develop.svn.wordpress.org/trunk@49292


git-svn-id: http://core.svn.wordpress.org/trunk@49054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-24 00:26:05 +00:00
Sergey Biryukov
d9838eed62 Posts, Post Types: Set better default title for custom post types without title support.
The default title is now set to "(no title supported)" instead of "Auto Draft".

Props garrett-eclipse, rajanit2000, bridgetwillard, donmhico, nrqsnchz.
Fixes #45516.
Built from https://develop.svn.wordpress.org/trunk@49288


git-svn-id: http://core.svn.wordpress.org/trunk@49050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-23 19:09:10 +00:00
Helen Hou-Sandí
e0c12cc818 Administration: Unify search results message on list tables.
This wraps the search string in a `<strong>` tag, which makes easier to parse visually especially when your search string also contains double quotes.

Props Mista-Flo, mapk, sergeybiryukov.
Fixes #37353.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-23 16:01:15 +00:00
Helen Hou-Sandí
4847fb4263 Administration: Better targeting for required form field highlighting.
Previously, any `input` or `select` inside of a `.form-invalid` wrapper would get the red border highlighting, including submit buttons which was not visually correct. This now only applies to form elements with a class of `.form-required` inside of the `.form-invalid` wrapper. It also continues to apply the border to elements with both classes (`.form-invalid.form-required`) as that is how some of the admin markup is structured.

Plugin authors may need to do the same sort of class application seen in this commit, i.e. add `.form-required` to certain form elements.

Props sabernhardt, dilipbheda, helen.
Fixes #50686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-23 15:05:09 +00:00
TimothyBlynJacobs
ce34d0ab00 App Passwords: Support an app_id to uniquely identify instances of an app.
Apps may now optionally include an `app_id` parameter when directing the user to the Authorize Application screen. This allows for instances of an application to be identified and potentially revoked or blocked.

Props TimothyBlynJacobs, georgestephanis.
Fixes #51583.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-22 15:06:09 +00:00
Sergey Biryukov
ecf8e59918 Docs: Add a @since note about async_direct_test key to the site_status_tests filter.
Follow-up to [49232].

See #51547.
Built from https://develop.svn.wordpress.org/trunk@49266


git-svn-id: http://core.svn.wordpress.org/trunk@49028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-21 14:55:09 +00:00
Sergey Biryukov
fcc04a6a37 Coding Standards: Fix WPCS issues in [49258].
See #46619.
Built from https://develop.svn.wordpress.org/trunk@49259


git-svn-id: http://core.svn.wordpress.org/trunk@49021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 21:20:07 +00:00
Helen Hou-Sandí
e1e6e949ff Privacy: Add "Mark as completed" action.
Props garrett-eclipse, ocean90, joostdevalk, mista-flo, helen.
Fixes #46619.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 21:07:07 +00:00
Helen Hou-Sandí
5b4d643d60 Privacy: Add requester IP to password reset emails.
Props garrett-eclipse, bridgetwillard, isharis, ocean90.
Fixes #43856.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 20:03:08 +00:00
Helen Hou-Sandí
9ab2f1ae3e Upgrade/Install: Add UI for opting in to core auto-updates for major versions.
Props audrasjb, karmatosed, aaroncampbell, paaljoachim, davidbaumwald.
Fixes #50907.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 19:35:06 +00:00
Helen Hou-Sandí
874b812ce3 Upgrade/Install: Don't show theme update prompts on subsites.
If you are using `wp_prepare_themes_for_js()` and relying on `updates`/`no_updates` in multisite, you will need to filter that data back in using the `wp_prepare_themes_for_js` hook.

Props pbiron, afragen.
Fixes #49831.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 19:14:09 +00:00
Sergey Biryukov
806cfea146 Coding Standards: Fix WPCS issues in [49242].
See #50774.
Built from https://develop.svn.wordpress.org/trunk@49249


git-svn-id: http://core.svn.wordpress.org/trunk@49011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 18:31:07 +00:00
Sergey Biryukov
6e71523ead Upgrade/Install: Allow WordPress sites to opt-in to beta & RC releases.
The `WP_AUTO_UPDATE_CORE` constant now supports `beta` and `rc` values.

This makes it possible for sites to opt-in to updating to RC (or beta) releases without having to install a plugin, or run on a development version.

Props dd32, knutsp.
Fixes #51319.
Built from https://develop.svn.wordpress.org/trunk@49245


git-svn-id: http://core.svn.wordpress.org/trunk@49007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 17:56:06 +00:00
Sergey Biryukov
94b088339c Upgrade/Install: Restore casting $filter_payload to an object in WP_MS_Themes_List_Table::prepare_items().
Follow-up to [48750], [49241].

See #50875.
Built from https://develop.svn.wordpress.org/trunk@49243


git-svn-id: http://core.svn.wordpress.org/trunk@49005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 17:44:06 +00:00
Helen Hou-Sandí
c8fbc04276 Upgrade/Install: Include "from" version for plugins/themes in email.
This can help with chasing down any issues that may arise and rolling back if necessary. We hope it's not, but it might be.

Props dkotter, garrett-eclipse, pbiron, audrasjb.
Fixes #50774.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 17:41:07 +00:00
Sergey Biryukov
e38c5ca7d4 Upgrade/Install: Introduce a wrapper for the auto_update_{$type} filter checks.
This allows for cleaner checks whether auto-updates are forced for a plugin or theme.

Follow-up to [48750].

Props rebasaurus, garrett-eclipse, SergeyBiryukov.
Fixes #50875.
Built from https://develop.svn.wordpress.org/trunk@49241


git-svn-id: http://core.svn.wordpress.org/trunk@49003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 17:39:07 +00:00
Sergey Biryukov
be5fb561ad Quick/Bulk Edit: Introduce quick_edit_dropdown_authors_args filter.
This allows for customizing the arguments used to generate the Quick Edit authors drop-down.

Additionally, pass the `$bulk` argument to the `quick_edit_dropdown_pages_args` filter, for consistency.

Props Mista-Flo, garrett-eclipse, hellofromTonya.
Fixes #47685.
Built from https://develop.svn.wordpress.org/trunk@49238


git-svn-id: http://core.svn.wordpress.org/trunk@49000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 16:40:05 +00:00
Sergey Biryukov
35681b0e9a Site Health: Introduce the WP_Site_Health::is_development_environment() method.
This allows Site Health tests to check if the current environment type is set to `development` or `local`.

Use the new method:
* In HTTPS tests, instead of a hardcoded check for `localhost`.
* In `WP_DEBUG` and `WP_DEBUG_DISPLAY` tests, to set the status to `recommended` instead of `critical`.

Props dkotter, Clorith, DavidAnderson, joyously, knutsp, afragen, SergeyBiryukov.
Fixes #47058.
Built from https://develop.svn.wordpress.org/trunk@49237


git-svn-id: http://core.svn.wordpress.org/trunk@48999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 16:23:07 +00:00
desrosj
8778aa8922 Site Health: Improve the reliability of asynchronous tests.
This change adds additional logic to catch HTTP failures that do not return a `WP_Error` object (for example, a wp-json REST API error error).

This also fixes instances where REST API callbacks performed from cron do not work due to a lack of authentication by introducing a direct callback route that asynchronous tests can register.

Props dd32, clorith, timothyblynjacobs.
Fixes #51547.
Built from https://develop.svn.wordpress.org/trunk@49232


git-svn-id: http://core.svn.wordpress.org/trunk@48994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 14:50:06 +00:00
Sergey Biryukov
0287a48764 Docs: Update the @since note for _media_states().
Follow-up to [49223].

Props mukesh27.
Fixes #42063.
Built from https://develop.svn.wordpress.org/trunk@49231


git-svn-id: http://core.svn.wordpress.org/trunk@48993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 14:41:05 +00:00
desrosj
d40c365a30 Coding Standards: Correct some minor coding standards issues.
Introduced in [49154], [49212], [49223], and [49224].
Built from https://develop.svn.wordpress.org/trunk@49225


git-svn-id: http://core.svn.wordpress.org/trunk@48987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 13:29:08 +00:00
Helen Hou-Sandí
edb64a3d8e Media: Indicate if item is or was used as a site option in the details modal.
Props Mista-Flo, melchoyce.
Fixes #42063.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 03:14:06 +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
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
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
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
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
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
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
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
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
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
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
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
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
Sergey Biryukov
df51aa9b6f Upgrade/Install: Check if plugin or theme update results are available before applying the notification filters.
This avoids a PHP notice for an undefined index of either `plugin` or `theme` in the `auto_{plugin|theme}_update_send_email` filter hook.

Props afragen, audrasjb.
Fixes #51400.
Built from https://develop.svn.wordpress.org/trunk@49166


git-svn-id: http://core.svn.wordpress.org/trunk@48928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-15 23:27:03 +00:00