first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
<?php
/*
* Name: Header
* Section: header
* Description: Default header with company info
*/
$default_options = array(
'font_family' => $font_family,
'font_size' => 14,
'font_color' => '#444444',
'font_weight' => 'normal',
'block_background' => '#ffffff',
'block_padding_top'=>15,
'block_padding_bottom'=>15,
'block_padding_left'=>15,
'block_padding_right'=>15
);
$options = array_merge($default_options, $options);
if (empty($info['header_logo']['id'])) {
$image = false;
} else {
$image = tnp_media_resize($info['header_logo']['id'], array(200, 80));
if (is_wp_error($image)) {
$image = false;
}
}
$empty = empty($info['header_logo']['id']) && empty($info['header_sub']) && empty($info['header_title']);
?>
<?php if ($empty) { ?>
<p>Please, set your company info.</p>
<?php } else { ?>
<style>
.header-text {
padding: 10px;
text-align: right;
font-size: <?php echo $options['font_size'] ?>px;
font-family: <?php echo $options['font_family'] ?>;
font-weight: <?php echo $options['font_weight'] ?>;
color: <?php echo $options['font_color'] ?>;
}
.header-logo {
font-family: <?php echo $options['font_family'] ?>;
font-size: <?php echo $options['font_size']*1.1 ?>px;
line-height: normal;
font-weight: <?php echo $options['font_weight'] ?>;
color: <?php echo $options['font_color'] ?>;
}
</style>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<?php if ( $image ) { ?>
<td align="left" width="50%" inline-class="header-logo">
<a href="#" target="_blank">
<img alt="<?php echo esc_attr( $info['header_title'] ) ?>" src="<?php echo $image ?>"
style="display: block; max-width: 100%" border="0">
</a>
<?php } else { ?>
<td align="left" width="50%" inline-class="heading-text"
style="padding: 5px; font-size: 24px; font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #444444;">
<?php echo esc_attr( $info['header_title'] ) ?>
<?php } ?>
</td>
<td width="50%" align="right" class="mobile-hide" inline-class="header-text">
<?php echo $info['header_sub'] ?>
</td>
</tr>
</table>
<?php } ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,11 @@
<?php
/* @var $options array contains all the options the current block we're ediging contains */
/* @var $controls NewsletterControls */
/* @var $controls NewsletterFields */
?>
<p>This block uses the <a href="?page=newsletter_main_info" target="_blank">global company info</a>.</p>
<?php $fields->font()?>
<?php $fields->block_commons() ?>

View File

@@ -0,0 +1,11 @@
.header-logo {
text-align: center!important;
}
@media all and (max-width: 640) {
.header-table td {
width: 100%!important;
}
.header-logo {
text-align: center!important;
}
}