Plugin Directory

Changeset 861743


Ignore:
Timestamp:
02/20/2014 03:52:13 PM (12 years ago)
Author:
simonquasar
Message:

1.01 - bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • add-pingbacks/trunk/add-pingbacks.php

    r861104 r861743  
    6363}
    6464
    65 function addPingbacks_add_comments( $id, $author, $email, $url, $ip, $comment ) {
     65function addPingbacks_add_comments( $id, $author, $email, $url, $ip, $comments ) {
    6666                       
     67$explodes = explode( '%*%', $comments );
     68    if( empty( $explodes ) ) return false;
     69
     70    foreach( $explodes as $comment )                           
    6771wp_insert_comment( array(
    6872    'comment_post_ID' => $id,
     
    7175    'comment_author_url' => $url,
    7276    'comment_content' => $comment,
    73     'comment_type' => 'pingback',
     77    'comment_type' => '',
    7478    'comment_parent' => 0,
    7579    'user_id' => '',
    7680    'comment_author_IP' => $ip,
    77     'comment_agent' => 'Add Pingbacks Plugin',
     81    'comment_agent' => 'Add Comments Plugin - http://shinraholdings.com/plugins/add-comments',
    7882    'comment_date' => current_time( 'mysql' ),
    7983    'comment_approved' => 1 ) );
     84
    8085    return true;
    8186}
Note: See TracChangeset for help on using the changeset viewer.