public function onWpAdminMenu()
 {
     parent::onWpAdminMenu();
     if (current_user_can('manage_amazon_options') && self::getOption('log_to_db') == '1') {
         add_submenu_page(self::ParentMenuId, $this->getSubmenuPageTitle('Logs'), __('Logs', 'wpla'), self::ParentPermissions, $this->getSubmenuId('log'), array(&$this, 'displayLogPage'));
     }
 }
 public function onWpAdminMenu()
 {
     parent::onWpAdminMenu();
     if (apply_filters('wplister_reseller_disable_tutorial_page', false)) {
         return;
     }
     add_submenu_page(self::ParentMenuId, $this->getSubmenuPageTitle('Tutorial'), __('Tutorial', 'wpla'), self::ParentPermissions, $this->getSubmenuId('tutorial'), array(&$this, 'onDisplayHelpPage'));
 }
 public function __construct()
 {
     parent::__construct();
     self::$PLUGIN_URL = WPLA_URL;
     self::$PLUGIN_DIR = WPLA_PATH;
     $this->main_admin_menu_label = get_option('wpla_admin_menu_label', $this->app_name);
     $this->main_admin_menu_label = $this->main_admin_menu_label ? $this->main_admin_menu_label : $this->app_name;
     $this->main_admin_menu_slug = sanitize_key(str_replace(' ', '-', $this->main_admin_menu_label));
     add_action('admin_menu', array(&$this, 'onWpAdminMenu'), 20);
     if (is_admin()) {
         add_action('plugins_loaded', array(&$this, 'handleSubmit'));
     }
 }
 public function onWpAdminMenu()
 {
     parent::onWpAdminMenu();
     $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'repricing';
     $title_prefix = '';
     if ($active_tab == 'repricing') {
         $title_prefix = 'Repricing - ';
     }
     if ($active_tab == 'inventory') {
         $title_prefix = 'Inventory - ';
     }
     if ($active_tab == 'skugen') {
         $title_prefix = 'SKU - ';
     }
     add_submenu_page(self::ParentMenuId, $this->getSubmenuPageTitle($title_prefix . 'Tools'), __('Tools', 'wpla'), self::ParentPermissions, $this->getSubmenuId('tools'), array(&$this, 'onDisplayToolsPage'));
 }
 public function onWpAdminMenu()
 {
     parent::onWpAdminMenu();
     add_submenu_page(self::ParentMenuId, $this->getSubmenuPageTitle('Settings'), __('Settings', 'wpla'), 'manage_amazon_options', $this->getSubmenuId('settings'), array(&$this, 'onDisplaySettingsPage'));
 }
 public function onWpAdminMenu()
 {
     parent::onWpAdminMenu();
     add_submenu_page(self::ParentMenuId, $this->getSubmenuPageTitle('Profiles'), __('Profiles', 'wpla'), self::ParentPermissions, $this->getSubmenuId('profiles'), array(&$this, 'displayProfilesPage'));
 }
 public function ajax_wpla_load_template_data_for_product()
 {
     // TODO: check nonce
     if (isset($_REQUEST['tpl_id'])) {
         $template = new WPLA_AmazonFeedTemplate($_REQUEST['tpl_id']);
         $post_id = $_REQUEST['post_id'];
         $field_data = get_post_meta($post_id, '_wpla_custom_feed_columns', true);
         if ($template) {
             // build settings form
             $data = array();
             $data['fields'] = $template->getFieldData();
             $data['values'] = $template->getFieldValues();
             $data['profile_field_data'] = is_array($field_data) ? $field_data : array();
             $data['product_attributes'] = WPLA_ProductWrapper::getAttributeTaxonomies();
             @WPLA_Page::display('profile/edit_field_data', $data);
             exit;
         } else {
             echo "invalid template id";
         }
     }
 }
 public function onWpAdminMenu()
 {
     parent::onWpAdminMenu();
     add_submenu_page(self::ParentMenuId, $this->getSubmenuPageTitle('Import'), __('Import', 'wpla'), self::ParentPermissions, $this->getSubmenuId('import'), array(&$this, 'onDisplayImportPage'));
 }