wp_xmlrpc_server::_getOptions()publicWP 2.6.0

Retrieves blog options value from list.

Method of the class: wp_xmlrpc_server{}

No Hooks.

Return

Array.

Usage

$wp_xmlrpc_server = new wp_xmlrpc_server();
$wp_xmlrpc_server->_getOptions( $options );
$options(array) (required)
Options to retrieve.

Changelog

Since 2.6.0 Introduced.

wp_xmlrpc_server::_getOptions() code WP 6.6.2

public function _getOptions( $options ) {
	$data       = array();
	$can_manage = current_user_can( 'manage_options' );
	foreach ( $options as $option ) {
		if ( array_key_exists( $option, $this->blog_options ) ) {
			$data[ $option ] = $this->blog_options[ $option ];
			// Is the value static or dynamic?
			if ( isset( $data[ $option ]['option'] ) ) {
				$data[ $option ]['value'] = get_option( $data[ $option ]['option'] );
				unset( $data[ $option ]['option'] );
			}

			if ( ! $can_manage ) {
				$data[ $option ]['readonly'] = true;
			}
		}
	}

	return $data;
}