PHP Class EP_Config

Afficher le fichier Open project: 10up/elasticpress Class Usage Examples

Méthodes publiques

Свойство Type Description
$option_host boolean True if EP_HOST has been set via option or false.

Méthodes publiques

Méthode Description
factory ( ) : EP_Config Get a singleton instance of the class
get_host ( ) : string | boolean Retrieve the appropriate host. Will default to EP_HOST constant if it exists
get_index_name ( integer $blog_id = null ) : string Generates the index name for the current site
get_indexable_post_status ( ) : array Return indexable post_status for the current site
get_indexable_post_types ( ) : mixed | void Returns indexable post types for the current site
get_network_alias ( ) : string Generate network index name for alias
host_by_option ( ) : boolean Determine if host is set in options rather than a constant
is_indexing ( ) : boolean Determine if ElasticPress is in the middle of an index
is_indexing_wpcli ( ) : boolean Check if wpcli indexing is occuring
is_network ( string $plugin ) : boolean Whether plugin is network activated

Method Details

factory() public static méthode

Get a singleton instance of the class
Since: 0.1.0
public static factory ( ) : EP_Config
Résultat EP_Config

get_host() public méthode

Retrieve the appropriate host. Will default to EP_HOST constant if it exists
Since: 2.1
public get_host ( ) : string | boolean
Résultat string | boolean

get_index_name() public méthode

Generates the index name for the current site
Since: 0.9
public get_index_name ( integer $blog_id = null ) : string
$blog_id integer (optional) Blog ID. Defaults to current blog.
Résultat string

get_indexable_post_status() public méthode

Return indexable post_status for the current site
Since: 1.3
public get_indexable_post_status ( ) : array
Résultat array

get_indexable_post_types() public méthode

Returns indexable post types for the current site
Since: 0.9
public get_indexable_post_types ( ) : mixed | void
Résultat mixed | void

get_network_alias() public méthode

Generate network index name for alias
Since: 0.9
public get_network_alias ( ) : string
Résultat string

host_by_option() public méthode

Determine if host is set in options rather than a constant
Since: 2.1
public host_by_option ( ) : boolean
Résultat boolean

is_indexing() public méthode

Determine if ElasticPress is in the middle of an index
Since: 2.1
public is_indexing ( ) : boolean
Résultat boolean

is_indexing_wpcli() public méthode

Check if wpcli indexing is occuring
Since: 2.1
public is_indexing_wpcli ( ) : boolean
Résultat boolean

is_network() public méthode

Determines whether plugin is network activated or just on the local site.
Since: 1.8
public is_network ( string $plugin ) : boolean
$plugin string the plugin base name.
Résultat boolean True if network activated or false

Property Details

$option_host public_oe property

True if EP_HOST has been set via option or false.
Since: 1.8
public bool $option_host
Résultat boolean