[ 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: 335 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.

since: 4.9.0
param: integer $number Optional. The unique order number of this widget instance

_filter_gallery_shortcode_attrs( $attrs )   X-Ref
Filter 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.
since: 4.9.0
param: array $attrs Attributes.

widget( $args, $instance )   X-Ref
Outputs the content for the current Custom HTML widget instance.

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

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

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.

returns: void
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()`.
param: array $instance Current instance.

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: Mon Sep 16 01:00:03 2019 Cross-referenced by PHPXref 0.7.1