PluginProbe
Orderable – Restaurant & Food Ordering System / 0.1.2
Orderable – Restaurant & Food Ordering System v0.1.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 / orderable.php

orderable.php in Orderable – Restaurant & Food Ordering System 0.1.2, at orderable.php

94 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Orderable - Local Ordering System
4 * Author URI: https://orderable.com
5 * Description: Take local online ordering to a whole new level with Orderable.
6 * Version: 0.1.2
7 * Author: Orderable
8 * Text Domain: orderable
9 * WC requires at least: 5.4.0
10 * WC tested up to: 5.4.1
11 */
12
13 defined( 'ABSPATH' ) || exit;
14
15 /**
16 * Orderable main class.
17 */
18 class Orderable {
19 /**
20 * Plugin version.
21 *
22 * @var string
23 */
24 public static $version = '0.1.2';
25
26 /**
27 * Construct the plugin.
28 */
29 public function __construct() {
30 $this->define_constants();
31
32 load_plugin_textdomain( 'orderable', false, ORDERABLE_LANGUAGES_PATH );
33
34 add_action( 'plugins_loaded', array( $this, 'run' ), 20 );
35 }
36
37 public function run() {
38 $this->load_classes();
39
40 do_action( 'orderable_init' );
41 }
42
43 /**
44 * Define Constants.
45 */
46 private function define_constants() {
47 $this->define( 'ORDERABLE_PATH', plugin_dir_path( __FILE__ ) );
48 $this->define( 'ORDERABLE_URL', plugin_dir_url( __FILE__ ) );
49 $this->define( 'ORDERABLE_ASSETS_URL', ORDERABLE_URL . 'assets/' );
50 $this->define( 'ORDERABLE_INC_PATH', ORDERABLE_PATH . 'inc/' );
51 $this->define( 'ORDERABLE_MODULES_PATH', ORDERABLE_INC_PATH . 'modules/' );
52 $this->define( 'ORDERABLE_VENDOR_PATH', ORDERABLE_INC_PATH . 'vendor/' );
53 $this->define( 'ORDERABLE_LANGUAGES_PATH', ORDERABLE_INC_PATH . 'languages/' );
54 $this->define( 'ORDERABLE_TEMPLATES_PATH', ORDERABLE_PATH . 'templates/' );
55 $this->define( 'ORDERABLE_TPL_PATH', ORDERABLE_PATH . 'templates/' );
56 $this->define( 'ORDERABLE_BASENAME', plugin_basename( __FILE__ ) );
57 $this->define( 'ORDERABLE_VERSION', self::$version );
58 }
59
60 /**
61 * Define constant if not already set.
62 *
63 * @param string $name
64 * @param string|bool $value
65 */
66 private function define( $name, $value ) {
67 if ( ! defined( $name ) ) {
68 define( $name, $value );
69 }
70 }
71
72 /**
73 * Load classes.
74 */
75 private function load_classes() {
76 require_once( ORDERABLE_INC_PATH . 'class-helpers.php' );
77 require_once( ORDERABLE_INC_PATH . 'class-settings.php' );
78 require_once( ORDERABLE_INC_PATH . 'class-modules.php' );
79 require_once( ORDERABLE_INC_PATH . 'class-assets.php' );
80 require_once( ORDERABLE_INC_PATH . 'class-products.php' );
81 require_once( ORDERABLE_INC_PATH . 'class-ajax.php' );
82 require_once( ORDERABLE_INC_PATH . 'class-orders.php' );
83 require_once( ORDERABLE_INC_PATH . 'class-admin-notices.php' );
84
85 Orderable_Settings::run();
86 Orderable_Assets::run();
87 Orderable_Modules::run();
88 Orderable_Products::run();
89 Orderable_Ajax::run();
90 Orderable_Admin_Notices::run();
91 }
92 }
93
94 $orderable = new Orderable();