| 1 |
<?php |
| 2 |
|
| 3 |
namespace WeDevs\WeDocs; |
| 4 |
|
| 5 |
/** |
| 6 |
* Theme Support Class. |
| 7 |
* |
| 8 |
* @since 1.4 |
| 9 |
*/ |
| 10 |
class Theme_Support { |
| 11 |
|
| 12 |
/** |
| 13 |
* Theme wrapper class |
| 14 |
* |
| 15 |
* @var \WeDevs\WeDocs\Theme\Twenty_Seventeen |
| 16 |
*/ |
| 17 |
public $twenty17; |
| 18 |
|
| 19 |
/** |
| 20 |
* Theme wrapper class |
| 21 |
* |
| 22 |
* @var \WeDevs\WeDocs\Theme\Twenty_Fifteen |
| 23 |
*/ |
| 24 |
public $twenty15; |
| 25 |
|
| 26 |
/** |
| 27 |
* Theme wrapper class |
| 28 |
* |
| 29 |
* @var \WeDevs\WeDocs\Theme\Astra |
| 30 |
*/ |
| 31 |
public $astra; |
| 32 |
|
| 33 |
/** |
| 34 |
* Initialize the class |
| 35 |
*/ |
| 36 |
public function __construct() { |
| 37 |
$this->theme_support(); |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* Loads theme compatibility wrappers. |
| 42 |
* |
| 43 |
* @return void |
| 44 |
*/ |
| 45 |
public function theme_support() { |
| 46 |
$current_theme = get_template(); |
| 47 |
|
| 48 |
switch ( $current_theme ) { |
| 49 |
case 'twentyseventeen': |
| 50 |
$this->twenty17 = new Theme\Twenty_Seventeen(); |
| 51 |
break; |
| 52 |
|
| 53 |
case 'twentyfifteen': |
| 54 |
$this->twenty15 = new Theme\Twenty_Fifteen(); |
| 55 |
break; |
| 56 |
|
| 57 |
case 'astra': |
| 58 |
$this->astra = new Theme\Astra(); |
| 59 |
break; |
| 60 |
} |
| 61 |
} |
| 62 |
} |
| 63 |
|