__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?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();
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| assets | Folder | 0775 |
|
|
| views | Folder | 0775 |
|
|
| api.php | File | 1.3 KB | 0775 |
|
| init.php | File | 1.91 KB | 0775 |
|
| options.php | File | 4.59 KB | 0775 |
|
| walker-nav-menu.php | File | 12.01 KB | 0775 |
|