Methods

init()

init() : \MslsMain

Every child of MslsMain has to define a init-method

Returns

\MslsMain

has_problems()

has_problems() : bool

There is something wrong? Here comes the message.

..

Returns

bool

render()

render()

Render the options-page

subsubsub()

subsubsub() : string

Create a submenu which contains links to all blogs of the current user

Returns

string

register()

register()

Register the form-elements

language_section()

language_section()

Register the fields in the language_section

main_section()

main_section()

Register the fields in the main_section

advanced_section()

advanced_section()

Register the fields in the advanced_section

blog_language()

blog_language()

Shows the select-form-field 'blog_language'

admin_language()

admin_language()

Shows the select-form-field 'admin_language'

display()

display()

Shows the select-form-field 'display'

reference_user()

reference_user()

Shows the select-form-field 'reference_user'

activate_autocomplete()

activate_autocomplete()

Activate autocomplete

You can decide if you want to activate the experimental autocomplete input fields in the backend instead of the traditional select-menus.

sort_by_description()

sort_by_description()

Show sort_by_description-field

You can decide that the ouput will be sorted by the description. If not the output will be sorted by the language-code.

exclude_current_blog()

exclude_current_blog()

Exclude the current blog

You can exclude a blog explicitly. All your settings will be safe but the plugin will ignore this blog while this option is active.

only_with_translation()

only_with_translation()

Show only a link if a translation is available

Some user requested this feature. Shows only links to available translations.

output_current_blog()

output_current_blog()

Show a link to the current blog

Some user requested this feature. If active the plugin will place also a link to the current blog.

description()

description()

The description for the current blog

The language will be used ff there is no description.

before_output()

before_output()

A String which will be placed before the output of the list

after_output()

after_output()

A String which will be placed after the output of the list

before_item()

before_item()

A String which will be placed before every item of the list

after_item()

after_item()

A String which will be placed after every item of the list

content_filter()

content_filter()

The output can be placed after the_content

content_priority()

content_priority()

If the output in the_content is active you can set the priority too

Default is 10. But may be there are other plugins active and you run into trouble. So you can decide a higher (from 1) or a lower (to 100) priority for the output

image_url()

image_url()

Alternative image-url

render_checkbox()

render_checkbox(string $key) : string

Render form-element (checkbox)

Parameters

string $key

Name and ID of the form-element

Returns

string

render_input()

render_input(string $key, string $size) : string

Render form-element (text-input)

Parameters

string $key

Name and ID of the form-element

string $size

Size-attribute of the input-field

Returns

string

render_select()

render_select(string $key, array $arr, string $selected) : string

Render form-element (select)

Parameters

string $key

Name and ID of the form-element

array $arr

Options as associative array

string $selected

Values which should be selected

Returns

string

validate()

validate(array $arr) : array

Validates input before saving it

Parameters

array $arr

Values of the submitted form

Returns

array —

Validated input

set_blog_language()

set_blog_language(array $arr) : array

Filter which sets the global blog language

Parameters

array $arr

Returns

array

get_input_array()

get_input_array(int $object_id) : array

Get the input array

Parameters

int $object_id

Returns

array

is_autosave()

is_autosave(int $post_id) : bool

Checks if the current input comes from the autosave-functionality

Parameters

int $post_id

Returns

bool

verify_nonce()

verify_nonce() : boolean

Checks for the nonce in the INPUT_POST

Returns

boolean

delete()

delete(int $object_id)

Delete

Parameters

int $object_id

save()

save(int $object_id, string $class)

Save

Parameters

int $object_id
string $class