Commit 69a35b6
committed
AI: Prevent
When `WP_AI_SUPPORT` is explicitly set to `false`, `wp_supports_ai()` now returns early before the filter runs. This ensures the site owner's explicit preference to disable AI cannot be overridden by a plugin via the `wp_supports_ai` filter.
The filter default is now always `true`, since the constant check happens beforehand.
Developed in: #11295
Follow-up to [62067].
Reviewed by justlevine, westonruter, adamsilverstein.
Merges [62239] to the 7.0 branch.
Props justlevine, westonruter, gziolo, mindctrl, adamsilverstein, johnjamesjacoby, ahortin, nilambar, ozgursar, audrasjb, jeffpaul.
Fixes #64706.
git-svn-id: https://develop.svn.wordpress.org/branches/7.0@62241 602fd350-edb4-49c9-b593-d223f7449a82wp_supports_ai filter from overriding the WP_AI_SUPPORT constant.1 parent bc0a300 commit 69a35b6
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | | - | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | | - | |
31 | | - | |
| 33 | + | |
32 | 34 | | |
33 | | - | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
0 commit comments