| 1 |
<?php |
| 2 |
|
| 3 |
namespace WPAdminify\Inc\Modules\AdminPages; |
| 4 |
|
| 5 |
// no direct access allowed |
| 6 |
if ( !defined( 'ABSPATH' ) ) { |
| 7 |
exit; |
| 8 |
} |
| 9 |
/** |
| 10 |
* WPAdminify |
| 11 |
* @package Admin Pages |
| 12 |
* |
| 13 |
* @author Jewel Theme <support@jeweltheme.com> |
| 14 |
*/ |
| 15 |
class AdminPages_Render extends AdminPagesModel |
| 16 |
{ |
| 17 |
public function __construct( $post, $from_multisite = false ) |
| 18 |
{ |
| 19 |
$this->init_admin_page_content( $post, $from_multisite = false ); |
| 20 |
} |
| 21 |
|
| 22 |
public function init_admin_page_content( $post, $from_multisite = false ) |
| 23 |
{ |
| 24 |
$remove_page_title = $post->remove_page_title; |
| 25 |
$remove_page_margin = $post->remove_page_margin; |
| 26 |
$custom_css = $post->custom_css; |
| 27 |
?> |
| 28 |
<style> |
| 29 |
<?php |
| 30 |
if ( $remove_page_margin ) { |
| 31 |
?>#wpcontent { |
| 32 |
padding-left: 0; |
| 33 |
} |
| 34 |
|
| 35 |
.wrap { |
| 36 |
margin: 0; |
| 37 |
} |
| 38 |
|
| 39 |
<?php |
| 40 |
} |
| 41 |
if ( $custom_css ) { |
| 42 |
echo wp_strip_all_tags( $custom_css ) ; |
| 43 |
} |
| 44 |
?> |
| 45 |
</style> |
| 46 |
|
| 47 |
<div class="wrap"> |
| 48 |
<?php |
| 49 |
|
| 50 |
if ( !$remove_page_title ) { |
| 51 |
?> |
| 52 |
<h1><?php |
| 53 |
echo esc_html( $post->post_title ) ; |
| 54 |
?></h1> |
| 55 |
<?php |
| 56 |
} else { |
| 57 |
?> |
| 58 |
<h1 style="display: none;"></h1> |
| 59 |
<?php |
| 60 |
} |
| 61 |
|
| 62 |
?> |
| 63 |
|
| 64 |
<?php |
| 65 |
?> |
| 66 |
</div> |
| 67 |
|
| 68 |
<?php |
| 69 |
} |
| 70 |
|
| 71 |
} |