PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.2.0
Forumax – AI Powered Advanced Community Forum Plugin v2.2.0
2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 2.1.0 All 29 releases
← All changes | includes/features/bbpc_attachments/code/class.php +10 -8 1.4.12.2.0 View file →
@@ -100,11 +100,11 @@
100 100 $file = get_attached_file( $att_id );
101 101 $file = pathinfo( $file, PATHINFO_BASENAME );
102 102
103 103 $allow = 'no';
104 - if ( bbpc_is_user_admin() ) {
104 + if ( forumax_is_user_admin() ) {
105 105 $allow = 'delete';
106 - } elseif ( bbpc_is_user_moderator() ) {
106 + } elseif ( forumax_is_user_moderator() ) {
107 107 $allow = 'delete';
108 108 } elseif ( $author_ID == $user_ID ) {
109 109 $allow = false;
110 110 }
@@ -145,13 +145,13 @@
145 145 }
146 146 }
147 147
148 148 public function delete_post( $id ) {
149 - if ( bbpc_has_bbpress() ) {
149 + if ( forumax_has_bbpress() ) {
150 150 if ( bbp_is_reply( $id ) || bbp_is_topic( $id ) ) {
151 151 //TODO: Add conditions in pro
152 152 // if ( $this->o['delete_attachments'] == 'delete' ) {
153 - // $files = bbpc_get_post_attachments( $id );
153 + // $files = forumax_get_post_attachments( $id );
154 154
155 155 // if ( is_array( $files ) && ! empty( $files ) ) {
156 156 // foreach ( $files as $file ) {
157 157 // wp_delete_attachment( $file->ID );
@@ -180,9 +180,9 @@
180 180
181 181 public function get_file_size( $global_only = false, $forum_id = 0 ) {
182 182 $forum_id = $forum_id == 0 ? bbp_get_forum_id() : $forum_id;
183 183
184 - if ( ! class_exists( 'BBPCorePro' ) ){
184 + if ( ! class_exists( 'Forumax_Pro' ) ){
185 185 $value = 512;
186 186 // $value = (int) $this->o['max_file_size'] ?? 512;
187 187 }else{
188 188 $value = $this->o['max_file_size'] ?? 512;
@@ -200,9 +200,9 @@
200 200 }
201 201
202 202 public function get_max_files( $global_only = false, $forum_id = 0 ) {
203 203 $forum_id = $forum_id == 0 ? bbp_get_forum_id() : $forum_id;
204 - if( ! class_exists( 'BBPCorePro' ) ){
204 + if( ! class_exists( 'Forumax_Pro' ) ){
205 205 $value = 4;
206 206 }else{
207 207 $value = $this->o['max_file_uploads'] ?? 4;
208 208 }
@@ -262,9 +262,9 @@
262 262 return apply_filters( 'bbpc_bbpressattchment_is_hidden_from_visitors', $value == 1 );
263 263 }
264 264
265 265 public function topic_attachment_deletion($topic_id){
266 - if( class_exists( 'BBPCorePro' ) ){
266 + if( class_exists( 'Forumax_Pro' ) ){
267 267 $topic_deletion = $this->o['is_attachment_deletion'] ?? '';
268 268
269 269 if( $topic_deletion == 1 && get_post_type($topic_id) == bbp_get_topic_post_type() ) {
270 270 $topic_attachments = get_attached_media( '', $topic_id );
@@ -276,9 +276,9 @@
276 276 }
277 277
278 278 public function reply_attachment_deletion($reply_id){
279 279
280 - if( class_exists( 'BBPCorePro' ) ){
280 + if( class_exists( 'Forumax_Pro' ) ){
281 281 $reply_deletion = $this->o['is_attachment_deletion'] ?? '';
282 282
283 283 if( $reply_deletion == 1 && get_post_type($reply_id) == bbp_get_reply_post_type() ) {
284 284 $replies_attachments = get_attached_media( '', $reply_id );
@@ -289,4 +289,6 @@
289 289 }
290 290 }
291 291 }
292 292 }
293 +
294 +