[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor
/
core
/
upgrade
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 custom-tasks-manager.php
2,484 B
SET
[ EDIT ]
|
[ DEL ]
📄 custom-tasks.php
373 B
SET
[ EDIT ]
|
[ DEL ]
📄 manager.php
2,999 B
SET
[ EDIT ]
|
[ DEL ]
📄 task.php
526 B
SET
[ EDIT ]
|
[ DEL ]
📄 updater.php
491 B
SET
[ EDIT ]
|
[ DEL ]
📄 upgrade-utils.php
1,813 B
SET
[ EDIT ]
|
[ DEL ]
📄 upgrades.php
27,659 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: upgrade-utils.php
<?php namespace Elementor\Core\Upgrade; use Elementor\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Upgrade_Utils { /** * _update_widget_settings * * @param string $widget_id widget type id. * @param Updater $updater updater instance. * @param array $changes array containing updating control_ids, callback and other data needed by the callback. * * @return bool */ public static function _update_widget_settings( $widget_id, $updater, $changes ) { global $wpdb; $post_ids = $updater->query_col( 'SELECT `post_id` FROM `' . $wpdb->postmeta . '` WHERE `meta_key` = "_elementor_data" AND `meta_value` LIKE \'%"widgetType":"' . $widget_id . '"%\';' ); if ( empty( $post_ids ) ) { return false; } foreach ( $post_ids as $post_id ) { $do_update = false; $document = Plugin::instance()->documents->get( $post_id ); if ( ! $document ) { continue; } $data = $document->get_elements_data(); if ( empty( $data ) ) { continue; } // loop thru callbacks & array foreach ( $changes as $change ) { $args = [ 'do_update' => &$do_update, 'widget_id' => $widget_id, 'control_ids' => $change['control_ids'], ]; if ( isset( $change['prefix'] ) ) { $args['prefix'] = $change['prefix']; $args['new_id'] = $change['new_id']; } $data = Plugin::instance()->db->iterate_data( $data, $change['callback'], $args ); if ( ! $do_update ) { continue; } // We need the `wp_slash` in order to avoid the unslashing during the `update_metadata` $json_value = wp_slash( wp_json_encode( $data ) ); update_metadata( 'post', $post_id, '_elementor_data', $json_value ); } } return $updater->should_run_again( $post_ids ); } }