Server IP : 192.64.112.168 / Your IP : 18.222.182.195 Web Server : Apache System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64 User : expressoneac ( 1128) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/expressoneac/www/wp-content/plugins/elementskit-lite/modules/widget-builder/ |
Upload File : |
<?php namespace ElementsKit_Lite\Modules\Widget_Builder; defined( 'ABSPATH' ) || exit; class Live_Action { private $id; public function __construct() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- We are taking the post id from the URL. The page only can access admin. So nonce verification is not required. $this->id = ( ! isset( $_GET['post'] ) ? 0 : intval( wp_unslash( $_GET['post'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- We are checking the page action. The page only can access admin. So nonce verification is not required. if ( $this->id == 0 || ! isset( $_GET['action'] ) || $_GET['action'] != 'elementor' ) { return; } if ( get_post_type( $this->id ) != 'elementskit_widget' ) { return; } add_action( 'init', array( $this, 'reset' ) ); } public function reset() { update_post_meta( $this->id, '_wp_page_template', 'elementor_canvas' ); update_post_meta( $this->id, '_elementor_data', '[{"id":"e3a6ad6","elType":"section","settings":[],"elements":[{"id":"77605d8","elType":"column","settings":{"_column_size":100,"_inline_size":null},"elements":[{"id":"0d8eeb3","elType":"widget","settings":{},"elements":[],"widgetType":"ekit_wb_' . $this->id . '"}],"isInner":false}],"isInner":false}]' ); } }