css
1 year ago
fonts
1 year ago
images
1 year ago
js
1 year ago
partials
1 year ago
class-mo-firebase-authentication-admin.php
1 year ago
class-mo-firebase-customer.php
1 year ago
class-mo-firebase-authentication-admin.php
95 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Firebase Authentication Admin Functions |
| 4 | * |
| 5 | * @package firebase-authentication |
| 6 | */ |
| 7 | |
| 8 | /** |
| 9 | * Files included |
| 10 | */ |
| 11 | require_once 'partials' . DIRECTORY_SEPARATOR . 'class-mo-firebase-authentication-admin-display.php'; |
| 12 | |
| 13 | |
| 14 | /** |
| 15 | * Firebase Authentication Admin account handler |
| 16 | */ |
| 17 | class MO_Firebase_Authentication_Admin { |
| 18 | |
| 19 | /** |
| 20 | * The ID of this plugin. |
| 21 | * |
| 22 | * @since 1.0.0 |
| 23 | * @access private |
| 24 | * @var string $plugin_name The ID of this plugin. |
| 25 | */ |
| 26 | private $plugin_name; |
| 27 | |
| 28 | /** |
| 29 | * The version of this plugin. |
| 30 | * |
| 31 | * @since 1.0.0 |
| 32 | * @access private |
| 33 | * @var string $version The current version of this plugin. |
| 34 | */ |
| 35 | private $version; |
| 36 | |
| 37 | /** |
| 38 | * Initialize the class and set its properties. |
| 39 | * |
| 40 | * @since 1.0.0 |
| 41 | * @param string $plugin_name The name of this plugin. |
| 42 | * @param string $version The version of this plugin. |
| 43 | */ |
| 44 | public function __construct( $plugin_name, $version ) { |
| 45 | $this->plugin_name = $plugin_name; |
| 46 | $this->version = $version; |
| 47 | } |
| 48 | |
| 49 | |
| 50 | /** |
| 51 | * Enqueue styles for admin dashboard |
| 52 | * |
| 53 | * @param mixed $hook default parameter for enqueue styles. |
| 54 | * |
| 55 | * @return [type] |
| 56 | * @since 1.0.0 |
| 57 | */ |
| 58 | public function enqueue_styles( $hook ) { |
| 59 | if ( 'toplevel_page_mo_firebase_authentication' !== $hook ) { |
| 60 | return; |
| 61 | } |
| 62 | wp_enqueue_style( 'mo_firebase_auth_admin_bootstrap_style', plugins_url( 'css' . DIRECTORY_SEPARATOR . 'bootstrap.min.css', __FILE__ ), array(), $this->version, false ); |
| 63 | wp_enqueue_style( 'mo_firebase_auth_firebase_phone_style', plugins_url( 'css' . DIRECTORY_SEPARATOR . 'phone.min.css', __FILE__ ), array(), $this->version, false ); |
| 64 | wp_enqueue_style( 'mo_firebase_auth_settings_style', plugins_url( 'css' . DIRECTORY_SEPARATOR . 'style.min.css', __FILE__ ), array(), $this->version, false ); |
| 65 | wp_enqueue_style( 'mo_firebase_auth_fontawesome', plugins_url( 'css' . DIRECTORY_SEPARATOR . 'font-awesome.min.css', __FILE__ ), array(), $this->version, false ); |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Register the JavaScript for the admin area. |
| 70 | * |
| 71 | * @param mixed $hook default parameter for enqueue scripts. |
| 72 | * @since 1.0.0 |
| 73 | */ |
| 74 | public function enqueue_scripts( $hook ) { |
| 75 | if ( 'toplevel_page_mo_firebase_authentication' !== $hook ) { |
| 76 | return; |
| 77 | } |
| 78 | wp_enqueue_script( 'mo_firebase_auth_bootstrap_script', plugins_url( 'js' . DIRECTORY_SEPARATOR . 'bootstrap.min.js', __FILE__ ), array(), $this->version, false ); |
| 79 | wp_enqueue_script( 'mo_firebase_auth_custom_settings_script', plugins_url( 'js' . DIRECTORY_SEPARATOR . 'custom.min.js', __FILE__ ), array(), $this->version, false ); |
| 80 | wp_enqueue_script( 'mo_firebase_auth_firebase_phone_script', plugins_url( 'js' . DIRECTORY_SEPARATOR . 'phone.min.js', __FILE__ ), array(), $this->version, false ); |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Initial render for firebase admin dashboardF |
| 85 | * |
| 86 | * @return void |
| 87 | */ |
| 88 | public function mo_firebase_auth_page() { |
| 89 | global $wpdb; |
| 90 | update_option( 'mo_fb_host_name', 'https://login.xecurify.com' ); |
| 91 | mo_firebase_authentication_main_menu(); |
| 92 | } |
| 93 | |
| 94 | } |
| 95 |