On this page
wp_xmlrpc_server::wp_getOptions( array $args ): array|IXR_Error
Retrieve blog options.
Parameters
$argsarray Required-
Method arguments. Note: arguments must be ordered as documented.
- int
Blog ID (unused).
1stringUsername.2stringPassword.3arrayOptional. Options.
- int
Return
array|IXR_Error
Source
File: wp-includes/class-wp-xmlrpc-server.php. View all references
public function wp_getOptions( $args ) {
$this->escape( $args );
$username = $args[1];
$password = $args[2];
$options = isset( $args[3] ) ? (array) $args[3] : array();
$user = $this->login( $username, $password );
if ( ! $user ) {
return $this->error;
}
// If no specific options where asked for, return all of them.
if ( count( $options ) == 0 ) {
$options = array_keys( $this->blog_options );
}
return $this->_getOptions( $options );
}
Related
Uses
| Uses | Description |
|---|---|
| wp_xmlrpc_server::_getOptions() wp-includes/class-wp-xmlrpc-server.php | Retrieve blog options value from list. |
| wp_xmlrpc_server::escape() wp-includes/class-wp-xmlrpc-server.php | Escape string or array of strings for database. |
| wp_xmlrpc_server::login() wp-includes/class-wp-xmlrpc-server.php | Log user in. |
Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_getoptions