add_ping [ WordPress Function ]
add_ping ( $post_id, $uri )
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Add a URL to those already pung.
Source
<?php
function add_ping($post_id, $uri) {
global $wpdb;
$pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id ));
$pung = trim($pung);
$pung = preg_split('/\s/', $pung);
$pung[] = $uri;
$new = implode("\n", $pung);
$new = apply_filters('add_ping', $new);
// expected_slashed ($new)
$new = stripslashes($new);
return $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post_id ) );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/add ping « WordPress Codex
Description. Add a URL to those already pung. Usage. <?php add_ping( $ post_id, $uri ) ?> Parameters. $post_id: (integer) (required) Post ID. Default: None ...
codex.wordpress.org - add_ping Wordpress hook details -- Adam Brown, BYU Political ...
add_ping. Description. Applied to the new value of the pinged field on a post when a ping is added, prior to saving the new information in the database.
adambrown.info - add_ping() WordPress function reference, arguments and source at ...
Add a URL to those already pung. Signature. add_ping( $post_id, $uri ). post_id: (int) Post ID. uri: (string) Ping URI. Return. (int) How many rows were updated.
queryposts.com - Microsoft to add 'Ping' to Bing to share search results | Applications ...
Sep 8, 2009 ... New feature would allow people to post search results from Bing directly on social networks Facebook and Twitter.
www.infoworld.com