Schema
The schema defines all the fields that are registered with the Settings API. Any response from these endpoints can be expected to contain the fields below.
connections_display_resultsobject | Properties: – search_message (bool)– cat_desc (bool)– index (bool) |
connections_categoryobject | Properties – default (bool) |
connections_permalinkobject | Properties: – character_base (string)– category_base (string)– name_base (string)– department_base (string)– organization_base (string)– locality_base (string)– district_base (string)– county_base (string)– postal_code_base (string)– region_base (string)– country_base (string) |
connections_home_pageobject | Properties: – page_id (int) |
connections_debugobject | Properties: – debug_messages (bool) |
connections_cptobject | Properties: – enabled (bool)– supported (string[]) |
connections_linkobject | Properties: – name (bool)– phone (bool)– organization (bool)– department (bool)– county (bool)– district (bool)– locality (bool)– region (bool)– postal_code (bool)– country (bool) |
connections_seoobject | Properties: – page_title (bool) |
connections_seo_metaobject | Properties: – page_title (bool)– page_desc (bool) |
connections_fieldset-addressobject | Properties: – repeatable (bool)– count (int)– address-types (object)— order (string[])— active (string[])— type (string[])– permit-preferred (bool)– permit-visibility (bool)– active-fields (string[])– autofill-region (bool)– autofill-country (bool)– autocomplete-country (bool)– translation (One of: english, native) |
connections_fieldset-dateobject | Properties: – repeatable (bool)– count (int)– date-types (object)— order (string[])— active (string[])— type (string[])– permit-preferred (bool)– permit-visibility (bool) |
connections_fieldset-linkobject | Properties: – repeatable (bool)– count (int)– link-types (object)— order (string[])— active (string[])— type (string[])– permit-preferred (bool)– permit-visibility (bool)– default-target (One of: new, same)– follow-link (One of: nofollow, dofollow)– permit-target (bool)– permit-follow (bool)– permit-assign (bool) |
connections_fieldset-messengerobject | Properties: – repeatable (bool)– count (int)– messenger-types (object)— order (string[])— active (string[])— type (string[]) |
connections_fieldset-phoneobject | Properties: – repeatable (bool)– count (int)– phone-types (object)— order (string[])— active (string[])— type (string[])– permit-preferred (bool)– permit-visibility (bool) |
connections_fieldset-social-networksobject | Properties: – repeatable (bool)– count (int)– shape (One of: circle, rounded, square)– color-scheme (One of: individual, global)– background-color (string [Format: hex-color])– background-color-hover (string [Format: hex-color])– foreground-color (string [Format: hex-color])– foreground-color-hover (string [Format: hex-color])– social-network-types (object)— order (string[])— active (string[])— type (string[])— icon (object)— name (string)— slug (string)— background-color (string [Format: hex-color])— background-color-hover (string [Format: hex-color])— background-transparent(bool)— foreground-color (string [Format: hex-color])— foreground-color-hover (string [Format: hex-color])– permit-preferred (bool)– permit-visibility (bool) |
connections_entry_actionsobject | Properties: – actions (object)— active (string[])— order (string[]) |
connections_list_actionsobject | Properties: – actions (object)— active (string[])— order (string[]) |
connections_display_listobject | Properties: – content_block (object)— active (string[])— order (string[]) |
connections_display_generalobject | Properties: – date_format (string) |
connections_fieldset-publishobject | Properties: – entry-type (object)— active (string[])— order (string[])– default-entry-type (One of: indvidual, organization, family)– default-publish-status (One of: public, private, unlisted) |
connections_fieldset-nameobject | Properties: – individual-name-fields (Any of: prefix, middle, suffix, organization, department)– organization-name-fields (Any of: department, contact_first_name, contact_last_name) |
connections_loginobject | Properties: – message (string)– required (int [One of: 0, 1]) |
connections_google_maps_geocoding_apiobject | Properties: – server_key (string)– browser_key (string) |
connections_geoobject | Properties: – base_country (string)– base_region (string) |
connections_search | * Needs documented. |
connections_image_largeobject | Properties: – quality (int)– width (int)– height (int)– ratio (One of: crop, fill, fit, none) |
connections_image_logoobject | Properties: – quality (int)– width (int)– height (int)– ratio (One of: crop, fill, fit, none) |
connections_image_mediumobject | Properties: – quality (int)– width (int)– height (int)– ratio (One of: crop, fill, fit, none) |
connections_image_thumbnailobject | Properties: – quality (int)– width (int)– height (int)– ratio (One of: crop, fill, fit, none) |
connections_display_singleobject | Properties: – content_block (object)— active (string[])— order (string[]) |
connections_compatibilityobject | * Needs documented. |
Endpoints
Request Setting
Query this endpoint to retrieve a specific setting record.
Arguments
Refer to the settings schema.
Example Request
fetch("https://example.com/wp-json/cn-api/v1/settings/connections_login", {
method: "get",
headers: {
Authorization: "Basic " + btoa("username:password"),
"Content-Type": "application/json",
}
})
.then((data) => data.json())
.then(console.log);Important
If you are running the example from the browser’s Console, ensure you are not currently logged in to your WordPress admin; otherwise, the example request will fail with a 401 response code.
Update Setting
Post to this endpoint to update a specific setting value.
Arguments
Refer to the settings schema.
Example Request
fetch("https://example.com/wp-json/cn-api/v1/settings/connections_login", {
method: "post",
headers: {
Authorization: "Basic " + btoa("username:password"),
"Content-Type": "application/json",
},
body: JSON.stringify({
message: "Please login to view the directory.\r\n\r\n[connections_login]",
required: 0,
}),
})
.then((data) => data.json())
.then(console.log);
Important
If you are running the example from the browser’s Console, ensure you are not currently logged in to your WordPress admin; otherwise, the example request will fail with a 401 response code.
Hooks
Actions
- No action hooks are available.
Filters
Connections_Directory/API/REST/Route/Settings/Before/Get/ValueConnections_Directory/API/REST/Route/Settings/Before/Update/Value
Examples
- No examples are available.
