[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/widgets/ -> class-wp-widget-custom-html.php (summary)

Widget API: WP_Widget_Custom_HTML class

File Size: 343 lines (12 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Widget_Custom_HTML:: (9 methods):
  __construct()
  _register_one()
  _filter_gallery_shortcode_attrs()
  widget()
  update()
  enqueue_admin_scripts()
  form()
  render_control_template_scripts()
  add_help_text()


Class: WP_Widget_Custom_HTML  - X-Ref

Core class used to implement a Custom HTML widget.

__construct()   X-Ref
Sets up a new Custom HTML widget instance.


_register_one( $number = -1 )   X-Ref
Add 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

_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 Custom HTML widget instance.

param: array $args     Display arguments including 'before_title', 'after_title',
param: array $instance Settings for the current Custom HTML widget instance.

update( $new_instance, $old_instance )   X-Ref
Handles updating settings for the current Custom HTML 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_admin_scripts()   X-Ref
Loads the required scripts and styles for the widget control.


form( $instance )   X-Ref
Outputs the Custom HTML widget settings form.

param: array $instance Current instance.

render_control_template_scripts()   X-Ref
Render form template scripts.


add_help_text()   X-Ref
Add help text to widgets admin screen.




Generated : Mon Mar 18 08:20:01 2024 Cross-referenced by PHPXref