Repository navigation
Expand file tree
/
Copy pathauthcred.php
More file actions
65 lines (56 loc) · 1.92 KB
/
Copy pathauthcred.php
File metadata and controls
65 lines (56 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Plugin Name: AuthCRED
* Plugin URI: https://github.com/iniznet/authcred
* Description: Provide simple authentication alongside mycred integration with shortcodes
* Version: 1.5.0-beta.1
* Requires at least: 5.8
* Requires PHP: 7.4
* Author: niznet
* Author URI: https://niznet.my.id
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: authcred
* Domain Path: /languages
*/
require_once dirname( __FILE__ ) . '/vendor/autoload.php';
class AuthCRED extends \WPTrait\Plugin
{
public $Settings;
public $Admin;
public $SocialAuth;
public $AuthShortcode;
public $CredShortcode;
public $TableShortcode;
public $UserAuth;
public $UserProfile;
public $MyCRED;
public $Permalinks;
public $Updater;
public function __construct($slug, $args = [])
{
parent::__construct($slug, $args);
}
public function instantiate() {
$this->Settings = new \AuthCRED\Options\Settings($this->plugin);
$this->Admin = new \AuthCRED\Admin($this->plugin);
$this->SocialAuth = new \AuthCRED\SocialAuth($this->plugin);
$this->AuthShortcode = new \AuthCRED\AuthShortcode($this->plugin);
$this->CredShortcode = new \AuthCRED\CredShortcode($this->plugin);
$this->TableShortcode = new \AuthCRED\TableShortcode($this->plugin);
$this->UserAuth = new \AuthCRED\UserAuth($this->plugin);
$this->UserProfile = new \AuthCRED\UserProfile($this->plugin);
$this->MyCRED = new \AuthCRED\MyCRED($this->plugin);
$this->Permalinks = new \AuthCRED\Permalinks($this->plugin);
$this->Updater = new \AuthCRED\Updater();
}
public function register_activation_hook()
{
$socialAuth = new \AuthCRED\SocialAuth($this->plugin);
$socialAuth->registerRewriteRules();
flush_rewrite_rules();
}
public function register_deactivation_hook(){}
public static function register_uninstall_hook(){}
}
new AuthCRED('authcred');