Settings
in package
WordPress Settings Resource
Note: Some settings require authentication to read. Public settings are available without authentication.
Table of Contents
Properties
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
$client
private
Client
$client
$endpoint
private
string
$endpoint
Methods
__construct()
public
__construct(Client $client, string $baseUrl) : mixed
Parameters
- $client : Client
- $baseUrl : string
all()
Get all WordPress settings
public
all() : array<string, mixed>
Note: Requires authentication for most settings. Some basic settings may be publicly available.
Tags
Return values
array<string, mixed>getDateFormat()
Get date format
public
getDateFormat() : string|null
Return values
string|nullgetDescription()
Get site description/tagline
public
getDescription() : string|null
Return values
string|nullgetEmail()
Get site email
public
getEmail() : string|null
Return values
string|nullgetFrontPageId()
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
intgetLanguage()
Get site language
public
getLanguage() : string|null
Return values
string|nullgetPermalinkStructure()
Get permalink structure
public
getPermalinkStructure() : string
Return values
stringgetPostsPageId()
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
intgetPostsPerPage()
Get posts per page setting
public
getPostsPerPage() : int|null
Return values
int|nullgetShowOnFront()
Get what's shown on the front page
public
getShowOnFront() : string
Returns 'posts' or 'page'
Return values
stringgetTimeFormat()
Get time format
public
getTimeFormat() : string|null
Return values
string|nullgetTimezone()
Get timezone string
public
getTimezone() : string|null
Return values
string|nullgetTitle()
Get site title
public
getTitle() : string|null
Return values
string|nullgetUrl()
Get site URL
public
getUrl() : string|null
Return values
string|nullhasStaticFrontPage()
Check if a static page is set as front page
public
hasStaticFrontPage() : bool
Return values
boolusesDefaultPermalinks()
Check if site uses default permalink structure
public
usesDefaultPermalinks() : bool