PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
← All changes | includes/updates/update-2.2.0.php +6 -20 4.0.8 → 2.2.10 View file →
@@ -1,19 +1,5 @@
1 1 <?php
2 -/**
3 - * This file is used to update the database version of the plugin.
4 - *
5 - * @link https://wpsmartpost.com/
6 - * @since 2.2.0
7 - *
8 - * @package Smart_Post_Show
9 - * @subpackage Smart_Post_Show/includes
10 - */
11 -
12 -if ( ! defined( 'ABSPATH' ) ) {
13 - exit; // Exit if accessed directly.
14 -}
15 -
16 2 update_option( 'smart_post_show_version', '2.2.0' );
17 3 update_option( 'smart_post_show_db_version', '2.2.0' );
18 4
19 5 /**
@@ -286,11 +272,11 @@
286 272 */
287 273 global $wpdb;
288 274 $old_post_types = array( 'sp_pc_shortcodes' => 'sp_post_carousel' );
289 275 foreach ( $old_post_types as $old_type => $type ) {
290 - $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
276 + $wpdb->query(
291 277 $wpdb->prepare(
292 - "UPDATE {$wpdb->posts} SET post_type = REPLACE(post_type, %s, %s)
278 + "UPDATE {$wpdb->posts} SET post_type = REPLACE(post_type, %s, %s)
293 279 WHERE post_type LIKE %s",
294 280 $old_type,
295 281 $type,
296 282 $old_type
@@ -295,11 +281,11 @@
295 281 $type,
296 282 $old_type
297 283 )
298 284 );
299 - $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
285 + $wpdb->query(
300 286 $wpdb->prepare(
301 - "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
287 + "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
302 288 WHERE guid LIKE %s",
303 289 "post_type={$old_type}",
304 290 "post_type={$type}",
305 291 "%post_type={$type}%"
@@ -304,11 +290,11 @@
304 290 "post_type={$type}",
305 291 "%post_type={$type}%"
306 292 )
307 293 );
308 - $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
294 + $wpdb->query(
309 295 $wpdb->prepare(
310 - "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
296 + "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
311 297 WHERE guid LIKE %s",
312 298 "/{$old_type}/",
313 299 "/{$type}/",
314 300 "%/{$old_type}/%"