id || ! current_user_can( 'manage_options' ) ) { return; } $types = $this->support->classic_types(); if ( ! $types ) { return; } echo '

' . wp_kses_post( self::message( $types, $this->support->classic_editor_plugin() ) ) . '

'; } /** * The explanation, shared with the settings screen. * * @param array $types post type => label. */ public static function message( array $types, bool $classic_plugin ): string { $text = '' . esc_html__( 'Blocklingo is made for the block editor (Gutenberg).', 'blocklingo' ) . ' ' . esc_html( sprintf( /* translators: %s: list of post types, e.g. "Pages, Posts". */ __( 'The block editor is turned off for: %s. These are still translated with "Translate everything" (on the server), but the Language panel and the Translate button in the editor need the block editor.', 'blocklingo' ), implode( ', ', $types ) ) ); if ( $classic_plugin ) { $text .= ' ' . sprintf( /* translators: %s: link to Settings > Writing. */ esc_html__( 'The Classic Editor plugin turns it off - allow the block editor in %s.', 'blocklingo' ), '' . esc_html__( 'Settings > Writing', 'blocklingo' ) . '' ); } return $text; } }