Changeset 7763 for trunk/src/includes/common/blocks.php
- Timestamp:
- 10/01/2026 04:50:02 AM (6 weeks ago)
- File:
-
- 1 edited
-
trunk/src/includes/common/blocks.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/blocks.php
r7755 r7763 130 130 */ 131 131 public function enqueue_block_editor_assets() { 132 133 // Bail if the script receiving this data is unavailable. 134 if ( ! wp_script_is( 'bbp-admin-blocks', 'registered' ) ) { 135 return; 136 } 132 137 133 138 // Localize script data for the block editor (script is loaded via block.json). … … 382 387 $placeholders = implode( ', ', array_fill( 0, count( $statuses ), '%s' ) ); 383 388 $forum_placeholders = implode( ', ', array_fill( 0, count( $forum_ids ), '%d' ) ); 384 $values = array_merge( array( bbp_get_topic_tag_tax_id(), bbp_get_topic_post_type() ), $statuses, $forum_ids , $forum_ids, $forum_ids);389 $values = array_merge( array( bbp_get_topic_tag_tax_id(), bbp_get_topic_post_type() ), $statuses, $forum_ids ); 385 390 $query = "SELECT DISTINCT tt.term_id 386 391 FROM {$bbp_db->term_taxonomy} AS tt … … 390 395 WHERE tt.taxonomy = %s AND p.post_type = %s AND p.post_status IN ({$placeholders}) 391 396 AND p.post_parent IN ({$forum_placeholders}) 392 AND CAST( fm.meta_value AS UNSIGNED ) IN ({$forum_placeholders}) 393 AND NOT EXISTS ( 394 SELECT 1 FROM {$bbp_db->postmeta} AS excluded_fm 395 WHERE excluded_fm.post_id = p.ID AND excluded_fm.meta_key = '_bbp_forum_id' 396 AND CAST( excluded_fm.meta_value AS UNSIGNED ) NOT IN ({$forum_placeholders}) 397 )"; 397 AND CAST( fm.meta_value AS UNSIGNED ) = p.post_parent"; 398 398 $term_ids = $bbp_db->get_col( $bbp_db->prepare( $query, $values ) ); 399 399
Note:
See TracChangeset
for help on using the changeset viewer.