'Eski %2$s eklentisi etkinken %1$s çalışamaz. Önce %2$s eklentisini devre dışı bırakın; verileriniz yerinde kalır.', 'de' => '%1$s kann nicht laufen, solange das alte Plugin %2$s aktiv ist. Deaktivieren Sie zuerst %2$s; Ihre Daten bleiben erhalten.', 'es' => '%1$s no puede funcionar mientras el antiguo plugin %2$s esté activo. Desactiva primero %2$s; tus datos se conservan.', ); /** The main file, while the old plugin is loaded: no activation, one notice on the Plugins screen. */ public static function stop( string $file ): void { register_activation_hook( $file, array( self::class, 'refuse' ) ); add_action( 'admin_notices', array( self::class, 'notice' ) ); } /** The message in the language WordPress speaks to this person (as I18n::locale() decides). */ public static function message( ?string $locale = null ): string { $locale = strtolower( substr( $locale ?? ( function_exists( 'determine_locale' ) ? determine_locale() : get_locale() ), 0, 2 ) ); return sprintf( self::TEXTS[ $locale ] ?? self::TEXT, 'StoreRuler', self::NAME ); } /** StoreRuler's activation hook while the old plugin is active: WordPress shows the message and leaves StoreRuler off. */ public static function refuse(): void { wp_die( esc_html( self::message() ), '', array( 'back_link' => true ) ); } /** admin_notices: on the Plugins screen only, for someone who may change the plugins. */ public static function notice(): void { $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; if ( ! $screen || $screen->id !== 'plugins' || ! current_user_can( 'activate_plugins' ) ) { return; } echo '
' . esc_html( self::message() ) . '