'', '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', 'bloglo' ); $this->description = __( 'A dark mode for your site.', 'bloglo' ); $this->icon = 'dashicons dashicons-lightbulb'; $this->type = 'darkmode'; $this->styles = isset( $args['styles'] ) ? $args['styles'] : array(); } /** * Displays the form for this widget on the Widgets page of the WP Admin area. * * @since 1.0.0 * @return void */ public function form() { if ( ! empty( $this->styles ) ) { ?>