[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Widget API: WP_Widget_Media_Video class

File Size: 256 lines (8 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.

since: 4.8.0

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

since: 4.8.0
return: array Schema for properties.

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

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

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

since: 4.8.0

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

since: 4.8.0

render_control_template_scripts()   X-Ref
Render form template scripts.

since: 4.8.0



Generated: Sun Nov 10 01:00:03 2024 Cross-referenced by PHPXref 0.7.1