Changeset 12345
- Timestamp:
- 12/19/2022 05:08:34 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-blocks.php
r12344 r12345 268 268 $use_it = ( $enabled_for_user && $enabled_for_forum ); 269 269 270 // If we're editing a post made without the editor, let's respect that. 271 if ( $use_it && bbp_is_reply_edit() ) { 272 $reply = bbp_get_reply( bbp_get_reply_id() ); 273 274 if ( $reply && ! has_blocks( $reply->post_content ) ) { 275 $use_it = false; 276 } 277 } elseif ( $use_it && bbp_is_topic_edit() ) { 278 if ( ! has_blocks( get_post_field( 'post_content', bbp_get_topic_id() ) ) ) { 279 $use_it = false; 270 if ( $use_it ) { 271 $reply_id = bbp_is_reply_edit() ? bbp_get_reply_id() : ( ( bbp_is_post_request() && ! empty( $_POST['action'] ) && 'bbp-edit-reply' === $_POST['action'] ) ? $_POST['bbp_reply_id'] : 0 ); 272 $topic_id = bbp_is_topic_edit() ? bbp_get_topic_id() : ( ( bbp_is_post_request() && ! empty( $_POST['action'] ) && 'bbp-edit-topic' === $_POST['action'] ) ? $_POST['bbp_topic_id'] : 0 ); 273 274 // If we're editing a post made without the editor, let's respect that. 275 if ( $reply_id ) { 276 $reply = bbp_get_reply( $reply_id ); 277 278 if ( $reply && ! has_blocks( $reply->post_content ) ) { 279 $use_it = false; 280 } 281 } elseif ( $topic_id ) { 282 if ( ! has_blocks( get_post_field( 'post_content', $topic_id ) ) ) { 283 $use_it = false; 284 } 280 285 } 281 286 }
Note: See TracChangeset
for help on using the changeset viewer.