Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: add_ping

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1648  * @return mixed {@internal Missing Description}}
1649  */
1650 function add_ping($post_id, $uri) {
1651      global $wpdb;
1652      $pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id ));
1653      $pung = trim($pung);
1654      $pung = preg_split('/\s/', $pung);
1655      $pung[] = $uri;
1656      $new = implode("\n", $pung);
1657      $new = apply_filters('add_ping', $new);
1658      // expected_slashed ($new)
1659      $new = stripslashes($new);
1660      return $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post_id ) );
1661 }
1662
1663 /**
1664  * get_enclosed() - Get enclosures already enclosed for a post
1665  *
1666  * {@internal Missing Long Description}}