\lloc\MslsMslsPlugin

Provides functionalities for general hooks and activation/deactivation

Summary

Methods
Properties
Constants
__construct()
init()
get_output()
print_alternate_links()
content_filter()
filter_string()
block_init()
admin_menu()
init_widget()
block_render()
init_i18n_support()
message_handler()
activate()
uninstall()
cleanup()
get_superglobals()
No public properties found
No constants found
No protected methods found
$options
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct(\lloc\Msls\MslsOptions  $options) 

MslsPlugin constructor.

Parameters

\lloc\Msls\MslsOptions $options

print_alternate_links()

print_alternate_links() 

Callback for action wp_head

content_filter()

content_filter(string  $content) : string

Filter for the_content()

Parameters

string $content

Returns

string

filter_string()

filter_string(string  $pref = '<p id="msls">', string  $post = '</p>') : string

Create filterstring for msls_content_filter()

Parameters

string $pref
string $post

Returns

string

block_init()

block_init() 

Register block and shortcode.

admin_menu()

admin_menu() : boolean

Loads styles and some js if needed

The methiod returns true if JS is loaded or false if not

Returns

boolean

init_widget()

init_widget() : boolean

Register widget

The widget will only be registered if the current blog is not excluded in the configuration of the plugin.

Returns

boolean

block_render()

block_render() : string

Render widget output

Returns

string

init_i18n_support()

init_i18n_support() : boolean

Load textdomain

The method should be executed always on init because we have some translatable string in the frontend too.

Returns

boolean

message_handler()

message_handler(string  $message, string  $css_class = 'error') : boolean

Message handler

Prints a message box to the screen.

Parameters

string $message
string $css_class

Returns

boolean

activate()

activate() 

Activate plugin

uninstall()

uninstall() : boolean

Uninstall plugin

The plugin data in all blogs of the current network will be deleted after the uninstall procedure.

Returns

boolean

cleanup()

cleanup() : boolean

Cleanup the options

Removes all values of the current blogs which are stored in the options-table and returns true if it was successful.

Returns

boolean

get_superglobals()

get_superglobals(array  $list) : array

Get specific vars from $_POST and $_GET in a safe way

Parameters

array $list

Returns

array