| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('UD_CENTRAL_DIR')) die('Security check'); |
| 4 |
/** |
| 5 |
* Abstract class for All Remote Commmunication actions for available sites |
| 6 |
*/ |
| 7 |
abstract class UpdraftRC_Action { |
| 8 |
|
| 9 |
// By default, a nonce is required - so individual actions must explicitly disable this if not required. |
| 10 |
public $check_nonce = 'updraftcentral'; |
| 11 |
|
| 12 |
// Whether to show the page header (boolean) |
| 13 |
public $show_header = true; |
| 14 |
|
| 15 |
// Mothership |
| 16 |
protected $rc; |
| 17 |
|
| 18 |
protected $user; |
| 19 |
|
| 20 |
protected $sites; |
| 21 |
|
| 22 |
/** |
| 23 |
* Make sure to call parent::__construct() if using your own constructor |
| 24 |
*/ |
| 25 |
public function __construct() { |
| 26 |
global $updraft_central; |
| 27 |
$this->rc = $updraft_central; |
| 28 |
$this->user = $this->rc->user; |
| 29 |
$this->sites = $this->user->sites; |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Authorisation checks. Return a boolean result. |
| 34 |
* |
| 35 |
* @return Boolean |
| 36 |
*/ |
| 37 |
public function auth_check() { |
| 38 |
return true; |
| 39 |
} |
| 40 |
|
| 41 |
/** |
| 42 |
* Echo your output |
| 43 |
*/ |
| 44 |
public function render() { |
| 45 |
} |
| 46 |
} |
| 47 |
|