← All changes
|
inc/compatibility/multilingual/providers/provider.php
+16
-0
2.12.2
→
2.12.8
View file →
| @@ -156,5 +156,21 @@ | ||
| 156 | 156 | * @since 2.11.0 |
| 157 | 157 | * @return string Translated value, or the original when no translation exists. |
| 158 | 158 | */ |
| 159 | 159 | public function translate_package_string( array $package, string $name, string $value ): string; |
| 160 | + | |
| 161 | + /* | |
| 162 | + * NOTE: delete_package( array $package ): void is deliberately NOT declared here. | |
| 163 | + * | |
| 164 | + * This interface is a public extension point — Multilingual_Manager::resolve_provider() | |
| 165 | + * accepts any object via the `srfm_multilingual_provider` filter (@since 2.11.0) and | |
| 166 | + * instanceof-checks it. Adding a bodyless method to a shipped interface is a | |
| 167 | + * fatal-error BC break: a third-party provider written against 2.11.0-2.12.2 would | |
| 168 | + * fail at class-declaration time on update, producing a white screen rather than a | |
| 169 | + * degraded feature. Guarding the call site does not help, because the fatal happens | |
| 170 | + * when the implementor's class is declared, not when the method is called. | |
| 171 | + * | |
| 172 | + * Both first-party providers implement delete_package(), and String_Collector | |
| 173 | + * feature-detects it before calling. If it is ever promoted into this contract, that | |
| 174 | + * must be a major release with a migration note for custom providers. | |
| 175 | + */ | |
| 160 | 176 | } |