PluginProbe
ManageWP Worker / 3.9.8
ManageWP Worker v3.9.8
4.9.38 4.9.37 4.9.36 4.9.35 4.9.34 3.8.7 3.8.8 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.18 3.9.19 3.9.2 3.9.20 3.9.21 3.9.22 3.9.23 3.9.24 All 73 releases
worker / comment.class.php

comment.class.php in ManageWP Worker 3.9.8, at comment.class.php

43 lines 927 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*************************************************************
3 *
4 * post.class.php
5 *
6 * Create remote post
7 *
8 *
9 * Copyright (c) 2011 Prelovac Media
10 * www.prelovac.com
11 **************************************************************/
12
13 class MMB_Comment extends MMB_Core
14 {
15 function __construct()
16 {
17 parent::__construct();
18 }
19
20 function change_status($args)
21 {
22
23 global $wpdb;
24 $comment_id = $args['comment_id'];
25 $status = $args['status'];
26
27 if ( 'approve' == $status )
28 $status_sql = '1';
29 elseif ( 'unapprove' == $status )
30 $status_sql = '0';
31 elseif ( 'spam' == $status )
32 $status_sql = 'spam';
33 elseif ( 'trash' == $status )
34 $status_sql = 'trash';
35 $sql = "update ".$wpdb->prefix."comments set comment_approved = '$status_sql' where comment_ID = '$comment_id'";
36 $success = $wpdb->query($sql);
37
38
39 return $success;
40 }
41
42 }
43 ?>