| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template Library Modal Header |
| 4 |
*/ |
| 5 |
if (!defined('ABSPATH')) { |
| 6 |
exit; // Exit if accessed directly |
| 7 |
} |
| 8 |
?> |
| 9 |
<?php |
| 10 |
global $pagenow; |
| 11 |
$library_title = 'Template Library'; |
| 12 |
if ( 'post.php' === $pagenow && isset( $_GET['post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only admin context detection for display |
| 13 |
$post_id = absint( $_GET['post'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only post ID for display label |
| 14 |
if ( $post_id ) { |
| 15 |
$current_post_type = get_post_type( $post_id ); |
| 16 |
if( 'jltma_popup' === $current_post_type ){ |
| 17 |
$library_title = 'Popup Builder'; |
| 18 |
} |
| 19 |
} |
| 20 |
} |
| 21 |
?> |
| 22 |
<div class="ma-el-modal-header-logo-icon"> |
| 23 |
<img src="<?php echo esc_url( JLTMA_IMAGE_DIR . 'logo.svg' ); ?>"> |
| 24 |
<div class="jltma-template-lib-title"> |
| 25 |
<!-- Templates Library --> |
| 26 |
<?php echo esc_html( $library_title ); ?> |
| 27 |
</div> |
| 28 |
</div> |
| 29 |
|