wpseek.com
				Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
			add_ping › WordPress Function
Seit1.5.0
Veraltetn/v
› add_ping ( $post, $uri )
| Parameter: (2) | 
 | 
| Gibt zurück: | 
 | 
| Definiert in: | 
 | 
| Codex: | |
| Changelog: | 
 | 
Adds a URL to those already pinged.
Quellcode
function add_ping( $post, $uri ) {
	global $wpdb;
	$post = get_post( $post );
	if ( ! $post ) {
		return false;
	}
	$pung = trim( $post->pinged );
	$pung = preg_split( '/\s/', $pung );
	if ( is_array( $uri ) ) {
		$pung = array_merge( $pung, $uri );
	} else {
		$pung[] = $uri;
	}
	$new = implode( "\n", $pung );
	/**
	 * Filters the new ping URL to add for the given post.
	 *
	 * @since 2.0.0
	 *
	 * @param string $new New ping URL to add.
	 */
	$new = apply_filters( 'add_ping', $new );
	$return = $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post->ID ) );
	clean_post_cache( $post->ID );
	return $return;
}