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 )
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
103 | private function process_options( $defaults , $options , $new_options ){ |
104 | foreach ( $defaults as $index => $value ) { |
105 | if ( isset( $new_options [ $index ] ) ){ |
106 | switch ( gettype ( $value ) ){ |
108 | $options [ $index ] = (bool) $new_options [ $index ]; |
111 | $options [ $index ] = (int) $new_options [ $index ]; |
114 | $options [ $index ] = trim( (string) $new_options [ $index ] ); |
Expand full source code
Collapse full source code