| Server IP : 38.190.208.107 / Your IP : 216.73.217.46 Web Server : nginx/1.28.1 System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 User : root ( 0) PHP Version : 8.2.28 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/wp.9/wp-content/themes/blocksy/inc/components/hero/ |
Upload File : |
<?php
$attachment_id = false;
$prefix = blocksy_manager()->screen->get_prefix();
$page_title_bg_type = blocksy_akg_or_customizer(
'page_title_bg_type',
blocksy_get_page_title_source(),
(
(
is_search()
||
is_author()
) ? 'color' : 'featured_image'
)
);
if ($page_title_bg_type !== 'color') {
if (
is_singular()
||
blocksy_is_page()
) {
if (blocksy_is_page()) {
$attachment_id = get_post_thumbnail_id(blocksy_is_page());
} else {
$attachment_id = get_post_thumbnail_id($post_id);
}
} else {
$term_id = get_queried_object_id();
if ($term_id && !is_singular()) {
$id = get_term_meta($term_id, 'thumbnail_id');
if ($id && !empty($id)) {
$attachment_id = $id[0];
}
if (! $id) {
$attachment_id = null;
}
$term_atts = blocksy_get_taxonomy_options($term_id);
$maybe_image = blocksy_akg('image', $term_atts, '');
if (
$maybe_image
&&
is_array($maybe_image)
&&
isset($maybe_image['attachment_id'])
) {
$attachment_id = $maybe_image['attachment_id'];
}
}
}
}
if ($page_title_bg_type === 'custom_image') {
$attachment_id = null;
$custom_background_image = blocksy_akg_or_customizer(
'custom_hero_background',
blocksy_get_page_title_source(),
[
'attachment_id' => null
]
);
if ($custom_background_image['attachment_id']) {
$attachment_id = $custom_background_image['attachment_id'];
}
}
$attachment_id = apply_filters(
'blocksy:hero:type-2:image:attachment_id',
$attachment_id
);
if (
$page_title_bg_type === 'custom_image'
||
$page_title_bg_type === 'featured_image'
) {
$parallax_result = [];
$parallax_value = blocksy_akg_or_customizer(
'parallax',
blocksy_get_page_title_source(),
[
'desktop' => false,
'tablet' => false,
'mobile' => false,
]
);
$parallax_value = blocksy_expand_responsive_value($parallax_value);
if ($parallax_value['desktop']) {
$parallax_result[] = 'desktop';
}
if ($parallax_value['tablet']) {
$parallax_result[] = 'tablet';
}
if ($parallax_value['mobile']) {
$parallax_result[] = 'mobile';
}
if (count($parallax_result) > 0) {
$attr['data-parallax'] = implode(':', $parallax_result);
}
}
$hero_structure = blocksy_akg_or_customizer(
'hero_structure',
blocksy_get_page_title_source(),
'narrow'
);
$container_class = 'ct-container';
if ($hero_structure === 'narrow') {
$container_class = 'ct-container-narrow';
}
$attr = apply_filters('blocksy:hero:wrapper-attr', $attr);
if ($prefix === 'courses_single' && function_exists('tutor')) {
$elements = str_replace(
'tutor-course-details-header tutor-mb-44',
'tutor-course-details-header entry-header ' . $container_class,
$elements
);
}
?>
<div <?php echo blocksy_attr_to_html($attr) ?>>
<?php if ($attachment_id) { ?>
<figure>
<?php
echo blocksy_media(
apply_filters('blocksy:hero:type-2:image-args', [
'attachment_id' => $attachment_id,
// 'size' => 'full',
'size' => blocksy_akg_or_customizer(
'page_title_image_size',
blocksy_get_page_title_source(),
'full'
),
'aspect_ratio' => false,
'lazyload' => blocksy_get_theme_mod(
'has_lazy_load_page_title_image',
'yes'
) === 'yes'
])
);
?>
</figure>
<?php } ?>
<?php if ($prefix === 'courses_single' && function_exists('tutor')) { ?>
<?php echo $elements ?>
<?php } else { ?>
<header class="entry-header <?php echo $container_class ?>">
<?php echo $elements ?>
</header>
<?php } ?>
</div>