Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!AECCore::is_comment_owner($comment->comment_ID) && !is_user_logged_in() ) {
- //For anonymous users
- $content .= "<div class='$edit_admin $clearfix' id='edit-comment-user-link-$comment->comment_ID' style='background:none'>";
- $content .= AECCore::build_admin_links($comment->comment_ID, $comment->comment_post_ID);
- $content .= "</div>";
- //Show custom content to users
- if (AECCore::show_affiliate_link()) {
- $message = do_shortcode(stripslashes($aecomments->get_admin_option( 'affiliate_text' )));
- $message = str_replace("[url]", "<a href='http://www.ajaxeditcomments.com/?affiliate_id=" . $aecomments->get_admin_option( 'affiliate_id' ) . "'>",$message);
- $message = str_replace("[/url]", "</a>", $message);
- $content .= "<div class='aec-custom-text'>$message</div><!--/aec-custom-text-->";
- }
- //End for anonymous users
- } else {
- //Check if user is editor
- $role = AECUtility::get_user_role();
- global $user_ID;
- //todo change editor to capability
- if ($role == 'editor' && $aecomments->get_admin_option( 'allow_editing_editors' ) == 'false')
- return $content;
- if (is_admin() && $aecomments->get_admin_option( 'admin_editing' ) == "false") {
- //We're in the admin panel
- $content .= '<div class="' .$edit_admin. ' ' . $clearfix.'" id="edit-comment-admin-links' . $comment->comment_ID . '">';
- $content .= AECCore::build_admin_links($comment->comment_ID, $comment->comment_post_ID);
- $content .= "</div>";
- //End in the admin panel
- } elseif ( ( $aecomments->get_user_option( 'comment_editing' ) == "true" && $comment->user_id == $user_ID ) || current_user_can ('administrator')) {
- //We're in a post
- $content .= '<div class="' . $edit_admin . ' ' . $clearfix . '" id="edit-comment-admin-links' . $comment->comment_ID . '" style="background: none">';
- $content .= AECCore::build_admin_links($comment->comment_ID, $comment->comment_post_ID);
- $content .= "</div>";
- }
Add Comment
Please, Sign In to add comment