[ Index ] |
WordPress Cross Reference |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 323 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Embed:: (11 methods):
__construct()
run_shortcode()
maybe_run_ajax_cache()
register_handler()
unregister_handler()
shortcode()
delete_oembed_caches()
cache_oembed()
autoembed()
autoembed_callback()
maybe_make_link()
__construct() X-Ref |
Constructor |
run_shortcode( $content ) X-Ref |
Process the [embed] shortcode. Since the [embed] shortcode needs to be run earlier than other shortcodes, this function removes all existing shortcodes, registers the [embed] shortcode, calls {@link do_shortcode()}, and then re-registers the old shortcodes. param: string $content Content to parse return: string Content with shortcode parsed |
maybe_run_ajax_cache() X-Ref |
If a post/page was saved, then output JavaScript to make an AJAX request that will call WP_Embed::cache_oembed(). |
register_handler( $id, $regex, $callback, $priority = 10 ) X-Ref |
Register an embed handler. Do not use this function directly, use {@link wp_embed_register_handler()} instead. This function should probably also only be used for sites that do not support oEmbed. param: string $id An internal ID/name for the handler. Needs to be unique. param: string $regex The regex that will be used to see if this handler should be used for a URL. param: callback $callback The callback function that will be called if the regex is matched. param: int $priority Optional. Used to specify the order in which the registered handlers will be tested (default: 10). Lower numbers correspond with earlier testing, and handlers with the same priority are tested in the order in which they were added to the action. |
unregister_handler( $id, $priority = 10 ) X-Ref |
Unregister a previously registered embed handler. Do not use this function directly, use {@link wp_embed_unregister_handler()} instead. param: string $id The handler ID that should be removed. param: int $priority Optional. The priority of the handler to be removed (default: 10). |
shortcode( $attr, $url = '' ) X-Ref |
The {@link do_shortcode()} callback function. Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of the registered embed handlers. If none of the regex matches and it's enabled, then the URL will be given to the {@link WP_oEmbed} class. param: array $attr Shortcode attributes. param: string $url The URL attempting to be embedded. return: string The embed HTML on success, otherwise the original URL. |
delete_oembed_caches( $post_ID ) X-Ref |
Delete all oEmbed caches. param: int $post_ID Post ID to delete the caches for. |
cache_oembed( $post_ID ) X-Ref |
Triggers a caching of all oEmbed results. param: int $post_ID Post ID to do the caching for. |
autoembed( $content ) X-Ref |
Passes any unlinked URLs that are on their own line to {@link WP_Embed::shortcode()} for potential embedding. param: string $content The content to be searched. return: string Potentially modified $content. |
autoembed_callback( $match ) X-Ref |
Callback function for {@link WP_Embed::autoembed()}. param: array $match A regex match array. return: string The embed HTML on success, otherwise the original URL. |
maybe_make_link( $url ) X-Ref |
Conditionally makes a hyperlink based on an internal class variable. param: string $url URL to potentially be linked. return: string Linked URL or the original URL. |
Generated: Tue Mar 25 01:41:18 2014 | WordPress honlapkészítés: online1.hu |