Properties

$activate_autocomplete

$activate_autocomplete : bool

Type

bool

$display

$display : int

Type

int

$reference_user

$reference_user : int

Type

int

$content_priority

$content_priority : int

Type

int

$admin_language

$admin_language : string

Type

string

$description

$description : string

Type

string

$before_item

$before_item : string

Type

string

$after_item

$after_item : string

Type

string

$before_output

$before_output : string

Type

string

$after_output

$after_output : string

Type

string

$args

$args : array

Args

Type

array

$name

$name : string

Name

Type

string

$exists

$exists : bool

Exists

Type

bool

$sep

$sep : string

Separator

Type

string

$autoload

$autoload : string

Autoload

Type

string

$base

$base : string

Base

Type

string

$arr

$arr : array

Generic container for all properties of an instance

Type

array

$available_languages

$available_languages : array

Available languages

Type

array

Methods

create()

create(int $id) : \MslsOptions

Factory method

Parameters

int $id

Returns

\MslsOptions

is_main_page()

is_main_page() : boolean

Checks if the current page is a home, front or 404 page

Returns

boolean

is_tax_page()

is_tax_page() : boolean

Checks if the current page is a category, tag or any other tax archive

Returns

boolean

is_query_page()

is_query_page() : boolean

Checks if the current page is a date, author any other post_type archive

Returns

boolean

__construct()

__construct()

Constructor

get_arg()

get_arg(int $idx, mixed $val) : mixed

Gets an element of arg by index The returning value is casted to the type of $retval or will be the value of $retval if nothing is set at this index.

Parameters

int $idx
mixed $val

Returns

mixed

save()

save(mixed $arr)

Save

Parameters

mixed $arr

delete()

delete()

Delete

set()

set(mixed $arr) : bool

Set

Parameters

mixed $arr

Returns

bool

get_permalink()

get_permalink(string $language) : string

Get permalink

Parameters

string $language

Returns

string

get_postlink()

get_postlink(string $language) : string

Get postlink

Parameters

string $language

Returns

string

get_current_link()

get_current_link() : string

Get current link

Returns

string

is_excluded()

is_excluded() : bool

Is excluded

Returns

bool

is_content_filter()

is_content_filter() : bool

Is content

Returns

bool

get_order()

get_order() : string

Get order

Returns

string

get_url()

get_url(string $dir) : string

Get url

Parameters

string $dir

Returns

string

get_flag_url()

get_flag_url(string $language) : string

Get flag url

Parameters

string $language

Returns

string

get_available_languages()

get_available_languages() : array

Get all available languages

Returns

array

check_url()

check_url(string $url) : string

Check and correct URL

Parameters

string $url

Returns

string

instance()

instance() : \MslsOptions

Get or create an instance of MslsOptions

Returns

\MslsOptions

__set()

__set(string $key, mixed $value)

Overloads the set method.

Parameters

string $key
mixed $value

__get()

__get(string $key) : mixed

Overloads the get method.

Parameters

string $key

Returns

mixed

__isset()

__isset(string $key) : bool

Overloads the isset method.

Parameters

string $key

Returns

bool

__unset()

__unset(string $key)

Overloads the unset method.

Parameters

string $key

reset()

reset() : \MslsGetSet

Resets the properties container to an empty array.

Returns

\MslsGetSet

has_value()

has_value(string $key) : bool

Checks if the array has an non empty item with the specified key name.

This is method is similar to the overloaded __isset-method since __set cleans empty properties but I use for example

$obj->has_value( $temp )

and not

isset( $obj->$temp )

which is the same but in my opinion a little bit ugly.

Parameters

string $key

Returns

bool

is_empty()

is_empty() : bool

Checks if the properties-container is empty.

Returns

bool

get_arr()

get_arr() : array

Gets the complete properties-container as an array.

Returns

array