$cal_item ) { if ( is_array( $cal_item ) ) { if ( isset( $cal_item['optgroup'] ) ) { $sorted_options_list[] = $cal_item; } else { // Legacy skins with attributes: 'style=>'color:#ccc;' . $cal_item['url'] = $cal_index; $sorted_options_list[] = $cal_item; } } else { $sorted_options_list[] = array( 'url' => $cal_index, 'title' => $cal_item, ); } } return $sorted_options_list; } /** * Get calendar_skin control default settings. * * Retrieve the default settings of the calendar_skin control. Used to return * the default settings while initializing the calendar_skin control. * * @since 1.0.0 * @access protected * @return array Currency control default settings. */ protected function get_default_settings(): array { return [ 'booking_calendar_skins' => self::get_booking_calendar_skins(), 'default' => wpbc_get_calendar_skin_url(), ]; } public function get_value( $control, $settings ) { $current_value = wpbc_get_calendar_skin_url(); // or default skin string. return $current_value; } public function get_default_value() { return wpbc_get_calendar_skin_url(); // fallback if no user value exists. } /** * Render calendar_skin control output in the editor. * * Used to generate the control HTML in the editor using Underscore JS * template. The variables for the class are available using `data` JS * object. * * @since 1.0.0 * @access public */ public function content_template(): void { $control_uid = $this->get_control_uid(); ?>