do_trackbacks [ WordPress Function ]
do_trackbacks ( $post_id )
| Parameters: |
|
| Uses: |
|
| Defined at: |
|
Perform trackbacks.
Source
<?php
function do_trackbacks($post_id) {
global $wpdb;
$post = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id) );
$to_ping = get_to_ping($post_id);
$pinged = get_pung($post_id);
if ( empty($to_ping) ) {
$wpdb->update($wpdb->posts, array('to_ping' => ''), array('ID' => $post_id) );
return;
}
if ( empty($post->post_excerpt) )
$excerpt = apply_filters('the_content', $post->post_content);
else
$excerpt = apply_filters('the_excerpt', $post->post_excerpt);
$excerpt = str_replace(']]>', ']]>', $excerpt);
$excerpt = wp_html_excerpt($excerpt, 252) . '...';
$post_title = apply_filters('the_title', $post->post_title, $post->ID);
$post_title = strip_tags($post_title);
if ( $to_ping ) {
foreach ( (array) $to_ping as $tb_ping ) {
$tb_ping = trim($tb_ping);
if ( !in_array($tb_ping, $pinged) ) {
trackback($tb_ping, $post_title, $excerpt, $post_id);
$pinged[] = $tb_ping;
} else {
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id) );
}
}
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- SQL injection vulnerability in do_trackbacks() Wordpress function
Dec 5, 2010 ... Description: SQL injection vulnerability in do_trackbacks() function of WordPress allows remote attackers to execute arbitrary SELECT SQL ...
www.exploit-db.com - Function Reference/do trackbacks « WordPress Codex
Function Reference/do trackbacks ... <?php do_trackbacks( $post_id ) ?> Parameters. $post_id: (integer) (required) Post ID to do trackbacks on. Default: None ...
codex.wordpress.org - do_trackbacks | A HitchHackers guide through WordPress
Feb 11, 2011 ... function do_trackbacks($post_id) { global $wpdb; $post = $wpdb->get_row( $ wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID ...
hitchhackerguide.com - WordPress 'do_trackbacks()' Function SQL Injection Vulnerability
Bugtraq ID: 45131. Class: Input Validation Error. CVE: CVE-2010-4257. Remote: Yes. Local: No. Published: Nov 30 2010 12:00AM. Updated: Jan 24 2011 05: ...
www.securityfocus.com