| Server IP : 144.76.79.100 / Your IP : 216.73.216.103 [ Web Server : Apache System : Linux ch05.wehostwebserver.com 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64 User : razzlestore ( 1092) PHP Version : 8.2.29 Disable Function : NONE Domains : 343 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/razzlestore/public_html/wp-content/plugins/elementskit-lite/modules/megamenu/ |
Upload File : |
<?php
namespace ElementsKit_Lite;
use ElementsKit_Lite\Libs\Framework\Attr;
use ElementsKit_Lite\Modules\Megamenu\Init;
defined( 'ABSPATH' ) || exit;
class Megamenu_Api extends Core\Handler_Api {
public function config() {
$this->prefix = 'megamenu';
}
public function get_save_menuitem_settings() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
$menu_item_id = $this->request['settings']['menu_id'];
$menu_item_settings = wp_json_encode( $this->request['settings'], JSON_UNESCAPED_UNICODE );
update_post_meta( $menu_item_id, Init::$menuitem_settings_key, $menu_item_settings );
return array(
'saved' => 1,
'message' => esc_html__( 'Saved', 'elementskit-lite' ),
);
}
public function get_get_menuitem_settings() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
$menu_item_id = $this->request['menu_id'];
$data = get_post_meta( $menu_item_id, Init::$menuitem_settings_key, true );
return (array) json_decode( $data );
}
public function get_megamenu_content() {
$menu_item_id = intval($this->request['id']);
if ('publish' !== get_post_status ($menu_item_id) || post_password_required($menu_item_id)) {
return;
}
$output = \ElementsKit_Lite\Utils::render_elementor_content($menu_item_id);
return $output;
}
}
new Megamenu_Api();