WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
1587 | * @since 2.1.0 |
1588 | * @uses $wpdb |
1589 | */ |
1590 | function do_all_pings() { |
1591 | global $wpdb; |
1592 |
|
1593 | // Do pingbacks |
1594 | while ($ping = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) { |
1595 | $mid = $wpdb->get_var( "SELECT meta_id FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme' LIMIT 1"); |
1596 | do_action( 'delete_postmeta', $mid ); |
1597 | $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->postmeta} WHERE meta_id = %d", $mid ) ); |
1598 | do_action( 'deleted_postmeta', $mid ); |
1599 | pingback($ping->post_content, $ping->ID); |
1600 | } |
1601 |
|
1602 | // Do Enclosures |
1603 | while ($enclosure = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) { |
1604 | $mid = $wpdb->get_var( $wpdb->prepare("SELECT meta_id FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = '_encloseme'", $enclosure->ID) ); |
1605 | do_action( 'delete_postmeta', $mid ); |
1606 | $wpdb->query( $wpdb->prepare("DELETE FROM {$wpdb->postmeta} WHERE meta_id = %d", $mid) ); |
1607 | do_action( 'deleted_postmeta', $mid ); |
1608 | do_enclose($enclosure->post_content, $enclosure->ID); |
1609 | } |
1610 |
|
1611 | // Do Trackbacks |
1612 | $trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'"); |
1613 | if ( is_array($trackbacks) ) |
1614 | foreach ( $trackbacks as $trackback ) |