Changeset 2060
- Timestamp:
- 01/06/2005 11:10:28 PM (21 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
wp-admin/import-mt.php (modified) (1 diff)
-
wp-content/plugins/hello.php (modified) (1 diff)
-
wp-includes/comment-functions.php (modified) (4 diffs)
-
xmlrpc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import-mt.php
r1578 r2060 383 383 $comment_content = str_replace('-----', '', $comment_content); 384 384 385 $comment_content = "< trackback /><strong>$ping_title</strong>\n$comment_content";385 $comment_content = "<strong>$ping_title</strong>\n\n$comment_content"; 386 386 387 387 // Check if it's already there 388 388 if (!$wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_date = '$comment_date' AND comment_content = '$comment_content'")) { 389 $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved )389 $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved, comment_type) 390 390 VALUES 391 ($post_id, '$comment_author', '$comment_email', '$comment_url', '$comment_ip', '$comment_date', '$comment_content', '1' )");391 ($post_id, '$comment_author', '$comment_email', '$comment_url', '$comment_ip', '$comment_date', '$comment_content', '1', 'trackback')"); 392 392 echo " Comment added."; 393 393 } -
trunk/wp-content/plugins/hello.php
r1340 r2060 3 3 Plugin Name: Hello Dolly 4 4 Plugin URI: http://wordpress.org/# 5 Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. When enabled you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page but the plugins page.5 Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. When enabled you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page. 6 6 Author: Matt Mullenweg 7 Version: 1.0 7 8 Author URI: http://photomatt.net/ 8 9 */ -
trunk/wp-includes/comment-functions.php
r2054 r2060 238 238 function get_comment_text() { 239 239 global $comment; 240 $comment_text = str_replace('<trackback />', '', $comment->comment_content); 241 $comment_text = str_replace('<pingback />', '', $comment_text); 242 return apply_filters('get_comment_text', $comment_text); 240 return apply_filters('get_comment_text', $comment->comment_content); 243 241 } 244 242 … … 255 253 function get_comment_excerpt() { 256 254 global $comment; 257 $comment_text = str_replace('<trackback />', '', $comment->comment_content); 258 $comment_text = str_replace('<pingback />', '', $comment_text); 259 $comment_text = strip_tags($comment_text); 255 $comment_text = strip_tags($comment->comment_content); 260 256 $blah = explode(' ', $comment_text); 261 257 if (count($blah) > 20) { … … 397 393 } 398 394 399 function get_commentdata( $comment_ID,$no_cache=0,$include_unapproved=false) { // less flexible, but saves DB queries400 global $postc, $id,$commentdata, $wpdb;395 function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { // less flexible, but saves DB queries 396 global $postc, $id, $commentdata, $wpdb; 401 397 if ($no_cache) { 402 398 $query = "SELECT * FROM $wpdb->comments WHERE comment_ID = '$comment_ID'"; … … 406 402 $myrow = $wpdb->get_row($query, ARRAY_A); 407 403 } else { 408 $myrow['comment_ID']=$postc->comment_ID; 409 $myrow['comment_post_ID']=$postc->comment_post_ID; 410 $myrow['comment_author']=$postc->comment_author; 411 $myrow['comment_author_email']=$postc->comment_author_email; 412 $myrow['comment_author_url']=$postc->comment_author_url; 413 $myrow['comment_author_IP']=$postc->comment_author_IP; 414 $myrow['comment_date']=$postc->comment_date; 415 $myrow['comment_content']=$postc->comment_content; 416 $myrow['comment_karma']=$postc->comment_karma; 417 $myrow['comment_approved']=$postc->comment_approved; 418 if (strstr($myrow['comment_content'], '<trackback />')) { 419 $myrow['comment_type'] = 'trackback'; 420 } elseif (strstr($myrow['comment_content'], '<pingback />')) { 421 $myrow['comment_type'] = 'pingback'; 422 } else { 423 $myrow['comment_type'] = 'comment'; 424 } 404 $myrow['comment_ID'] = $postc->comment_ID; 405 $myrow['comment_post_ID'] = $postc->comment_post_ID; 406 $myrow['comment_author'] = $postc->comment_author; 407 $myrow['comment_author_email'] = $postc->comment_author_email; 408 $myrow['comment_author_url'] = $postc->comment_author_url; 409 $myrow['comment_author_IP'] = $postc->comment_author_IP; 410 $myrow['comment_date'] = $postc->comment_date; 411 $myrow['comment_content'] = $postc->comment_content; 412 $myrow['comment_karma'] = $postc->comment_karma; 413 $myrow['comment_approved'] = $postc->comment_approved; 414 $myrow['comment_type'] = $postc->comment_type; 425 415 } 426 416 return $myrow; -
trunk/xmlrpc.php
r2059 r2060 1021 1021 $trackback_pings = array(); 1022 1022 foreach($comments as $comment) { 1023 if ((strpos($comment->comment_content, '<trackback />') === 0) 1024 || ('trackback' == $comment->comment_type)) { 1025 // FIXME: would be nicer to have a comment_title field? 1026 // FIXME: assumption: here we make the assumption that trackback 1027 // titles are stored as <strong>title</strong> 1028 $content = str_replace('<trackback />', '', $comment->comment_content); 1023 if ( 'trackback' == $comment->comment_type ) { 1024 $content = $comment->comment_content; 1029 1025 $title = substr($content, 8, (strpos($content, '</strong>') - 8)); 1030 1026 $trackback_pings[] = array( … … 1270 1266 $pingbacks = array(); 1271 1267 foreach($comments as $comment) { 1272 if ((strpos($comment->comment_content, '<pingback />') === 0) 1273 || ('pingback' == $comment->comment_type)) { 1268 if ( 'pingback' == $comment->comment_type ) 1274 1269 $pingbacks[] = $comment->comment_author_url; 1275 }1276 1270 } 1277 1271
Note: See TracChangeset
for help on using the changeset viewer.