trackback [ WordPress Function ]
trackback ( $trackback_url, $title, $excerpt, $ID )
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Send a Trackback.
Updates database when sending trackback to prevent duplicates.
Source
<?php
function trackback($trackback_url, $title, $excerpt, $ID) {
global $wpdb;
if ( empty($trackback_url) )
return;
$options = array();
$options['timeout'] = 4;
$options['body'] = array(
'title' => $title,
'url' => get_permalink($ID),
'blog_name' => get_option('blogname'),
'excerpt' => $excerpt
);
$response = wp_remote_post($trackback_url, $options);
if ( is_wp_error( $response ) )
return;
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', %s) WHERE ID = %d", $trackback_url, $ID) );
return $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $trackback_url, $ID) );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Trackback - Wikipedia, the free encyclopedia
A trackback is one of three types of linkback methods for website authors to request notification when somebody links to one of their documents. This enables ...
en.wikipedia.org - How Trackback Works
Many people are confused about what exactly TrackBack is and how you use it. Here's a little explanation with pictures to help you understand. So let's say I'm ...
www.cruftbox.com - WordPress Trackback Tutorial
When used properly, trackbacks and pingbacks are an excellent way to build links and traffic to your blog, as well as building relationships with other bloggers.
www.optiniche.com - Blog Trackback - What is a Blog Trackback
Learn what a blog trackback is and how it can help you market your blog and increase traffic to your blog.
weblogs.about.com
Kullanýcý Tartýþmalarý [ wordpress.org ]
- illegalprelude on "Website traffic has tanked. Is it technical?"
- Daniel Haim on "Website traffic has tanked. Is it technical?"
- illegalprelude on "Website traffic has tanked. Is it technical?"
- earringsfavor on "How to watch trackbacks and pingbacks?"
- wizardcorpse on "Pingback problem"
- randyvdw on "Trackbacks Showing Blog Name Instead of Post Title"
- egorpromo on "How to watch trackbacks and pingbacks?"
- sumonahmed7530 on "How to watch trackbacks and pingbacks?"
- egorpromo on "How to watch trackbacks and pingbacks?"
- AnnaLM on "Changing the font size of a trackback URL."