WordPress API SDK

Settings
in package

WordPress Settings Resource

Note: Some settings require authentication to read. Public settings are available without authentication.

Table of Contents

Properties

$cache  : array<string, mixed>|null
$client  : Client
$endpoint  : string

Methods

__construct()  : mixed
all()  : array<string, mixed>
Get all WordPress settings
getDateFormat()  : string|null
Get date format
getDescription()  : string|null
Get site description/tagline
getEmail()  : string|null
Get site email
getFrontPageId()  : int
Get front page ID
getLanguage()  : string|null
Get site language
getPermalinkStructure()  : string
Get permalink structure
getPostsPageId()  : int
Get posts page ID
getPostsPerPage()  : int|null
Get posts per page setting
getShowOnFront()  : string
Get what's shown on the front page
getTimeFormat()  : string|null
Get time format
getTimezone()  : string|null
Get timezone string
getTitle()  : string|null
Get site title
getUrl()  : string|null
Get site URL
hasStaticFrontPage()  : bool
Check if a static page is set as front page
usesDefaultPermalinks()  : bool
Check if site uses default permalink structure

Properties

$cache

private array<string, mixed>|null $cache = null

Memoized settings for this instance

Methods

__construct()

public __construct(Client $client, string $baseUrl) : mixed
Parameters
$client : Client
$baseUrl : string

getDateFormat()

Get date format

public getDateFormat() : string|null
Return values
string|null

getDescription()

Get site description/tagline

public getDescription() : string|null
Return values
string|null

getEmail()

Get site email

public getEmail() : string|null
Return values
string|null

getFrontPageId()

Get front page ID

public getFrontPageId() : int

Returns the page ID set as the front page. Returns 0 if posts are shown on front page.

Return values
int

getLanguage()

Get site language

public getLanguage() : string|null
Return values
string|null

getPermalinkStructure()

Get permalink structure

public getPermalinkStructure() : string
Return values
string

getPostsPageId()

Get posts page ID

public getPostsPageId() : int

Returns the page ID set as the posts page. Returns 0 if no specific page is set.

Return values
int

getPostsPerPage()

Get posts per page setting

public getPostsPerPage() : int|null
Return values
int|null

getShowOnFront()

Get what's shown on the front page

public getShowOnFront() : string

Returns 'posts' or 'page'

Return values
string

getTimeFormat()

Get time format

public getTimeFormat() : string|null
Return values
string|null

getTimezone()

Get timezone string

public getTimezone() : string|null
Return values
string|null

getTitle()

Get site title

public getTitle() : string|null
Return values
string|null

getUrl()

Get site URL

public getUrl() : string|null
Return values
string|null

hasStaticFrontPage()

Check if a static page is set as front page

public hasStaticFrontPage() : bool
Return values
bool

Check if site uses default permalink structure

public usesDefaultPermalinks() : bool
Return values
bool
On this page

Search results