global setting. $ph_style = array_key_exists('style', $args) ? $args['style'] : null; if ($ph_style === null) { $ph_style = class_exists('\AKSRT\Settings\Settings') ? (\AKSRT\Settings\Settings::get_other_page_settings()['header_style'] ?? '1') : '1'; } if ($ph_style === 'not') { $ph_style = ''; } // '' means "don't show header" if ($ph_style === '') { return; } $ph_eyebrow = (string) ($args['eyebrow'] ?? ''); $ph_title = (string) ($args['title'] ?? ''); $ph_desc = (string) ($args['desc'] ?? ''); $ph_extra = (string) ($args['extra'] ?? ''); // Cover image: explicit args > global setting > post thumbnail. $ph_cover = (string) ($args['cover'] ?? ''); if ($ph_cover === '' && class_exists('\AKSRT\Settings\Settings')) { $other = \AKSRT\Settings\Settings::get_other_page_settings(); $ph_cover = (string) ($other['header_cover_img'] ?? ''); } if ($ph_cover === '' && has_post_thumbnail()) { $ph_cover = (string) get_the_post_thumbnail_url(get_the_ID(), 'full'); } // Map style value to CSS modifier class. $style_class = 'term-page-header--simple'; if ($ph_style === '2') { $style_class = 'term-page-header--card'; } elseif ($ph_style === '3') { $style_class = 'term-page-header--cover'; } // Cover inline style (for cover style). $cover_style = ''; if ($ph_style === '3' && $ph_cover !== '') { $cover_style = ' style="background-image:url(\'' . esc_url($ph_cover) . '\')"'; } ?>