[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/widgets/ -> class-wp-widget-media-video.php (summary)

Widget API: WP_Widget_Media_Video class

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

Defines 1 class

WP_Widget_Media_Video:: (7 methods):
  __construct()
  get_instance_schema()
  render_media()
  inject_video_max_width_style()
  enqueue_preview_scripts()
  enqueue_admin_scripts()
  render_control_template_scripts()


Class: WP_Widget_Media_Video  - X-Ref

Core class that implements a video widget.

__construct()   X-Ref
Constructor.


get_instance_schema()   X-Ref
Get schema for properties of a widget instance (item).

return: array Schema for properties.

render_media( $instance )   X-Ref
Render the media on the frontend.

param: array $instance Widget instance props.

inject_video_max_width_style( $html )   X-Ref
Inject max-width and remove height for videos too constrained to fit inside sidebars on frontend.

param: string $html Video shortcode HTML output.
return: string HTML Output.

enqueue_preview_scripts()   X-Ref
Enqueue preview scripts.

These scripts normally are enqueued just-in-time when a video shortcode is used.
In the customizer, however, widgets can be dynamically added and rendered via
selective refresh, and so it is important to unconditionally enqueue them in
case a widget does get added.


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


render_control_template_scripts()   X-Ref
Render form template scripts.




Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref