public function init() { $this->initAdminActions(); $this->initFrontEndActions(); $this->initWidgets(); $this->initShortcodes(); $this->initPostType(); // Setup Megamenu WPO_MegamenuEditor::getInstance()->init(); }
} public function updateMegaMenuTable($id, $name, $type, $shortcode) { global $wpdb; $table_name = $wpdb->prefix . "megamenu_widgets"; $wpdb->update($table_name, array('name' => $name, 'type' => $type, 'params' => $shortcode), array('id' => $id), array('%s', '%s', '%s'), array('%d')); } public function insertMegaMenuTable($name, $type, $shortcode) { global $wpdb; $table_name = $wpdb->prefix . "megamenu_widgets"; $wpdb->replace($table_name, array('name' => $name, 'type' => $type, 'params' => $shortcode), array('%s', '%s', '%s')); return $wpdb->insert_id; } public function showListShortCodes() { $obj = WPO_Shortcodes::getInstance(); $shortcodes = $obj->getButtons(); require WPO_FRAMEWORK_PATH . 'megamenu/templates/shortcodes.php'; exit; } /** * Translate Languages Follow Actived Theme */ public function l($text) { return $text; } } WPO_MegamenuEditor::getInstance()->init(); }