Changeset 12136 for trunk/wp-includes/media.php
- Timestamp:
- 11/02/2009 02:41:35 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/media.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r12096 r12136 929 929 930 930 // After a post is saved, cache oEmbed items via AJAX 931 if ( get_option('embed_useoembed') ) 932 add_action( 'edit_form_advanced', array(&$this, 'maybe_run_ajax_cache') ); 931 add_action( 'edit_form_advanced', array(&$this, 'maybe_run_ajax_cache') ); 933 932 } 934 933 … … 1060 1059 1061 1060 // Unknown URL format. Let oEmbed have a go. 1062 if ( $post_ID && get_option('embed_useoembed')) {1061 if ( $post_ID ) { 1063 1062 1064 1063 // Check for a cached result (stored in the post meta) … … 1076 1075 1077 1076 // Use oEmbed to get the HTML 1078 $attr['discover'] = author_can( $post_ID, 'unfiltered_html' );1077 $attr['discover'] = ( get_option( 'embed_oembed_discover' ) && author_can( $post_ID, 'unfiltered_html' ) ) ? true : false; 1079 1078 $html = wp_oembed_get( $url, $attr ); 1080 1079
Note: See TracChangeset
for help on using the changeset viewer.