Plugin Directory


Ignore:
Timestamp:
08/30/2026 11:50:12 AM (7 weeks ago)
Author:
mizan42047
Message:

Update to version 1.2.9 from GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • blockish/trunk/includes/Extensions/AiPreview.php

    r3648035 r3672479  
    1919
    2020                $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 ) . '%';
    3622
    3723                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
    … …  
    4026                                "SELECT ID, post_type, post_title, post_name, post_status, post_modified, post_content
    4127                                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')
    4329                                AND post_status IN ('publish','draft','private','pending','future','auto-draft')
    4430                                AND post_content LIKE %s
    4531                                ORDER BY post_modified DESC
    4632                                LIMIT %d",
    47                                 ...$params
     33                                $like,
     34                                $limit
    4835                        ),
    4936                        ARRAY_A
Note: See TracChangeset for help on using the changeset viewer.