'capability_here' * To add a page to the network admin (wp-admin/network), use: 'network_admin_menu' => 'capability_here' * To add a page to the user (wp-admin/user) admin, use: 'user_admin_menu' => 'capability_here' * * @since 2.0.0 * @var array */ protected $supported_panels = [ 'network_admin_menu' => 'wu_read_discount_codes', ]; /** * Allow child classes to register widgets, if they need them. * * @since 1.8.2 * @return void */ public function register_widgets() {} /** * Returns an array with the labels for the edit page. * * @since 1.8.2 * @return array */ public function get_labels() { return [ 'deleted_message' => __('Discount Code removed successfully.', 'wp-multisite-waas'), 'search_label' => __('Search Discount Code', 'wp-multisite-waas'), ]; } /** * Returns the title of the page. * * @since 2.0.0 * @return string Title of the page. */ public function get_title() { return __('Discount Codes', 'wp-multisite-waas'); } /** * Returns the title of menu for this page. * * @since 2.0.0 * @return string Menu label of the page. */ public function get_menu_title() { return __('Discount Codes', 'wp-multisite-waas'); } /** * Allows admins to rename the sub-menu (first item) for a top-level page. * * @since 2.0.0 * @return string False to use the title menu or string with sub-menu title. */ public function get_submenu_title() { return __('Discount Codes', 'wp-multisite-waas'); } /** * Returns the action links for that page. * * @since 1.8.2 * @return array */ public function action_links() { return [ [ 'url' => wu_network_admin_url('wp-ultimo-edit-discount-code'), 'label' => __('Add Discount Code'), 'icon' => 'wu-circle-with-plus', ], ]; } /** * Loads the list table for this particular page. * * @since 2.0.0 * @return \WP_Ultimo\List_Tables\Base_List_Table */ public function table() { return new \WP_Ultimo\List_Tables\Discount_Code_List_Table(); } }