id_base = isset( $args['id_base'] ) ? strtolower( $args['id_base'] ) : strtolower( get_class( $this ) ); $this->name = $args['name'] ?? get_class( $this ); $this->description = $args['description'] ?? ''; $this->id = isset( $args['id'] ) ? $this->id_base . '_' . $args['id'] : $this->id_base; $this->icon = $args['icon'] ?? 'dashicons dashicons-plus'; $this->option_name = 'blogsy_customizer_widget_' . $this->id_base; $this->values = $args['values'] ?? []; $this->number = isset( $args['number'] ) ? intval( $args['number'] ) : '__i__'; $this->type = $args['type'] ?? ''; $this->locations = $args['locations'] ?? []; $this->visibility = $args['visibility'] ?? []; } /** * Displays the form fields for this widget. * * @since 1.0.0 * @return void */ public function form() {} /** * Displays the complete widget control. * * @since 1.0.0 */ public function template(): void { ?>

name ); ?>

form(); ?> locations && is_array( $this->locations ) && [] !== $this->locations ) { ?> values['location'] ?? key( $this->locations ); ?>

locations as $id => $name ) { ?> data-option-name="location">

visibility && is_array( $this->visibility ) && [] !== $this->visibility ) { ?> values['visibility'] ?? key( array_reverse( $this->visibility ) ); ?>

|

description ) ) { ?>
description ); ?>