'', 'visibility' => 'all', ]; $args['values'] = isset( $args['values'] ) ? wp_parse_args( $args['values'], $values ) : $values; $args['values']['style'] = sanitize_text_field( $args['values']['style'] ); parent::__construct( $args ); $this->name = __( 'Dark mode', 'blogsy' ); $this->description = __( 'A dark mode for your site.', 'blogsy' ); $this->icon = 'dashicons dashicons-lightbulb'; $this->type = 'darkmode'; $this->styles = $args['styles'] ?? []; } /** * Displays the form for this widget on the Widgets page of the WP Admin area. * * @since 1.0.0 */ public function form(): void { if ( ! empty( $this->styles ) ) { ?>