wp_xmlrpc_server::wp_getOptions()
Retrieves blog options.
Метод класса: wp_xmlrpc_server{}
Хуков нет.
Возвращает
Массив|IXR_Error
.
Использование
$wp_xmlrpc_server = new wp_xmlrpc_server(); $wp_xmlrpc_server->wp_getOptions( $args );
- $args(массив) (обязательный)
Method arguments. Note: arguments must be ordered as documented.
-
0(int)
Blog ID (unused). -
1(строка)
Username. -
2(строка)
Password. - 3(массив)
Optional. Options.
-
Список изменений
С версии 2.6.0 | Введена. |
Код wp_xmlrpc_server::wp_getOptions() wp xmlrpc server::wp getOptions WP 6.6.2
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 ); }