0
我的wordpress博客上安裝了一個插件,該插件接收電子郵件地址和消息並在我的其他CMS平臺上創建新用戶。問題是這個影響所有評論框。我想重新工作這個插件來檢查它是否在一個特定的頁面上,如果這樣的話某些值會有所不同。如果沒有,那就照常進行。如何在WordPress中指定評論框以使用特定插件
function ifcj_createUser_SFI($comment_id) {
# determine commenters email
global $wpdb;
$sql = "SELECT comment_author_email FROM $wpdb->comments WHERE comment_ID = $comment_id";
$userEmail = $wpdb->get_var($sql);
if ($userEmail == NULL) {
return false;
}
# pull in class file
require(ABSPATH . 'class.convio_api.php');
# create instance and connection with convio, ALWAYS REQUIRED
$c = new ConvioAPI('site_id=xxx&api_key=xxxxxx&[email protected]&login_password=xxxxx');
# add user to groups/interests (this can be done when creating the user also)
$c->createUpdateUser('primary_email='.$userEmail.'&add_group_ids=73663&add_interest_ids=3761');
return true;
}
add_action('comment_post','ifcj_createUser_SFI',0,1);
在此先感謝。