get(), $tour_slug ); $this->set( $value ); } /** * Gets the value of the setting. * * @since 1.27.0 * * @return array Value set for the option, or default if not set. */ public function get() { $value = parent::get(); return is_array( $value ) ? $value : array(); } /** * Gets the expected value type. * * @since 1.27.0 * * @return string The type name. */ protected function get_type() { return 'array'; } /** * Gets the default value. * * @since 1.27.0 * * @return array The default value. */ protected function get_default() { return array(); } /** * Gets the callback for sanitizing the setting's value before saving. * * @since 1.27.0 * * @return Closure */ protected function get_sanitize_callback() { return function ( $value ) { return is_array( $value ) ? array_values( array_unique( $value ) ) : $this->get(); }; } }