Summery Summery
Returns a WP_Image_Editor instance and loads file into it.
Syntax Syntax
Parameters Parameters
- $path
-
(Required) Path to the file to load.
- $args
-
(Optional) Additional arguments for retrieving the image editor.
Default value: array()
Return Return
(WP_Image_Editor|WP_Error) The WP_Image_Editor object if successful, an WP_Error object otherwise.
Source Source
File: wp-includes/media.php
$html .= sprintf( $source, $type['type'], esc_url( $url ) ); } } if ( ! empty( $content ) ) { if ( false !== strpos( $content, "\n" ) ) { $content = str_replace( array( "\r\n", "\n", "\t" ), '', $content ); } $html .= trim( $content ); } if ( 'mediaelement' === $library ) { $html .= wp_mediaelement_fallback( $fileurl ); } $html .= '</video>'; $width_rule = ''; if ( ! empty( $atts['width'] ) ) { $width_rule = sprintf( 'width: %dpx;', $atts['width'] ); } $output = sprintf( '<div style="%s" class="wp-video">%s</div>', $width_rule, $html ); /** * Filters the output of the video shortcode. * * @since 3.6.0 * * @param string $output Video shortcode HTML output.
Advertisement
Changelog Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |