PluginProbe
Orderable – Restaurant & Food Ordering System / 1.12.2
Orderable – Restaurant & Food Ordering System v1.12.2
0.1.4 0.1.5 0.2.0 1.0.0 1.1.0 1.1.1 1.10.0 1.10.1 1.11.0 1.12.0 1.12.1 1.12.2 1.13.0 1.14.0 1.15.0 1.16.0 1.17.0 1.17.1 1.18.0 1.19.0 1.19.1 1.19.2 1.2.0 1.20.0 1.20.1 All 44 releases
orderable / inc / modules / addons / class-addons.php

class-addons.php in Orderable – Restaurant & Food Ordering System 1.12.2, at inc/modules/addons/class-addons.php

45 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Module: Addons.
4 *
5 * @package Orderable/Classes
6 */
7
8 defined( 'ABSPATH' ) || exit;
9
10 /**
11 * Addons module class.
12 */
13 class Orderable_Addons {
14 /**
15 * Init.
16 */
17 public static function run() {
18 add_filter( 'orderable_valid_admin_pages', array( __CLASS__, 'add_valid_admin_pages' ) );
19 add_action( 'admin_menu', array( __CLASS__, 'add_settings_page' ) );
20 }
21
22 /**
23 * Add valid admin page.
24 */
25 public static function add_valid_admin_pages( $pages = array() ) {
26 $pages[] = 'orderable-product-addons';
27
28 return $pages;
29 }
30
31 /**
32 * Add settings page.
33 */
34 public static function add_settings_page() {
35 add_submenu_page( 'orderable', __( 'Product Addons', 'orderable' ), sprintf( '%s <span class="update-plugins" style="background-color: #ffffff1c"><span class="plugin-count">%s</span></span>', __( 'Addons', 'orderable' ), __( 'Pro', 'orderable' ) ), 'manage_options', 'orderable-product-addons', array( __CLASS__, 'product_addons_page' ), 10 );
36 }
37
38 /**
39 * Product addons page.
40 */
41 public static function product_addons_page() {
42 Orderable_Settings::upgrade_page_content( __( 'Product Addons', 'orderable' ) );
43 }
44 }
45