[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Widget API: WP_Widget_Custom_HTML class

File Size: 339 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.

since: 4.8.1

_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
since: 4.9.0

_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.

return: array Attributes.
param: array $attrs Attributes.
since: 4.9.0

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.
since: 4.8.1

update( $new_instance, $old_instance )   X-Ref
Handles updating settings for the current Custom HTML widget instance.

return: array Settings to save or bool false to cancel saving.
param: array $new_instance New settings for this instance as input by the user via
param: array $old_instance Old settings for this instance.
since: 4.8.1

enqueue_admin_scripts()   X-Ref
Loads the required scripts and styles for the widget control.

since: 4.9.0

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

param: array $instance Current instance.
since: 4.8.1
since: 4.9.0 The form contains only hidden sync inputs. For the control UI, see `WP_Widget_Custom_HTML::render_control_template_scripts()`.

render_control_template_scripts()   X-Ref
Render form template scripts.

since: 4.9.0

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

since: 4.9.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1