This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Rest_Store_Settings::process_options( array $defaults, array $options, array $new_options )

Process options.


Parameters

$defaults

(Required) The default options.

$options

(Required) The existing options.

$new_options

(Required) The new options.


Return

(array) The processed options.


Source

File: includes/libs/rest-api/endpoints/plugin/rest-store-settings.class.php

	private function process_options( $defaults, $options, $new_options ){
		foreach ( $defaults as $index => $value ) {
			if( isset( $new_options[ $index ] ) ){
				switch( gettype( $value ) ){
					case 'boolean':
						$options[ $index ] = (bool) $new_options[ $index ];
					break;
					case 'integer':
						$options[ $index ] = (int) $new_options[ $index ];
					break;
					default:
						$options[ $index ] = trim( (string) $new_options[ $index ] );
					break;
				}
			}
		}

		return $options;
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!