Changeset 2743
- Timestamp:
- 08/03/05 00:40:42 (3 years ago)
- Files:
-
- trunk/wp-includes/comment-functions.php (modified) (1 diff)
- trunk/wp-includes/functions-post.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/comment-functions.php
r2699 r2743 448 448 elseif(($test['path'] != '/') && ($test['path'] != '')) 449 449 $post_links[] = $link_test; 450 do_action('pre_ping', &$post_links, &$pung); 450 451 endif; 451 452 endforeach; trunk/wp-includes/functions-post.php
r2713 r2743 582 582 $pung = trim($pung); 583 583 $pung = preg_split('/\s/', $pung); 584 $pung = apply_filters('get_pung', $pung); 584 585 return $pung; 585 586 } … … 589 590 $custom_fields = get_post_custom( $post_id ); 590 591 $pung = array(); 591 if ( is_array( $custom_fields ) ) {592 while( list( $key, $val ) = each( $custom_fields ) ) {593 if( $key == 'enclosure' ) { 594 if (is_array($val)) {595 foreach($val as $enc) {596 $enclosure = split( "\n", $enc );597 $pung[] = trim( $enclosure[ 0 ] );598 }599 }600 }601 }602 }592 if ( !is_array( $custom_fields ) ) 593 return $pung; 594 595 foreach ( $custom_fields as $key => $val ) { 596 if ( 'enclosure' != $key || !is_array( $val ) ) 597 continue; 598 foreach( $val as $enc ) { 599 $enclosure = split( "\n", $enc ); 600 $pung[] = trim( $enclosure[ 0 ] ); 601 } 602 } 603 $pung = apply_filters('get_enclosed', $pung); 603 604 return $pung; 604 605 } … … 609 610 $to_ping = trim($to_ping); 610 611 $to_ping = preg_split('/\s/', $to_ping, -1, PREG_SPLIT_NO_EMPTY); 612 $to_ping = apply_filters('get_to_ping', $to_ping); 611 613 return $to_ping; 612 614 } … … 619 621 $pung[] = $uri; 620 622 $new = implode("\n", $pung); 623 $new = apply_filters('add_ping', $new); 621 624 return $wpdb->query("UPDATE $wpdb->posts SET pinged = '$new' WHERE ID = $post_id"); 622 625 }
