';
$kit = \RoosterLMS\UI\Ui::kit_toggle( '', $on, array( 'id' => 'rooster-lms-editor-toggle', 'label' => _x( 'Designer', 'the menu bar switch: open courses in the Rooster LMS Designer', 'rooster-lms' ), 'tip' => $tip, 'attrs' => array( 'data-rl-editor-toggle' => '' ) ) );
if ( null !== $kit ) {
return $open . $kit . '';
}
$html = '
'
. ''
. '' . esc_html( $tip ) . '
';
return $html;
}
public static function tip(): string {
$site = EditorPreference::DESIGNER === EditorPreference::site() ? __( 'the Rooster LMS Designer', 'rooster-lms' ) : __( 'the block editor', 'rooster-lms' );
/* translators: %s: the site's default editor, "the Rooster LMS Designer" or "the block editor". */
return sprintf( __( 'Open courses, lessons and quizzes in the Rooster LMS Designer (on) or the block editor (off). Your choice; the site\'s default is %s.', 'rooster-lms' ), $site );
}
}