Changeset 3672479 for blockish/trunk/includes/Extensions/AiPreview.php
- Timestamp:
- 08/30/2026 11:50:12 AM (7 weeks ago)
- File:
-
- 1 edited
-
blockish/trunk/includes/Extensions/AiPreview.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blockish/trunk/includes/Extensions/AiPreview.php
r3648035 r3672479 19 19 20 20 $limit = max( 1, min( 500, $limit ) ); 21 $like = '%' . $wpdb->esc_like( self::BLOCK_COMMENT ) . '%'; 22 $excluded = array( 23 'revision', 24 'nav_menu_item', 25 'customize_changeset', 26 'oembed_cache', 27 'user_request', 28 'wp_global_styles', 29 'wp_navigation', 30 'attachment', 31 'blockish-classes', 32 ); 33 34 $placeholders = implode( ',', array_fill( 0, count( $excluded ), '%s' ) ); 35 $params = array_merge( $excluded, array( $like, $limit ) ); 21 $like = '%' . $wpdb->esc_like( self::BLOCK_COMMENT ) . '%'; 36 22 37 23 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching … … 40 26 "SELECT ID, post_type, post_title, post_name, post_status, post_modified, post_content 41 27 FROM {$wpdb->posts} 42 WHERE post_type NOT IN ( {$placeholders})28 WHERE post_type NOT IN ('revision','nav_menu_item','customize_changeset','oembed_cache','user_request','wp_global_styles','wp_navigation','attachment','blockish-classes') 43 29 AND post_status IN ('publish','draft','private','pending','future','auto-draft') 44 30 AND post_content LIKE %s 45 31 ORDER BY post_modified DESC 46 32 LIMIT %d", 47 ...$params 33 $like, 34 $limit 48 35 ), 49 36 ARRAY_A
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)