PHP Class Timber\Site

Inheritance: extends Core, implements Timber\CoreInterface
Afficher le fichier Open project: jarednova/timber Class Usage Examples

Méthodes publiques

Свойство Type Description
$admin_email the admin email address set in the WP admin panel
$atom
$blogname
$charset string
$description string
$id the ID of a site in multisite
$language the language setting ex: en-US
$language_attributes of language attributes for usage in the tag
$multisite true if multisite, false if plain ole' WordPress
$name string
$pingback_url for people who like trackback spam
$rdf string
$rss
$rss2
$siteurl
$theme [TimberTheme](#TimberTheme)
$title string
$url

Méthodes publiques

Méthode Description
__construct ( string | integer $site_name_or_id = null ) Constructs a TimberSite object
__get ( string $field ) : mixed
get_link ( ) : string
get_url ( ) : string
icon ( )
link ( ) : string Returns the link to the site's home.
meta ( $field )
update ( string $key, mixed $value )
url ( ) : string

Méthodes protégées

Méthode Description
icon_multisite ( $site_id )
init ( ) Executed for all types of sites: both multisite and "regular"
init_as_multisite ( integer $site_id )
init_as_singlesite ( ) Executed for single-blog sites
switch_to_blog ( string | integer | null $site_name_or_id ) : integer Switches to the blog requested in the request

Method Details

__construct() public méthode

Constructs a TimberSite object
public __construct ( string | integer $site_name_or_id = null )
$site_name_or_id string | integer

__get() public méthode

public __get ( string $field ) : mixed
$field string
Résultat mixed

get_url() public méthode

Deprecation: 0.21.9
public get_url ( ) : string
Résultat string

icon() public méthode

public icon ( )

icon_multisite() protected méthode

protected icon_multisite ( $site_id )

init() protected méthode

Executed for all types of sites: both multisite and "regular"
protected init ( )

init_as_multisite() protected méthode

protected init_as_multisite ( integer $site_id )
$site_id integer

init_as_singlesite() protected méthode

Executed for single-blog sites
protected init_as_singlesite ( )

meta() public méthode

public meta ( $field )

switch_to_blog() protected static méthode

Switches to the blog requested in the request
protected static switch_to_blog ( string | integer | null $site_name_or_id ) : integer
$site_name_or_id string | integer | null
Résultat integer with the ID of the new blog

update() public méthode

public update ( string $key, mixed $value )
$key string
$value mixed

url() public méthode

See also: TimberSite::link
Deprecation: 1.0.4
public url ( ) : string
Résultat string

Property Details

$admin_email public_oe property

the admin email address set in the WP admin panel
public $admin_email

$atom public_oe property

public $atom

$blogname public_oe property

public $blogname

$charset public_oe property

public string $charset
Résultat string

$description public_oe property

public string $description
Résultat string

$id public_oe property

the ID of a site in multisite
public $id

$language public_oe property

the language setting ex: en-US
public $language

$language_attributes public_oe property

of language attributes for usage in the tag
public $language_attributes

$multisite public_oe property

true if multisite, false if plain ole' WordPress
public $multisite

$name public_oe property

public string $name
Résultat string

$pingback_url public_oe property

for people who like trackback spam
public $pingback_url

$rdf public_oe property

public string $rdf
Résultat string

$rss public_oe property

public $rss

$rss2 public_oe property

public $rss2

$siteurl public_oe property

public $siteurl

$theme public_oe property

public [TimberTheme](#TimberTheme) $theme
Résultat [TimberTheme](#TimberTheme)

$title public_oe property

public string $title
Résultat string

$url public_oe property

public $url