| 1 |
<?php |
| 2 |
|
| 3 |
namespace WPDataAccess\Data_Apps; |
| 4 |
|
| 5 |
use WPDataAccess\WPDA; |
| 6 |
class WPDA_App_Builder extends WPDA_Container { |
| 7 |
public function show() { |
| 8 |
if ( !WPDA::current_user_is_admin() ) { |
| 9 |
if ( !is_admin() && !$this->send_feedback() ) { |
| 10 |
return; |
| 11 |
} |
| 12 |
$this->show_feedback( __( 'Not authorized', 'wp-data-access' ) ); |
| 13 |
return; |
| 14 |
} |
| 15 |
if ( is_admin() ) { |
| 16 |
$this->show_on_backend(); |
| 17 |
} else { |
| 18 |
$this->show_on_frontend(); |
| 19 |
} |
| 20 |
$this->add_client( 'ab' ); |
| 21 |
} |
| 22 |
|
| 23 |
private function show_on_backend() { |
| 24 |
?> |
| 25 |
|
| 26 |
<div class="wrap wpda-apps-backend"> |
| 27 |
<h1 class="wp-heading-inline"> |
| 28 |
<?php |
| 29 |
?> |
| 30 |
App Builder |
| 31 |
</h1> |
| 32 |
|
| 33 |
<?php |
| 34 |
$this->show_on_frontend(); |
| 35 |
?> |
| 36 |
</div> |
| 37 |
|
| 38 |
<?php |
| 39 |
} |
| 40 |
|
| 41 |
private function show_on_frontend() { |
| 42 |
?> |
| 43 |
|
| 44 |
<div class="wpda-pp-container"> |
| 45 |
<div class="pp-container-app-builder"></div> |
| 46 |
</div> |
| 47 |
|
| 48 |
<?php |
| 49 |
} |
| 50 |
|
| 51 |
} |
| 52 |
|