Class MLA (Media Library Assistant) Text Widget defines a shortcode-enabled version of the WordPress Text widget

package Media Library Assistant
since 1.60

 Methods

Calls the parent constructor to set some defaults.

__construct() : void

since 1.60

Echo the "edit widget" form on the Appearance/Widgets admin screen

form(array $instance) : void

since 1.60

Parameters

$instance

array

Previous definition values, from the database

Register the widget with WordPress

mla_text_widget_widgets_init_action() : void

Defined as public because it's an action.

since 1.60

Sanitize widget definition as it is saved to the database

update(array $new_instance, array $old_instance) : array

since 1.60

Parameters

$new_instance

array

Current definition values, to be saved in the database

$old_instance

array

Previous definition values, from the database

Returns

arrayUpdated definition values to be saved in the database

Display the widget content - called from the WordPress "front end"

widget(array $args, array $instance) : void

since 1.60

Parameters

$args

array

Widget arguments

$instance

array

Widget definition, from the database