| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | |
| 4 | 4 | use Elementor\Plugin; |
| 5 | 5 | |
| 6 | 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | - exit; // Exit if accessed directly. | |
| 7 | + exit; // Exit if accessed directly | |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | class Upgrade_Utils { |
| 11 | 11 | |
| @@ -11,11 +11,11 @@ | ||
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * _update_widget_settings |
| 14 | 14 | * |
| 15 | - * @param string $widget_id widget type id. | |
| 16 | - * @param Updater $updater updater instance. | |
| 17 | - * @param array $changes array containing updating control_ids, callback and other data needed by the callback. | |
| 15 | + * @param string $widget_id widget type id | |
| 16 | + * @param Updater $updater updater instance | |
| 17 | + * @param array $changes array containing updating control_ids, callback and other data needed by the callback | |
| 18 | 18 | * |
| 19 | 19 | * @return bool |
| 20 | 20 | */ |
| 21 | 21 | public static function _update_widget_settings( $widget_id, $updater, $changes ) { |
| @@ -21,11 +21,11 @@ | ||
| 21 | 21 | public static function _update_widget_settings( $widget_id, $updater, $changes ) { |
| 22 | 22 | global $wpdb; |
| 23 | 23 | |
| 24 | 24 | $post_ids = $updater->query_col( |
| 25 | - 'SELECT `post_id` | |
| 26 | - FROM `' . $wpdb->postmeta . '` | |
| 27 | - WHERE `meta_key` = "_elementor_data" | |
| 25 | + 'SELECT `post_id` | |
| 26 | + FROM `' . $wpdb->postmeta . '` | |
| 27 | + WHERE `meta_key` = "_elementor_data" | |
| 28 | 28 | AND `meta_value` LIKE \'%"widgetType":"' . $widget_id . '"%\';' |
| 29 | 29 | ); |
| 30 | 30 | |
| 31 | 31 | if ( empty( $post_ids ) ) { |
| @@ -69,9 +69,9 @@ | ||
| 69 | 69 | $json_value = wp_slash( wp_json_encode( $data ) ); |
| 70 | 70 | |
| 71 | 71 | update_metadata( 'post', $post_id, '_elementor_data', $json_value ); |
| 72 | 72 | } |
| 73 | - } | |
| 73 | + } // End foreach(). | |
| 74 | 74 | |
| 75 | 75 | return $updater->should_run_again( $post_ids ); |
| 76 | 76 | } |
| 77 | 77 | } |