[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Widget API: WP_Widget_Text class
File Size: | 578 lines (21 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Widget_Text:: (11 methods):
__construct()
_register_one()
is_legacy_instance()
_filter_gallery_shortcode_attrs()
widget()
inject_video_max_width_style()
update()
enqueue_preview_scripts()
enqueue_admin_scripts()
form()
render_control_template_scripts()
Class: WP_Widget_Text - X-Ref
Core class used to implement a Text widget.__construct() X-Ref |
Sets up a new Text widget instance. |
_register_one( $number = -1 ) X-Ref |
Adds hooks for enqueueing assets when registering all widget instances of this widget class. param: int $number Optional. The unique order number of this widget instance |
is_legacy_instance( $instance ) X-Ref |
Determines whether a given instance is legacy and should bypass using TinyMCE. param: array $instance { return: bool Whether Text widget instance contains legacy data. |
_filter_gallery_shortcode_attrs( $attrs ) X-Ref |
Filters gallery shortcode attributes. Prevents all of a site's attachments from being shown in a gallery displayed on a non-singular template where a $post context is not available. param: array $attrs Attributes. return: array Attributes. |
widget( $args, $instance ) X-Ref |
Outputs the content for the current Text widget instance. param: array $args Display arguments including 'before_title', 'after_title', param: array $instance Settings for the current Text widget instance. |
inject_video_max_width_style( $matches ) X-Ref |
Injects max-width and removes height for videos too constrained to fit inside sidebars on frontend. param: array $matches Pattern matches from preg_replace_callback. return: string HTML Output. |
update( $new_instance, $old_instance ) X-Ref |
Handles updating settings for the current Text widget instance. param: array $new_instance New settings for this instance as input by the user via param: array $old_instance Old settings for this instance. return: array Settings to save or bool false to cancel saving. |
enqueue_preview_scripts() X-Ref |
Enqueues preview scripts. These scripts normally are enqueued just-in-time when a playlist shortcode is used. However, in the customizer, a playlist shortcode may be used in a text widget and dynamically added via selective refresh, so it is important to unconditionally enqueue them. |
enqueue_admin_scripts() X-Ref |
Loads the required scripts and styles for the widget control. |
form( $instance ) X-Ref |
Outputs the Text widget settings form. param: array $instance Current settings. |
render_control_template_scripts() X-Ref |
Renders form template scripts. |
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |