WPDev.one
Core Class

WP_Widget_Text

class WP_Widget_Text // Constructor: function Object() { [native code] }

Core class used to implement a Text widget.

Methods 11 methods

Method / Return Description
__construct()
void

Sets up a new Text widget instance.

_register_one()
void

Adds hooks for enqueueing assets when registering all widget instances of this widget class.

Parameters: $number: mixed
is_legacy_instance()
bool

Determines whether a given instance is legacy and should bypass using TinyMCE.

Parameters: $instance: mixed
_filter_gallery_shortcode_attrs()
array

Filters gallery shortcode attributes.

Parameters: $attrs: mixed
widget()
void

Outputs the content for the current Text widget instance.

Parameters: $args: mixed, $instance: mixed
inject_video_max_width_style()
string

Injects max-width and removes height for videos too constrained to fit inside sidebars on frontend.

Parameters: $matches: mixed
update()
array

Handles updating settings for the current Text widget instance.

Parameters: $new_instance: mixed, $old_instance: mixed
enqueue_preview_scripts()
void

Enqueues preview scripts.

enqueue_admin_scripts()
void

Loads the required scripts and styles for the widget control.

form()
void

Outputs the Text widget settings form.

Parameters: $instance: mixed
render_control_template_scripts()
void

Renders form template scripts.

Properties

Property / Type Description
$registered
mixed
public
No description available.

Class Information

Since Version
2.8.0
Source File
wp-includes/widgets/class-wp-widget-text.php
Advertisement