Changeset 42009 for trunk/src/wp-includes/class-wp-embed.php
- Timestamp:
- 10/24/2017 11:09:43 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-embed.php
r41651 r42009 285 285 } 286 286 287 wp_insert_post( wp_slash( array( 288 'post_name' => $key_suffix, 289 'post_content' => $html ? $html : '{{unknown}}', 290 'post_status' => 'publish', 291 'post_type' => 'oembed_cache', 292 ) ) ); 287 $insert_post_args = array( 288 'post_name' => $key_suffix, 289 'post_status' => 'publish', 290 'post_type' => 'oembed_cache', 291 ); 292 293 if ( $html ) { 294 if ( $cached_post_id ) { 295 wp_update_post( wp_slash( array( 296 'ID' => $cached_post_id, 297 'post_content' => $html, 298 ) ) ); 299 } else { 300 wp_insert_post( wp_slash( array_merge( 301 $insert_post_args, 302 array( 303 'post_content' => $html, 304 ) 305 ) ) ); 306 } 307 } elseif ( ! $cache ) { 308 wp_insert_post( wp_slash( array_merge( 309 $insert_post_args, 310 array( 311 'post_content' => '{{unknown}}', 312 ) 313 ) ) ); 314 } 293 315 294 316 if ( $has_kses ) {
Note: See TracChangeset
for help on using the changeset viewer.