wphooks.info - embed_oembed_discover

embed_oembed_discover

The hook occurs in the following file:

wp-includes/class-wp-embed.php:
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
			/**
			 * Filters whether to inspect the given URL for discoverable link tags.
			 *
			 * @since 2.9.0
			 * @since 4.4.0 The default value changed to true.
			 *
			 * @see WP_oEmbed::discover()
			 *
			 * @param bool $enable Whether to enable `<link>` tag discovery. Default true.
			 */
			$attr['discover'] = ( apply_filters( 'embed_oembed_discover', true ) );

			// Use oEmbed to get the HTML
			$html = wp_oembed_get( $url, $attr );

			// Maybe cache the result
			if ( $html ) {
				update_post_meta( $post_ID, $cachekey, $html );
				update_post_meta( $post_ID, $cachekey_time, time() );
			} elseif ( ! $cache ) {