| 1 |
<?php |
| 2 |
|
| 3 |
namespace RexTheme\WPVR\Frontend; |
| 4 |
|
| 5 |
/** |
| 6 |
* Standalone wrapper for the legacy Wpvr_Public class. |
| 7 |
* |
| 8 |
* Handles public-side init and asset enqueuing via the legacy class. |
| 9 |
* Also instantiates Shortcode internally (Wpvr_Public creates it in its constructor). |
| 10 |
*/ |
| 11 |
class Frontend { |
| 12 |
|
| 13 |
private $legacy; |
| 14 |
|
| 15 |
public function __construct() { |
| 16 |
require_once WPVR_PLUGIN_LEGACY_DIR_PATH . 'public/class-wpvr-public.php'; |
| 17 |
require_once WPVR_PLUGIN_LEGACY_DIR_PATH . 'public/classes/class-wpvr-shortcode.php'; |
| 18 |
|
| 19 |
$this->legacy = new \Wpvr_Public( 'wpvr', WPVR_VERSION ); |
| 20 |
|
| 21 |
add_action( 'wp_enqueue_scripts', [ $this->legacy, 'enqueue_styles' ] ); |
| 22 |
add_action( 'wp_enqueue_scripts', [ $this->legacy, 'enqueue_scripts' ] ); |
| 23 |
$this->legacy->public_init(); |
| 24 |
} |
| 25 |
} |
| 26 |
|