PHP Class WPCOM_JSON_API_Site_Settings_Endpoint, jetpack

Inheritance: extends WPCOM_JSON_API_Endpoint
ファイルを表示 Open project: automattic/jetpack Class Usage Examples

Public Properties

Property Type Description
$site_format

Public Methods

Method Description
callback ( $path = '', $blog_id ) POST /sites/%s/settings
get_category_details ( $category ) : (array) Returns category details
get_settings_response ( ) : (array) Collects the necessary information to return for a get settings response.
jetpack_relatedposts_supported ( ) : (bool) Determines whether jetpack_relatedposts is supported
update_settings ( ) : (array) Updates site settings for authorized users

Protected Methods

Method Description
get_cast_option_value_or_null ( (string) $option_name, (callable) $cast_callable ) : (int | null) Returns an option value as the result of the callable being applied to it if a value is set, otherwise null.
get_locale ( $key )

Method Details

callback() public method

POST /sites/%s/settings
public callback ( $path = '', $blog_id )

get_cast_option_value_or_null() protected method

Returns an option value as the result of the callable being applied to it if a value is set, otherwise null.
protected get_cast_option_value_or_null ( (string) $option_name, (callable) $cast_callable ) : (int | null)
$option_name (string)
$cast_callable (callable)
return (int | null)

get_category_details() public method

Returns category details
public get_category_details ( $category ) : (array)
return (array)

get_locale() protected method

protected get_locale ( $key )

get_settings_response() public method

Collects the necessary information to return for a get settings response.
public get_settings_response ( ) : (array)
return (array)

update_settings() public method

Updates site settings for authorized users
public update_settings ( ) : (array)
return (array)

Property Details

$site_format public_oe static_oe property

public static $site_format