Skip to content

Commit 90afb61

Browse files
committed
docs: fix types around wp_filter_oembed_result
1 parent 4a573a2 commit 90afb61

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/wp-includes/class-wp-oembed.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,9 @@ public function data2html( $data, $url ) {
739739
*
740740
* @since 2.9.0
741741
*
742-
* @param string $return The returned oEmbed HTML.
743-
* @param object $data A data object result from an oEmbed provider.
744-
* @param string $url The URL of the content to be embedded.
742+
* @param string|false $return The returned oEmbed HTML, or false on failure.
743+
* @param object $data A data object result from an oEmbed provider.
744+
* @param string $url The URL of the content to be embedded.
745745
*/
746746
return apply_filters( 'oembed_dataparse', $return, $data, $url );
747747
}

src/wp-includes/embed.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ function wp_oembed_ensure_format( $format ) {
765765
* @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`.
766766
* @param WP_REST_Request $request Request used to generate the response.
767767
* @param WP_REST_Server $server Server instance.
768-
* @return true
768+
* @return bool True if the request was served, false otherwise.
769769
*/
770770
function _oembed_rest_pre_serve_request( $served, $result, $request, $server ) {
771771
$params = $request->get_params();
@@ -910,10 +910,10 @@ function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) {
910910
*
911911
* @since 4.4.0
912912
*
913-
* @param string $result The oEmbed HTML result.
914-
* @param object $data A data object result from an oEmbed provider.
915-
* @param string $url The URL of the content to be embedded.
916-
* @return string The filtered and sanitized oEmbed result.
913+
* @param string|false $result The oEmbed HTML result.
914+
* @param object $data A data object result from an oEmbed provider.
915+
* @param string $url The URL of the content to be embedded.
916+
* @return string|false The filtered and sanitized oEmbed result.
917917
*/
918918
function wp_filter_oembed_result( $result, $data, $url ) {
919919
if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ), true ) ) {

0 commit comments

Comments
 (0)