Changeset 334339
- Timestamp:
- 06/15/2026 06:56:16 PM (5 months ago)
- Location:
- havenlytics-realty/1.15.0
- Files:
-
- 71 added
- 27 deleted
- 20 edited
- 1 copied
-
. (copied) (copied from havenlytics-realty/1.0.5 )
-
404.php (modified) (1 diff)
-
archive.php (modified) (1 diff)
-
assets/css/admin-realty.css (added)
-
assets/css/base/reset.css (deleted)
-
assets/css/base/typography.css (deleted)
-
assets/css/base/variables.css (deleted)
-
assets/css/blog.css (added)
-
assets/css/components/breadcrumbs.css (deleted)
-
assets/css/components/buttons.css (deleted)
-
assets/css/components/cards.css (deleted)
-
assets/css/components/forms.css (deleted)
-
assets/css/components/pagination.css (deleted)
-
assets/css/editor-style.css (deleted)
-
assets/css/editor.css (added)
-
assets/css/havenlytics-compat.css (added)
-
assets/css/havenlytics-home.css (added)
-
assets/css/home (added)
-
assets/css/home/blog.css (added)
-
assets/css/home/departments.css (added)
-
assets/css/layouts.css (added)
-
assets/css/layouts/comments.css (deleted)
-
assets/css/layouts/content.css (deleted)
-
assets/css/layouts/footer.css (deleted)
-
assets/css/layouts/grid.css (deleted)
-
assets/css/layouts/header.css (deleted)
-
assets/css/layouts/navigation.css (deleted)
-
assets/css/layouts/sidebar.css (deleted)
-
assets/css/page.css (added)
-
assets/css/pages/404.css (deleted)
-
assets/css/pages/archive.css (deleted)
-
assets/css/pages/blog.css (deleted)
-
assets/css/pages/search.css (deleted)
-
assets/css/pages/single.css (deleted)
-
assets/css/polish.css (added)
-
assets/css/single.css (added)
-
assets/css/theme.css (added)
-
assets/css/utilities/accessibility.css (deleted)
-
assets/css/utilities/print.css (deleted)
-
assets/css/utilities/responsive.css (deleted)
-
assets/js/customizer-controls.js (added)
-
assets/js/customizer.js (modified) (1 diff)
-
assets/js/havenlytics-home.js (added)
-
assets/js/main.js (deleted)
-
assets/js/navigation.js (deleted)
-
assets/js/theme.js (added)
-
footer.php (modified) (1 diff)
-
functions.php (modified) (10 diffs)
-
header.php (modified) (1 diff)
-
inc/admin (added)
-
inc/admin/realty-admin.php (added)
-
inc/admin/theme-welcome-notice.php (added)
-
inc/breadcrumbs.php (modified) (18 diffs)
-
inc/custom-header.php (modified) (2 diffs)
-
inc/customizer (added)
-
inc/customizer.php (modified) (6 diffs)
-
inc/customizer/controls.php (added)
-
inc/customizer/css-output.php (added)
-
inc/customizer/helpers.php (added)
-
inc/customizer/homepage-css-output.php (added)
-
inc/customizer/loader.php (added)
-
inc/customizer/panel-integration.php (added)
-
inc/customizer/sections-homepage.php (added)
-
inc/customizer/sections.php (added)
-
inc/customizer/selective-refresh.php (added)
-
inc/elementor.php (added)
-
inc/integrations (added)
-
inc/integrations/havenlytics (added)
-
inc/jetpack.php (modified) (1 diff)
-
inc/layout.php (added)
-
inc/plugin-hooks.php (added)
-
inc/setup (added)
-
inc/setup/theme-footer-widgets.php (added)
-
inc/setup/theme-launch.php (added)
-
inc/setup/theme-menus.php (added)
-
inc/template-functions.php (modified) (9 diffs)
-
inc/template-tags.php (modified) (1 diff)
-
inc/tgmpa (deleted)
-
index.php (modified) (1 diff)
-
page.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
-
screenshot.png (modified) ( previous)
-
search.php (modified) (1 diff)
-
single.php (modified) (1 diff)
-
style.css (modified) (9 diffs)
-
template-parts/content-page.php (modified) (1 diff)
-
template-parts/content-single.php (added)
-
template-parts/footer (added)
-
template-parts/footer/back-to-top.php (added)
-
template-parts/footer/site-info.php (added)
-
template-parts/footer/widgets.php (added)
-
template-parts/header (added)
-
template-parts/header/actions.php (added)
-
template-parts/header/branding.php (added)
-
template-parts/header/mobile-menu.php (added)
-
template-parts/header/navigation.php (added)
-
template-parts/header/preloader.php (added)
-
template-parts/header/property-search-panel.php (added)
-
template-parts/home (added)
-
template-parts/home/cta-banner.php (added)
-
template-parts/home/department-tabs.php (added)
-
template-parts/home/featured-agencies.php (added)
-
template-parts/home/featured-agents.php (added)
-
template-parts/home/featured-properties.php (added)
-
template-parts/home/footer-cta.php (added)
-
template-parts/home/hero-map.php (added)
-
template-parts/home/latest-posts.php (added)
-
template-parts/home/partials (added)
-
template-parts/home/partials/blog-card.php (added)
-
template-parts/home/partials/card-carousel.php (added)
-
template-parts/home/plugin-inactive.php (added)
-
template-parts/home/property-categories.php (added)
-
template-parts/home/property-locations.php (added)
-
template-parts/home/statistics.php (added)
-
template-parts/layout (added)
-
template-parts/layout/blog-content.php (added)
-
templates (added)
-
templates/template-realty-home.php (added)
-
theme.json (added)
Legend:
- Unmodified
- Added
- Removed
-
havenlytics-realty/1.15.0/404.php
r322064 r334339 1 1 <?php 2 2 3 /** 4 3 5 * The template for displaying 404 pages (not found) 6 4 7 * 5 * @link https://codex.wordpress.org/Creating_an_Error_404_Page 6 * 8 7 9 * @package Havenlytics_Realty 10 8 11 */ 9 12 13 14 10 15 get_header(); 16 11 17 ?> 12 18 13 <main id="primary" class="hvn-theme-site-main">14 <div class="hvn-theme-container">15 <?php hvn_realty_breadcrumbs(); ?>16 <div class="hvn-theme-row">17 <div class="hvn-theme-content-area hvn-theme-full-width">18 19 <div class="hvn-theme-error-404-modern">20 <div class="hvn-theme-error-bg-shape"></div>21 22 <div class="hvn-theme-error-content">23 <div class="hvn-theme-error-code">404</div>24 <div class="hvn-theme-error-illustration">25 <svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 24 24" fill="none" stroke="var(--hvn-theme-brand-primary)" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">26 <circle cx="12" cy="12" r="10"></circle>27 <line x1="12" y1="8" x2="12" y2="12"></line>28 <line x1="12" y1="16" x2="12.01" y2="16"></line>29 <path d="M4 4 L20 20" stroke="var(--hvn-theme-brand-error)" stroke-width="1.5"></path>30 </svg>31 </div>32 <h1 class="hvn-theme-error-title">33 <?php esc_html_e('Page Not Found', 'havenlytics-realty'); ?>34 </h1>35 <p class="hvn-theme-error-message">36 <?php esc_html_e('Oops! The page you are looking for does not exist. It might have been moved or deleted.', 'havenlytics-realty'); ?>37 </p>38 39 <div class="hvn-theme-error-search">40 <h3><?php esc_html_e('Search for what you need:', 'havenlytics-realty'); ?></h3>41 <?php get_search_form(); ?>42 </div>43 19 44 <div class="hvn-theme-error-actions">45 <a href="<?php echo esc_url(home_url('/')); ?>" class="hvn-theme-btn">46 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">47 <line x1="19" y1="12" x2="5" y2="12"></line>48 <polyline points="12 19 5 12 12 5"></polyline>49 </svg>50 <?php esc_html_e('Back to Homepage', 'havenlytics-realty'); ?>51 </a>52 <a href="<?php echo esc_url(home_url('/blog')); ?>" class="hvn-theme-btn hvn-theme-btn-outline">53 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">54 <path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path>55 <path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path>56 </svg>57 <?php esc_html_e('View Blog', 'havenlytics-realty'); ?>58 </a>59 </div>60 20 61 <div class="hvn-theme-error-suggestions"> 62 <h3><?php esc_html_e('Popular Pages:', 'havenlytics-realty'); ?></h3> 63 <div class="hvn-theme-error-links-grid"> 64 <a href="<?php echo esc_url(home_url('/')); ?>" class="error-link-item">🏠 <?php esc_html_e('Home', 'havenlytics-realty'); ?></a> 65 <a href="<?php echo esc_url(home_url('/about')); ?>" class="error-link-item">📖 <?php esc_html_e('About Us', 'havenlytics-realty'); ?></a> 66 <a href="<?php echo esc_url(home_url('/contact')); ?>" class="error-link-item">📞 <?php esc_html_e('Contact', 'havenlytics-realty'); ?></a> 67 <a href="<?php echo esc_url(home_url('/blog')); ?>" class="error-link-item">📝 <?php esc_html_e('Blog', 'havenlytics-realty'); ?></a> 68 </div> 69 </div> 70 71 <div class="hvn-theme-error-recent"> 72 <h3><?php esc_html_e('Recent Posts:', 'havenlytics-realty'); ?></h3> 73 <ul class="hvn-theme-error-recent-list"> 74 <?php 75 $recent_posts = wp_get_recent_posts( 76 array( 77 'numberposts' => 5, 78 'post_status' => 'publish', 79 ) 80 ); 81 if ($recent_posts) : 82 foreach ($recent_posts as $post) : 83 echo '<li><a href="' . esc_url(get_permalink($post['ID'])) . '">' . esc_html($post['post_title']) . '</a></li>'; 84 endforeach; 85 endif; 86 ?> 87 </ul> 88 </div> 89 </div> 90 </div> 21 <div id="primary" class="hvn-theme-layout hvn-layout-page hvn-theme-page-layout"> 91 22 92 </div><!-- .hvn-theme-content-area --> 93 </div><!-- .hvn-theme-row --> 94 </div><!-- .hvn-theme-container --> 95 </main><!-- #main --> 23 <div class="hvn-theme-container"> 24 25 <?php hvn_realty_breadcrumbs(); ?> 26 27 28 29 <main class="hvn-theme-content-area hvn-theme-page-content"> 30 31 <div class="hvn-theme-error-404-modern"> 32 33 <div class="hvn-theme-error-content"> 34 35 <div class="hvn-theme-error-code">404</div> 36 37 <h1 class="hvn-theme-error-title"> 38 39 <?php esc_html_e( 'Page Not Found', 'havenlytics-realty' ); ?> 40 41 </h1> 42 43 <p class="hvn-theme-error-message"> 44 45 <?php esc_html_e( 'Oops! The page you are looking for does not exist.', 'havenlytics-realty' ); ?> 46 47 </p> 48 49 <div class="hvn-theme-error-search"> 50 51 <?php get_search_form(); ?> 52 53 </div> 54 55 <div class="hvn-theme-error-actions"> 56 57 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="hvn-theme-btn"> 58 59 <?php esc_html_e( 'Back to Homepage', 'havenlytics-realty' ); ?> 60 61 </a> 62 63 </div> 64 65 </div> 66 67 </div> 68 69 </main> 70 71 </div> 72 73 </div> 74 75 96 76 97 77 <?php 78 98 79 get_footer(); 80 -
havenlytics-realty/1.15.0/archive.php
r322064 r334339 1 1 <?php 2 2 3 /** 4 3 5 * The template for displaying archive pages 6 4 7 * 5 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 6 * 8 7 9 * @package Havenlytics_Realty 10 8 11 */ 12 13 9 14 10 15 get_header(); 11 16 12 // Get blog layout setting 13 $blog_layout = hvn_realty_get_blog_layout(); 14 $grid_class = ( 'list' === $blog_layout ) ? 'hvn-theme-posts-list' : 'hvn-theme-posts-grid'; 17 18 19 $layout_class = hvn_realty_get_layout_sidebar_classes(); 20 21 $has_sidebar = hvn_realty_has_sidebar(); 22 15 23 ?> 16 24 17 <main id="primary" class="hvn-theme-site-main">18 <div class="hvn-theme-container">19 20 <?php hvn_realty_breadcrumbs(); ?>21 22 <?php if ( have_posts() ) : ?>23 <header class="hvn-theme-archive-header">24 <div class="hvn-theme-container">25 <?php26 the_archive_title( '<h1 class="hvn-theme-page-title">', '</h1>' );27 the_archive_description( '<div class="hvn-theme-archive-description">', '</div>' );28 ?>29 </div>30 </header>31 <?php endif; ?>32 25 33 <div class="hvn-theme-row">34 <div class="hvn-theme-content-area <?php echo ( 'none' === hvn_realty_get_sidebar_position() || ! is_active_sidebar( 'sidebar-1' ) ) ? 'hvn-theme-full-width' : ''; ?>">35 26 36 <?php if ( have_posts() ) : ?>27 <div id="primary" class="hvn-theme-layout hvn-layout-blog <?php echo esc_attr( $layout_class ); ?>"> 37 28 38 <div class="<?php echo esc_attr( $grid_class ); ?>"> 39 <?php 40 /* Start the Loop */ 41 while ( have_posts() ) : 42 the_post(); 43 get_template_part( 'template-parts/content', get_post_type() ); 44 endwhile; 45 ?> 46 </div> 29 <div class="hvn-theme-container"> 47 30 48 <?php 49 // Pagination 50 the_posts_pagination( 51 array( 52 'prev_text' => '<span class="hvn-theme-pagination-prev">' . esc_html__( 'Previous', 'havenlytics-realty' ) . '</span>', 53 'next_text' => '<span class="hvn-theme-pagination-next">' . esc_html__( 'Next', 'havenlytics-realty' ) . '</span>', 54 'before_page_number' => '<span class="hvn-theme-pagination-number">', 55 'after_page_number' => '</span>', 56 'mid_size' => 2, 57 'screen_reader_text' => ' ', 58 ) 59 ); 60 ?> 31 <?php hvn_realty_breadcrumbs(); ?> 61 32 62 <?php else : ?>63 33 64 <?php get_template_part( 'template-parts/content', 'none' ); ?>65 34 66 <?php endif;?>35 <?php if ( have_posts() ) : ?> 67 36 68 </div><!-- .hvn-theme-content-area -->37 <header class="hvn-theme-blog-header"> 69 38 70 <?php 71 // Only show sidebar if sidebar position is not 'none' and sidebar is active 72 if ( 'none' !== hvn_realty_get_sidebar_position() && is_active_sidebar( 'sidebar-1' ) ) : 73 ?> 74 <aside class="hvn-theme-sidebar-area"> 75 <?php get_sidebar(); ?> 76 </aside> 77 <?php endif; ?> 39 <?php 78 40 79 </div><!-- .hvn-theme-row --> 80 </div><!-- .hvn-theme-container --> 81 </main><!-- #main --> 41 the_archive_title( '<h1 class="hvn-theme-blog-title">', '</h1>' ); 42 43 the_archive_description( '<div class="hvn-theme-archive-description">', '</div>' ); 44 45 ?> 46 47 </header> 48 49 <?php endif; ?> 50 51 52 53 <?php hvn_realty_property_archive_before(); ?> 54 55 56 57 <?php if ( $has_sidebar ) : ?> 58 59 <div class="hvn-theme-layout-row"> 60 61 <?php endif; ?> 62 63 64 65 <div class="hvn-theme-content-area"> 66 67 <?php get_template_part( 'template-parts/layout/blog-content' ); ?> 68 69 </div> 70 71 72 73 <?php if ( $has_sidebar ) : ?> 74 75 <?php hvn_realty_render_sidebar(); ?> 76 77 </div> 78 79 <?php endif; ?> 80 81 </div> 82 83 </div> 84 85 82 86 83 87 <?php 88 84 89 get_footer(); 90 -
havenlytics-realty/1.15.0/assets/js/customizer.js
r328418 r334339 1 1 /** 2 * File customizer.js 3 * 4 * Theme Customizer enhancements for a better user experience. 5 * 6 * Contains handlers to make Theme Customizer preview reload changes asynchronously. 2 * Havenlytics Realty — Customizer live preview (preview iframe). 7 3 */ 8 9 ( function( $ ) { 10 11 // Site title and description. 12 wp.customize( 'blogname', function( value ) { 13 value.bind( function( to ) { 14 $( '.hvn-theme-site-title a' ).text( to ); 15 } ); 16 } ); 17 wp.customize( 'blogdescription', function( value ) { 18 value.bind( function( to ) { 19 $( '.hvn-theme-site-description' ).text( to ); 20 } ); 21 } ); 22 23 // Header text color - applies to site title, description, navigation menu, search icon, and hamburger menu 24 wp.customize( 'header_textcolor', function( value ) { 25 value.bind( function( to ) { 26 if ( 'blank' === to ) { 27 // Hide all header text elements 28 $( '.hvn-theme-site-title, .hvn-theme-site-description, .hvn-theme-main-navigation .hvn-theme-nav-menu > li > a, .hvn-theme-search-toggle, .hvn-theme-menu-toggle .hamburger, .hvn-theme-menu-toggle .hamburger::before, .hvn-theme-menu-toggle .hamburger::after' ).css( { 29 'clip': 'rect(1px, 1px, 1px, 1px)', 30 'position': 'absolute' 31 } ); 32 } else { 33 // Remove # from the value if it exists 34 var colorValue = to.replace( '#', '' ); 35 36 // Show all header text elements 37 $( '.hvn-theme-site-title, .hvn-theme-site-description, .hvn-theme-main-navigation .hvn-theme-nav-menu > li > a, .hvn-theme-search-toggle' ).css( { 38 'clip': 'auto', 39 'position': 'relative' 40 } ); 41 42 // Create style tag with !important to override any existing styles 43 var styleId = 'hvn-realty-header-color-style'; 44 $( 'style#' + styleId ).remove(); 45 var style = '<style id="' + styleId + '">'; 46 style += '.hvn-theme-site-title a, '; 47 style += '.hvn-theme-site-description, '; 48 style += '.hvn-theme-main-navigation .hvn-theme-nav-menu > li > a, '; 49 style += '.hvn-theme-search-toggle {'; 50 style += ' color: #' + colorValue + ' !important;'; 51 style += '}'; 52 style += '.hvn-theme-nav-menu .menu-item-has-children > a::after {'; 53 style += ' color: #' + colorValue + ' !important;'; 54 style += '}'; 55 style += '.hvn-theme-menu-toggle .hamburger, '; 56 style += '.hvn-theme-menu-toggle .hamburger::before, '; 57 style += '.hvn-theme-menu-toggle .hamburger::after {'; 58 style += ' background-color: #' + colorValue + ' !important;'; 59 style += '}'; 60 style += '</style>'; 61 $( 'head' ).append( style ); 62 63 // Direct inline styles as backup 64 $( '.hvn-theme-main-navigation .hvn-theme-nav-menu > li > a' ).css( 'color', '#' + colorValue ); 65 $( '.hvn-theme-search-toggle' ).css( 'color', '#' + colorValue ); 4 ( function ( $ ) { 5 'use strict'; 6 7 var config = window.hvnRealtyCustomizer || {}; 8 var fontStacks = config.fontStacks || {}; 9 var googleFonts = config.googleFonts || {}; 10 var defaultCopyright = config.defaultCopyright || ''; 11 var homeSectionVisibility = config.homeSectionVisibility || {}; 12 13 function setStyle( id, css ) { 14 var existing = document.getElementById( id ); 15 if ( existing ) { 16 existing.remove(); 17 } 18 var style = document.createElement( 'style' ); 19 style.id = id; 20 style.textContent = css; 21 document.head.appendChild( style ); 22 } 23 24 function setText( selector, value ) { 25 var node = document.querySelector( selector ); 26 if ( node ) { 27 node.textContent = value; 28 } 29 } 30 31 function setHtml( selector, value ) { 32 var node = document.querySelector( selector ); 33 if ( node ) { 34 node.innerHTML = value; 35 } 36 } 37 38 function toggleBodyClass( className, enabled ) { 39 document.body.classList.toggle( className, !! enabled ); 40 } 41 42 function replaceBodyClass( prefix, value ) { 43 Array.prototype.slice.call( document.body.classList ).forEach( function ( className ) { 44 if ( className.indexOf( prefix ) === 0 ) { 45 document.body.classList.remove( className ); 66 46 } 67 47 } ); 68 } ); 69 70 // Primary color. 71 wp.customize( 'hvn_realty_primary_color', function( value ) { 72 value.bind( function( to ) { 73 $( 'style#hvn-realty-dynamic-css' ).remove(); 74 var style = '<style id="hvn-realty-dynamic-css">:root{--hvn-theme-brand-primary:' + to + ';}</style>'; 75 $( 'head' ).append( style ); 76 } ); 77 } ); 78 79 // Body font size. 80 wp.customize( 'hvn_realty_body_font_size', function( value ) { 81 value.bind( function( to ) { 82 $( 'style#hvn-realty-font-size-css' ).remove(); 83 var style = '<style id="hvn-realty-font-size-css">:root{--hvn-theme-font-size-md:' + to + 'px;}</style>'; 84 $( 'head' ).append( style ); 85 } ); 86 } ); 87 88 // Copyright text. 89 wp.customize( 'hvn_realty_copyright_text', function( value ) { 90 value.bind( function( to ) { 91 $( '.hvn-theme-copyright' ).html( to ); 92 } ); 93 } ); 94 95 // Blog columns - refresh page to update grid 96 wp.customize( 'hvn_realty_blog_columns', function( value ) { 97 value.bind( function( to ) { 98 $( 'style#hvn-realty-columns-css' ).remove(); 99 var columns = parseInt( to, 10 ); 100 var style = '<style id="hvn-realty-columns-css">'; 101 style += '.hvn-theme-posts-grid{grid-template-columns:repeat(' + columns + ', 1fr);}'; 102 style += '@media (max-width: 992px){.hvn-theme-posts-grid{grid-template-columns:repeat(' + Math.min( 2, columns ) + ', 1fr);}}'; 103 style += '@media (max-width: 576px){.hvn-theme-posts-grid{grid-template-columns:1fr;}}'; 104 style += '</style>'; 105 $( 'head' ).append( style ); 106 } ); 107 } ); 108 109 // Blog layout - refresh page 110 wp.customize( 'hvn_realty_blog_layout', function( value ) { 111 value.bind( function( to ) { 112 if ( to === 'list' ) { 113 $( '.hvn-theme-posts-grid' ).css( 'grid-template-columns', '1fr' ); 114 $( '.hvn-theme-post-card' ).css( 'display', 'grid' ); 115 $( '.hvn-theme-post-card' ).css( 'grid-template-columns', '280px 1fr' ); 116 } else { 117 var columns = wp.customize( 'hvn_realty_blog_columns' ).get(); 118 $( '.hvn-theme-posts-grid' ).css( 'grid-template-columns', 'repeat(' + columns + ', 1fr)' ); 119 $( '.hvn-theme-post-card' ).css( 'display', 'flex' ); 120 $( '.hvn-theme-post-card' ).css( 'grid-template-columns', '' ); 48 document.body.classList.add( prefix + value ); 49 } 50 51 function bindColorVar( settingId, cssVar ) { 52 wp.customize( settingId, function ( value ) { 53 value.bind( function ( to ) { 54 if ( ! to ) { 55 return; 56 } 57 setStyle( 'hvn-realty-dynamic-' + settingId, ':root{' + cssVar + ':' + to + ';}' ); 58 } ); 59 } ); 60 } 61 62 function bindRootVar( settingId, cssVar, transform ) { 63 wp.customize( settingId, function ( value ) { 64 value.bind( function ( to ) { 65 var output = transform ? transform( to ) : to; 66 setStyle( 'hvn-realty-dynamic-' + settingId, ':root{' + cssVar + ':' + output + ';}' ); 67 } ); 68 } ); 69 } 70 71 function bindFontFamily( settingId, cssVar ) { 72 wp.customize( settingId, function ( value ) { 73 value.bind( function ( to ) { 74 var stack = fontStacks[ to ] || fontStacks.inter || "'Inter', sans-serif"; 75 loadGoogleFont( to ); 76 setStyle( 'hvn-realty-dynamic-' + settingId, ':root{' + cssVar + ':' + stack + ';}' ); 77 } ); 78 } ); 79 } 80 81 function loadGoogleFont( slug ) { 82 if ( ! slug || ! googleFonts[ slug ] ) { 83 return; 84 } 85 86 var linkId = 'hvn-realty-font-' + slug; 87 if ( document.getElementById( linkId ) ) { 88 return; 89 } 90 91 var link = document.createElement( 'link' ); 92 link.id = linkId; 93 link.rel = 'stylesheet'; 94 link.href = 'https://fonts.googleapis.com/css2?family=' + googleFonts[ slug ] + '&display=swap'; 95 document.head.appendChild( link ); 96 } 97 98 function toggleSectionVisibility( selector, enabled ) { 99 if ( ! selector ) { 100 return; 101 } 102 103 document.querySelectorAll( selector ).forEach( function ( section ) { 104 section.style.display = enabled ? '' : 'none'; 105 } ); 106 } 107 108 function updateFooterColumns( columns ) { 109 columns = parseInt( columns, 10 ); 110 if ( isNaN( columns ) || columns < 1 ) { 111 columns = 1; 112 } 113 if ( columns > 4 ) { 114 columns = 4; 115 } 116 117 replaceBodyClass( 'hvn-footer-cols-', columns ); 118 119 document.querySelectorAll( '.hvn-theme-footer-widgets' ).forEach( function ( grid ) { 120 grid.classList.remove( 'hvn-cols-1', 'hvn-cols-2', 'hvn-cols-3', 'hvn-cols-4' ); 121 grid.classList.add( 'hvn-cols-' + columns ); 122 } ); 123 } 124 125 function bindHomeTextFields() { 126 var bindings = { 127 hvn_realty_home_featured_title: '#hvn-realty-featured-title', 128 hvn_realty_home_featured_subtitle: '#hvn-realty-section-featured .hvn-realty-section__subtitle', 129 hvn_realty_home_department_title: '#hvn-realty-departments-title', 130 hvn_realty_home_department_subtitle: '#hvn-realty-section-departments .hvn-realty-section__subtitle', 131 hvn_realty_home_locations_title: '#hvn-realty-locations-title', 132 hvn_realty_home_locations_subtitle: '#hvn-realty-section-locations .hvn-realty-section__subtitle', 133 hvn_realty_home_agents_title: '#hvn-realty-agents-title', 134 hvn_realty_home_agents_subtitle: '#hvn-realty-section-agents .hvn-realty-section__subtitle', 135 hvn_realty_home_agencies_title: '#hvn-realty-agencies-title', 136 hvn_realty_home_agencies_subtitle: '#hvn-realty-section-agencies .hvn-realty-section__subtitle', 137 hvn_realty_home_blog_title: '#hvn-realty-blog-title', 138 hvn_realty_home_blog_subtitle: '#hvn-realty-section-blog .hvn-realty-section__subtitle', 139 hvn_realty_home_footer_cta_text: '#hvn-realty-footer-cta-title' 140 }; 141 142 Object.keys( bindings ).forEach( function ( settingId ) { 143 wp.customize( settingId, function ( value ) { 144 value.bind( function ( to ) { 145 setText( bindings[ settingId ], to || '' ); 146 } ); 147 } ); 148 } ); 149 } 150 151 function bindSiteIconPreview() { 152 if ( ! wp.customize( 'site_icon' ) ) { 153 return; 154 } 155 156 wp.customize( 'site_icon', function ( value ) { 157 value.bind( function ( to ) { 158 var iconId = parseInt( to, 10 ); 159 if ( ! iconId ) { 160 return; 161 } 162 163 var attachment = wp.media.attachment( iconId ); 164 attachment.fetch().then( function () { 165 var url = attachment.get( 'url' ); 166 if ( ! url ) { 167 return; 168 } 169 170 document.querySelectorAll( 'link[rel="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]' ).forEach( function ( link ) { 171 link.href = url; 172 } ); 173 } ); 174 } ); 175 } ); 176 } 177 178 function updateBlogColumns( columns ) { 179 columns = parseInt( columns, 10 ); 180 if ( isNaN( columns ) || columns < 1 ) { 181 columns = 1; 182 } 183 if ( columns > 4 ) { 184 columns = 4; 185 } 186 187 document.body.setAttribute( 'data-blog-cols', String( columns ) ); 188 replaceBodyClass( 'hvn-posts-cols-', columns ); 189 190 document.querySelectorAll( '.hvn-theme-content-area > .hvn-theme-blog-grid' ).forEach( function ( grid ) { 191 grid.classList.remove( 'hvn-cols-1', 'hvn-cols-2', 'hvn-cols-3', 'hvn-cols-4' ); 192 grid.classList.add( 'hvn-cols-' + columns ); 193 } ); 194 } 195 196 function updateBlogLayout( layout ) { 197 var isList = 'list' === layout; 198 199 document.body.setAttribute( 'data-blog-layout', layout ); 200 toggleBodyClass( 'hvn-blog-view-list', isList ); 201 toggleBodyClass( 'hvn-blog-view-grid', ! isList ); 202 203 if ( isList ) { 204 updateBlogColumns( 1 ); 205 } else { 206 wp.customize( 'hvn_realty_blog_columns', function ( setting ) { 207 updateBlogColumns( setting.get() ); 208 } ); 209 } 210 } 211 212 function updateSidebarPosition( position ) { 213 var layouts = document.querySelectorAll( '.hvn-theme-layout' ); 214 215 toggleBodyClass( 'hvn-theme-has-sidebar', 'none' !== position ); 216 toggleBodyClass( 'hvn-theme-no-sidebar', 'none' === position ); 217 toggleBodyClass( 'hvn-theme-sidebar-left', 'left' === position ); 218 toggleBodyClass( 'hvn-theme-sidebar-right', 'right' === position ); 219 toggleBodyClass( 'hvn-theme-sidebar-none', 'none' === position ); 220 221 layouts.forEach( function ( layout ) { 222 layout.classList.remove( 'hvn-has-sidebar', 'hvn-sidebar-left', 'hvn-sidebar-right' ); 223 if ( 'none' !== position ) { 224 layout.classList.add( 'hvn-has-sidebar', 'hvn-sidebar-' + position ); 121 225 } 122 226 } ); 123 } ); 124 125 // Header overlay opacity 126 wp.customize( 'hvn_realty_header_overlay_opacity', function( value ) { 127 value.bind( function( to ) { 128 $( 'style#hvn-realty-overlay-css' ).remove(); 129 var style = '<style id="hvn-realty-overlay-css">'; 130 style += '.hvn-theme-site-header::before { background: rgba(0, 0, 0, ' + to + '); }'; 131 style += '</style>'; 132 $( 'head' ).append( style ); 133 } ); 134 } ); 135 136 // Header image - refresh when changed 137 wp.customize( 'header_image', function( value ) { 138 value.bind( function( to ) { 139 if ( to && to !== 'remove-header' ) { 140 $( '.hvn-theme-site-header' ).css( 'background-image', 'url(' + to + ')' ); 141 $( '.hvn-theme-site-header' ).css( 'background-size', 'cover' ); 142 $( '.hvn-theme-site-header' ).css( 'background-position', 'center' ); 227 228 document.querySelectorAll( '.hvn-theme-sidebar-area' ).forEach( function ( sidebar ) { 229 sidebar.style.display = 'none' === position ? 'none' : ''; 230 } ); 231 } 232 233 function registerPreviewBindings() { 234 wp.customize( 'blogname', function ( value ) { 235 value.bind( function ( to ) { 236 setText( '.hvn-theme-site-title a', to ); 237 } ); 238 } ); 239 240 wp.customize( 'blogdescription', function ( value ) { 241 value.bind( function ( to ) { 242 setText( '.hvn-theme-site-description', to ); 243 } ); 244 } ); 245 246 wp.customize( 'header_textcolor', function ( value ) { 247 value.bind( function ( to ) { 248 var selectors = '.hvn-theme-site-title, .hvn-theme-site-description, .hvn-theme-nav .hvn-theme-nav-menu > li > a, .hvn-theme-main-navigation .hvn-theme-nav-menu > li > a, .hvn-theme-search-toggle, .hvn-theme-menu-toggle .hamburger, .hvn-theme-menu-toggle .hamburger::before, .hvn-theme-menu-toggle .hamburger::after'; 249 250 if ( 'blank' === to ) { 251 setStyle( 'hvn-realty-header-color-style', selectors + '{clip:rect(1px,1px,1px,1px);position:absolute;}' ); 252 return; 253 } 254 255 var colorValue = String( to ).replace( '#', '' ); 256 setStyle( 257 'hvn-realty-header-color-style', 258 '.hvn-theme-site-title a, .hvn-theme-site-description, .hvn-theme-nav .hvn-theme-nav-menu > li > a, .hvn-theme-main-navigation .hvn-theme-nav-menu > li > a, .hvn-theme-search-toggle{color:#' + colorValue + ' !important;}' + 259 '.hvn-theme-nav-menu .menu-item-has-children > a::after{color:#' + colorValue + ' !important;}' + 260 '.hvn-theme-menu-toggle .hamburger, .hvn-theme-menu-toggle .hamburger::before, .hvn-theme-menu-toggle .hamburger::after{background-color:#' + colorValue + ' !important;}' 261 ); 262 } ); 263 } ); 264 265 bindColorVar( 'hvn_realty_primary_color', '--hvn-primary' ); 266 bindColorVar( 'hvn_realty_secondary_color', '--hvn-secondary' ); 267 bindColorVar( 'hvn_realty_accent_color', '--hvn-accent' ); 268 bindColorVar( 'hvn_realty_text_color', '--hvn-text' ); 269 bindColorVar( 'hvn_realty_background_color', '--hvn-bg' ); 270 bindColorVar( 'hvn_realty_border_color', '--hvn-border' ); 271 bindColorVar( 'hvn_realty_footer_bg_color', '--hvn-footer-bg' ); 272 bindColorVar( 'hvn_realty_footer_text_color', '--hvn-footer-text' ); 273 bindColorVar( 'hvn_realty_footer_link_color', '--hvn-footer-link' ); 274 275 bindRootVar( 'hvn_realty_border_radius', '--hvn-radius', function ( to ) { 276 return parseInt( to, 10 ) + 'px'; 277 } ); 278 279 bindRootVar( 'hvn_realty_container_width', '--hvn-container', function ( to ) { 280 return parseInt( to, 10 ) + 'px'; 281 } ); 282 283 bindRootVar( 'hvn_realty_body_font_size', '--hvn-font-size', function ( to ) { 284 return parseInt( to, 10 ) + 'px'; 285 } ); 286 287 bindRootVar( 'hvn_realty_line_height', '--hvn-line-height', function ( to ) { 288 return parseFloat( to ); 289 } ); 290 291 bindFontFamily( 'hvn_realty_body_font_family', '--hvn-font-body' ); 292 bindFontFamily( 'hvn_realty_heading_font_family', '--hvn-font-heading' ); 293 294 wp.customize( 'hvn_realty_heading_scale', function ( value ) { 295 value.bind( function ( to ) { 296 var map = { small: 0.9, medium: 1, large: 1.12 }; 297 var scale = map[ to ] || 1; 298 setStyle( 'hvn-realty-heading-scale-css', ':root{--hvn-heading-scale:' + scale + ';}' ); 299 } ); 300 } ); 301 302 wp.customize( 'hvn_realty_copyright_text', function ( value ) { 303 value.bind( function ( to ) { 304 setHtml( '.hvn-theme-copyright', to || defaultCopyright ); 305 } ); 306 } ); 307 308 wp.customize( 'hvn_realty_header_cta_text', function ( value ) { 309 value.bind( function ( to ) { 310 document.querySelectorAll( '.hvn-theme-header-cta' ).forEach( function ( cta ) { 311 cta.textContent = to; 312 } ); 313 } ); 314 } ); 315 316 wp.customize( 'hvn_realty_header_cta_url', function ( value ) { 317 value.bind( function ( to ) { 318 var href = to; 319 if ( ! href && wp.customize( 'home' ) ) { 320 href = wp.customize( 'home' ).get(); 321 } 322 if ( ! href ) { 323 href = '/'; 324 } 325 document.querySelectorAll( '.hvn-theme-header-cta, .hvn-theme-mobile-header-cta' ).forEach( function ( cta ) { 326 cta.setAttribute( 'href', href ); 327 } ); 328 } ); 329 } ); 330 331 wp.customize( 'hvn_realty_footer_columns', function ( value ) { 332 value.bind( function ( to ) { 333 updateFooterColumns( to ); 334 } ); 335 } ); 336 337 wp.customize( 'hvn_realty_show_back_to_top', function ( value ) { 338 value.bind( function ( to ) { 339 toggleBodyClass( 'hvn-has-back-to-top', to ); 340 var btn = document.getElementById( 'hvn-scroll-top' ); 341 if ( btn ) { 342 btn.style.display = to ? '' : 'none'; 343 } else if ( to && wp.customize.preview ) { 344 wp.customize.preview.send( 'refresh' ); 345 } 346 } ); 347 } ); 348 349 Object.keys( homeSectionVisibility ).forEach( function ( settingId ) { 350 wp.customize( settingId, function ( value ) { 351 value.bind( function ( to ) { 352 toggleSectionVisibility( homeSectionVisibility[ settingId ], !! to ); 353 } ); 354 } ); 355 } ); 356 357 bindHomeTextFields(); 358 bindSiteIconPreview(); 359 360 wp.customize( 'hvn_realty_blog_columns', function ( value ) { 361 value.bind( function ( to ) { 362 wp.customize( 'hvn_realty_blog_layout', function ( layoutSetting ) { 363 if ( 'list' !== layoutSetting.get() ) { 364 updateBlogColumns( to ); 365 } 366 } ); 367 } ); 368 } ); 369 370 wp.customize( 'hvn_realty_blog_layout', function ( value ) { 371 value.bind( function ( to ) { 372 updateBlogLayout( to ); 373 } ); 374 } ); 375 376 wp.customize( 'hvn_realty_container_mode', function ( value ) { 377 value.bind( function ( to ) { 378 toggleBodyClass( 'hvn-container-full', 'full' === to ); 379 toggleBodyClass( 'hvn-container-boxed', 'boxed' === to ); 380 } ); 381 } ); 382 383 wp.customize( 'hvn_realty_sidebar_position', function ( value ) { 384 value.bind( function ( to ) { 385 updateSidebarPosition( to ); 386 if ( 'none' !== to && ! document.querySelector( '.hvn-theme-sidebar-area' ) && wp.customize.preview ) { 387 wp.customize.preview.send( 'refresh' ); 388 } 389 } ); 390 } ); 391 392 wp.customize( 'hvn_realty_sticky_header', function ( value ) { 393 value.bind( function ( to ) { 394 toggleBodyClass( 'hvn-theme-sticky-header', to ); 395 } ); 396 } ); 397 398 wp.customize( 'hvn_realty_show_header_search', function ( value ) { 399 value.bind( function ( to ) { 400 toggleBodyClass( 'hvn-header-no-search', ! to ); 401 } ); 402 } ); 403 404 wp.customize( 'hvn_realty_show_header_cta', function ( value ) { 405 value.bind( function ( to ) { 406 toggleBodyClass( 'hvn-header-no-cta', ! to ); 407 } ); 408 } ); 409 410 wp.customize( 'hvn_realty_header_layout', function ( value ) { 411 value.bind( function ( to ) { 412 document.body.classList.remove( 'hvn-header-layout-1', 'hvn-header-layout-2', 'hvn-header-layout-3' ); 413 document.body.classList.add( 'hvn-header-layout-' + to ); 414 } ); 415 } ); 416 417 wp.customize( 'hvn_realty_home_cta_headline', function ( value ) { 418 value.bind( function ( to ) { 419 setText( '#hvn-realty-cta-title', to ); 420 } ); 421 } ); 422 423 wp.customize( 'hvn_realty_home_cta_primary_text', function ( value ) { 424 value.bind( function ( to ) { 425 setText( '.hvn-realty-home-cta__primary', to ); 426 } ); 427 } ); 428 429 wp.customize( 'hvn_realty_home_cta_subtext', function ( value ) { 430 value.bind( function ( to ) { 431 setText( '.hvn-realty-cta__text', to ); 432 } ); 433 } ); 434 435 wp.customize( 'hvn_realty_home_hero_height', function ( value ) { 436 value.bind( function ( to ) { 437 var height = parseInt( to, 10 ); 438 if ( isNaN( height ) ) { 439 return; 440 } 441 setStyle( 442 'hvn-realty-hero-height', 443 '.hvn-realty-section--hero{--hvn-realty-hero-height:' + height + 'vh;}' 444 ); 445 if ( typeof window.hvnRealtyInvalidateHomeMap === 'function' ) { 446 window.hvnRealtyInvalidateHomeMap(); 447 } 448 } ); 449 } ); 450 451 wp.customize( 'hvn_realty_home_hero_height_mobile', function ( value ) { 452 value.bind( function ( to ) { 453 var height = parseInt( to, 10 ); 454 if ( isNaN( height ) ) { 455 return; 456 } 457 setStyle( 458 'hvn-realty-hero-height-mobile', 459 '.hvn-realty-section--hero{--hvn-realty-hero-height-mobile:' + height + 'vh;}' 460 ); 461 if ( typeof window.hvnRealtyInvalidateHomeMap === 'function' ) { 462 window.hvnRealtyInvalidateHomeMap(); 463 } 464 } ); 465 } ); 466 } 467 468 function scrollToHomeSection( selector ) { 469 if ( ! selector ) { 470 return; 471 } 472 473 var target = document.querySelector( selector ); 474 if ( ! target ) { 475 return; 476 } 477 478 target.scrollIntoView( { block: 'start', behavior: 'auto' } ); 479 target.classList.add( 'hvn-realty-customizer-highlight' ); 480 window.setTimeout( function () { 481 target.classList.remove( 'hvn-realty-customizer-highlight' ); 482 }, 1600 ); 483 484 if ( '#hvn-realty-section-hero' === selector && typeof window.hvnRealtyInvalidateHomeMap === 'function' ) { 485 window.setTimeout( window.hvnRealtyInvalidateHomeMap, 350 ); 486 } 487 } 488 489 function registerHomepageSectionScroll() { 490 if ( typeof wp === 'undefined' || ! wp.customize || ! wp.customize.preview ) { 491 return; 492 } 493 494 wp.customize.preview.bind( 'hvn-realty-scroll-to-section', function ( data ) { 495 if ( data && data.selector ) { 496 scrollToHomeSection( data.selector ); 143 497 } 144 498 } ); 145 } ); 146 147 } )( jQuery ); 499 500 var homeSections = config.homeSections || {}; 501 Object.keys( homeSections ).forEach( function ( sectionId ) { 502 wp.customize.section( sectionId, function ( section ) { 503 section.expanded.bind( function ( isExpanded ) { 504 if ( isExpanded ) { 505 scrollToHomeSection( homeSections[ sectionId ] ); 506 } 507 } ); 508 } ); 509 } ); 510 } 511 512 // Deferred setting API — registers when the preview messenger syncs each setting. 513 registerPreviewBindings(); 514 wp.customize.bind( 'preview-ready', registerHomepageSectionScroll ); 515 516 }( jQuery ) ); -
havenlytics-realty/1.15.0/footer.php
r322064 r334339 3 3 * The footer for our theme 4 4 * 5 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials6 *7 5 * @package Havenlytics_Realty 8 6 */ 7 ?> 8 </div><!-- #content --> 9 9 10 ?> 11 </div><!-- #content --> 12 13 <footer id="colophon" class="hvn-theme-site-footer"> 14 <div class="hvn-theme-container"> 15 <div class="hvn-theme-footer-widgets"> 16 <?php if ( is_active_sidebar( 'footer-1' ) ) : ?> 17 <div class="hvn-theme-footer-widget-area"> 18 <?php dynamic_sidebar( 'footer-1' ); ?> 19 </div> 20 <?php endif; ?> 21 22 <?php if ( is_active_sidebar( 'footer-2' ) ) : ?> 23 <div class="hvn-theme-footer-widget-area"> 24 <?php dynamic_sidebar( 'footer-2' ); ?> 25 </div> 26 <?php endif; ?> 27 28 <?php if ( is_active_sidebar( 'footer-3' ) ) : ?> 29 <div class="hvn-theme-footer-widget-area"> 30 <?php dynamic_sidebar( 'footer-3' ); ?> 31 </div> 32 <?php endif; ?> 33 </div> 34 35 <div class="hvn-theme-site-info"> 36 <div class="hvn-theme-copyright"> 37 <?php echo hvn_realty_get_copyright_text(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> 38 </div> 39 <div class="hvn-theme-credit"> 40 <?php 41 printf( 42 /* translators: %s: WordPress */ 43 esc_html__( 'Powered by %s', 'havenlytics-realty' ), 44 '<a href="' . esc_url( __( 'https://wordpress.org/', 'havenlytics-realty' ) ) . '">WordPress</a>' 45 ); 46 ?> 47 <span class="sep"> | </span> 48 <?php 49 printf( 50 /* translators: %s: Theme name */ 51 esc_html__( 'Theme: %s', 'havenlytics-realty' ), 52 '<a href="' . esc_url( __( 'https://havenlytics.com/', 'havenlytics-realty' ) ) . '">Havenlytics Realty</a>' 53 ); 54 ?> 55 </div> 56 </div><!-- .hvn-theme-site-info --> 57 </div><!-- .hvn-theme-container --> 58 </footer><!-- #colophon --> 10 <footer id="colophon" class="hvn-theme-footer"> 11 <div class="hvn-theme-container"> 12 <?php get_template_part( 'template-parts/footer/widgets' ); ?> 13 <?php get_template_part( 'template-parts/footer/site-info' ); ?> 14 </div> 15 </footer> 59 16 </div><!-- #page --> 60 17 61 <!-- Scroll to Top Button --> 62 <!-- <button id="hvn-scroll-top" class="hvn-scroll-top" aria-label="<?php //esc_attr_e( 'Scroll to top', 'havenlytics-realty' ); ?>"> 63 <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> 64 <polyline points="18 15 12 9 6 15"></polyline> 65 </svg> 66 <span class="screen-reader-text"><?php // esc_html_e( 'Scroll to top', 'havenlytics-realty' ); ?></span> 67 </button> --> 18 <?php get_template_part( 'template-parts/footer/back-to-top' ); ?> 68 19 69 20 <?php wp_footer(); ?> -
havenlytics-realty/1.15.0/functions.php
r330492 r334339 7 7 8 8 if ( ! defined( 'HVN_REALTY_VERSION' ) ) { 9 define( 'HVN_REALTY_VERSION', '1. 0.5' );9 define( 'HVN_REALTY_VERSION', '1.15.0' ); 10 10 } 11 11 … … 29 29 add_image_size( 'hvn-realty-blog', 800, 450, true ); 30 30 add_image_size( 'hvn-realty-featured', 1200, 600, true ); 31 add_post_type_support( ' property', 'thumbnail' );31 add_post_type_support( 'hvnly_property', 'thumbnail' ); 32 32 33 33 … … 68 68 add_theme_support( 'align-wide' ); 69 69 add_theme_support( 'wp-block-styles' ); 70 71 add_theme_support( 72 'custom-background', 73 array( 74 'default-color' => 'f8f9fa', 75 ) 76 ); 77 78 // Add editor styles 79 add_editor_style( 'assets/css/editor-style.css' ); 70 add_theme_support( 'appearance-tools' ); 71 72 add_editor_style( 'assets/css/editor.css' ); 80 73 } 81 74 add_action( 'after_setup_theme', 'hvn_realty_setup' ); … … 85 78 */ 86 79 function hvn_realty_content_width() { 87 $GLOBALS['content_width'] = apply_filters( 'hvn_realty_content_width', 1200 ); 80 $container = absint( get_theme_mod( 'hvn_realty_container_width', 1280 ) ); 81 if ( $container < 960 ) { 82 $container = 1280; 83 } 84 $GLOBALS['content_width'] = apply_filters( 'hvn_realty_content_width', $container ); 88 85 } 89 86 add_action( 'after_setup_theme', 'hvn_realty_content_width', 0 ); … … 105 102 ); 106 103 107 for ( $i = 1; $i <= 3; $i++ ) {104 for ( $i = 1; $i <= 4; $i++ ) { 108 105 register_sidebar( 109 106 array( … … 123 120 add_action( 'widgets_init', 'hvn_realty_widgets_init' ); 124 121 122 function hvn_realty_font_preconnect() { 123 if ( is_admin() ) { 124 return; 125 } 126 127 $families = hvn_realty_get_google_font_families(); 128 if ( empty( $families ) ) { 129 return; 130 } 131 132 echo '<link rel="preconnect" href="https://fonts.googleapis.com">' . "\n"; 133 echo '<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>' . "\n"; 134 } 135 add_action( 'wp_head', 'hvn_realty_font_preconnect', 1 ); 136 137 /** 138 * Inline preloader styles for first paint. 139 * 140 * @return void 141 */ 142 function hvn_realty_preloader_inline_css() { 143 if ( is_admin() || ! function_exists( 'hvn_realty_show_preloader' ) || ! hvn_realty_show_preloader() ) { 144 return; 145 } 146 147 echo '<style id="hvn-realty-preloader-critical">body.hvn-theme-is-loading{overflow:hidden}.hvn-theme-preloader{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;background:#fff}</style>' . "\n"; 148 } 149 add_action( 'wp_head', 'hvn_realty_preloader_inline_css', 2 ); 150 125 151 /** 126 152 * Enqueue scripts and styles. 127 153 */ 128 154 function hvn_realty_scripts() { 129 // Enqueue Google Fonts 155 $font_deps = array(); 156 $font_handle = hvn_realty_enqueue_google_fonts(); 157 if ( $font_handle ) { 158 $font_deps[] = $font_handle; 159 } 160 130 161 wp_enqueue_style( 131 'hvn-realty-fonts', 132 'https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap', 162 'hvn-realty-theme', 163 HVN_REALTY_TEMPLATE_URL . '/assets/css/theme.css', 164 $font_deps, 165 HVN_REALTY_VERSION 166 ); 167 168 wp_enqueue_style( 169 'hvn-realty-polish', 170 HVN_REALTY_TEMPLATE_URL . '/assets/css/polish.css', 171 array( 'hvn-realty-theme' ), 172 HVN_REALTY_VERSION 173 ); 174 175 wp_enqueue_style( 176 'hvn-realty-layouts', 177 HVN_REALTY_TEMPLATE_URL . '/assets/css/layouts.css', 178 array( 'hvn-realty-polish' ), 179 HVN_REALTY_VERSION 180 ); 181 182 wp_enqueue_style( 183 'hvn-realty-style', 184 get_stylesheet_uri(), 185 array( 'hvn-realty-layouts' ), 186 HVN_REALTY_VERSION 187 ); 188 189 wp_enqueue_script( 190 'hvn-realty-theme-js', 191 HVN_REALTY_TEMPLATE_URL . '/assets/js/theme.js', 133 192 array(), 134 HVN_REALTY_VERSION135 );136 137 // Base CSS138 wp_enqueue_style( 'hvn-realty-variables', HVN_REALTY_TEMPLATE_URL . '/assets/css/base/variables.css', array(), HVN_REALTY_VERSION );139 wp_enqueue_style( 'hvn-realty-reset', HVN_REALTY_TEMPLATE_URL . '/assets/css/base/reset.css', array(), HVN_REALTY_VERSION );140 wp_enqueue_style( 'hvn-realty-typography', HVN_REALTY_TEMPLATE_URL . '/assets/css/base/typography.css', array(), HVN_REALTY_VERSION );141 142 // Layouts143 wp_enqueue_style( 'hvn-realty-grid', HVN_REALTY_TEMPLATE_URL . '/assets/css/layouts/grid.css', array(), HVN_REALTY_VERSION );144 145 // Components146 wp_enqueue_style( 'hvn-realty-breadcrumbs', HVN_REALTY_TEMPLATE_URL . '/assets/css/components/breadcrumbs.css', array(), HVN_REALTY_VERSION );147 wp_enqueue_style( 'hvn-realty-buttons', HVN_REALTY_TEMPLATE_URL . '/assets/css/components/buttons.css', array(), HVN_REALTY_VERSION );148 wp_enqueue_style( 'hvn-realty-cards', HVN_REALTY_TEMPLATE_URL . '/assets/css/components/cards.css', array(), HVN_REALTY_VERSION );149 wp_enqueue_style( 'hvn-realty-forms', HVN_REALTY_TEMPLATE_URL . '/assets/css/components/forms.css', array(), HVN_REALTY_VERSION );150 wp_enqueue_style( 'hvn-realty-pagination', HVN_REALTY_TEMPLATE_URL . '/assets/css/components/pagination.css', array(), HVN_REALTY_VERSION );151 wp_enqueue_style( 'hvn-realty-widgets', HVN_REALTY_TEMPLATE_URL . '/assets/css/components/widgets.css', array(), HVN_REALTY_VERSION );152 153 // Layout specific154 wp_enqueue_style( 'hvn-realty-header', HVN_REALTY_TEMPLATE_URL . '/assets/css/layouts/header.css', array(), HVN_REALTY_VERSION );155 wp_enqueue_style( 'hvn-realty-navigation', HVN_REALTY_TEMPLATE_URL . '/assets/css/layouts/navigation.css', array(), HVN_REALTY_VERSION );156 wp_enqueue_style( 'hvn-realty-content', HVN_REALTY_TEMPLATE_URL . '/assets/css/layouts/content.css', array(), HVN_REALTY_VERSION );157 wp_enqueue_style( 'hvn-realty-sidebar', HVN_REALTY_TEMPLATE_URL . '/assets/css/layouts/sidebar.css', array(), HVN_REALTY_VERSION );158 wp_enqueue_style( 'hvn-realty-comments', HVN_REALTY_TEMPLATE_URL . '/assets/css/layouts/comments.css', array(), HVN_REALTY_VERSION );159 wp_enqueue_style( 'hvn-realty-footer', HVN_REALTY_TEMPLATE_URL . '/assets/css/layouts/footer.css', array(), HVN_REALTY_VERSION );160 161 // Page specific162 wp_enqueue_style( 'hvn-realty-archive', HVN_REALTY_TEMPLATE_URL . '/assets/css/pages/archive.css', array(), HVN_REALTY_VERSION );163 wp_enqueue_style( 'hvn-realty-single', HVN_REALTY_TEMPLATE_URL . '/assets/css/pages/single.css', array(), HVN_REALTY_VERSION );164 wp_enqueue_style( 'hvn-realty-404', HVN_REALTY_TEMPLATE_URL . '/assets/css/pages/404.css', array(), HVN_REALTY_VERSION );165 wp_enqueue_style( 'hvn-realty-search', HVN_REALTY_TEMPLATE_URL . '/assets/css/pages/search.css', array(), HVN_REALTY_VERSION );166 wp_enqueue_style( 'hvn-realty-blog', HVN_REALTY_TEMPLATE_URL . '/assets/css/pages/blog.css', array(), HVN_REALTY_VERSION );167 168 // Utilities169 wp_enqueue_style( 'hvn-realty-accessibility', HVN_REALTY_TEMPLATE_URL . '/assets/css/utilities/accessibility.css', array(), HVN_REALTY_VERSION );170 wp_enqueue_style( 'hvn-realty-responsive', HVN_REALTY_TEMPLATE_URL . '/assets/css/utilities/responsive.css', array(), HVN_REALTY_VERSION );171 wp_enqueue_style( 'hvn-realty-print', HVN_REALTY_TEMPLATE_URL . '/assets/css/utilities/print.css', array(), HVN_REALTY_VERSION );172 173 // Main style.css (required for WordPress themes)174 wp_enqueue_style( 'hvn-realty-style', get_stylesheet_uri(), array(), HVN_REALTY_VERSION );175 176 // Navigation script - jQuery loaded as dependency (not direct enqueue)177 wp_enqueue_script(178 'hvn-realty-navigation',179 HVN_REALTY_TEMPLATE_URL . '/assets/js/navigation.js',180 array( 'jquery' ),181 193 HVN_REALTY_VERSION, 182 194 true 183 195 ); 184 196 185 // Main script - jQuery loaded as dependency (not direct enqueue)186 wp_enqueue_script(187 'hvn-realty-main',188 HVN_REALTY_TEMPLATE_URL . '/assets/js/main.js',189 array( 'jquery' ),190 HVN_REALTY_VERSION,191 true192 );193 194 // Localize script for AJAX and text strings195 197 wp_localize_script( 196 'hvn-realty- main',198 'hvn-realty-theme-js', 197 199 'hvnRealty', 198 200 array( 199 'ajaxUrl' => admin_url( 'admin-ajax.php' ),201 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 200 202 'toggleSubmenuText' => esc_html__( 'Toggle submenu', 'havenlytics-realty' ), 201 203 ) … … 208 210 } 209 211 add_action( 'wp_enqueue_scripts', 'hvn_realty_scripts' ); 212 213 /** 214 * Load context-specific layout styles (blog vs page vs single). 215 */ 216 function hvn_realty_enqueue_context_layouts() { 217 if ( function_exists( 'hvn_realty_should_show_realty_home' ) && hvn_realty_should_show_realty_home() ) { 218 return; 219 } 220 221 if ( function_exists( 'hvn_realty_is_plugin_shortcode_page' ) && hvn_realty_is_plugin_shortcode_page() ) { 222 return; 223 } 224 225 if ( is_page() || is_404() ) { 226 wp_enqueue_style( 227 'hvn-realty-page', 228 HVN_REALTY_TEMPLATE_URL . '/assets/css/page.css', 229 array( 'hvn-realty-layouts' ), 230 HVN_REALTY_VERSION 231 ); 232 } 233 234 if ( is_home() || is_archive() || is_search() ) { 235 wp_enqueue_style( 236 'hvn-realty-blog', 237 HVN_REALTY_TEMPLATE_URL . '/assets/css/blog.css', 238 array( 'hvn-realty-layouts' ), 239 HVN_REALTY_VERSION 240 ); 241 } 242 243 if ( is_single() ) { 244 wp_enqueue_style( 245 'hvn-realty-single', 246 HVN_REALTY_TEMPLATE_URL . '/assets/css/single.css', 247 array( 'hvn-realty-layouts' ), 248 HVN_REALTY_VERSION 249 ); 250 } 251 } 252 add_action( 'wp_enqueue_scripts', 'hvn_realty_enqueue_context_layouts', 20 ); 253 254 /** 255 * Load Google Fonts in the block editor. 256 */ 257 function hvn_realty_editor_fonts() { 258 hvn_realty_enqueue_google_fonts(); 259 } 260 add_action( 'enqueue_block_editor_assets', 'hvn_realty_editor_fonts', 5 ); 210 261 211 262 /** … … 282 333 function hvn_realty_pagination_markup( $template ) { 283 334 return ' 284 <nav class="navigation %1$s" role="navigation" aria-label="%4$s">335 <nav class="navigation hvn-theme-pagination %1$s" role="navigation" aria-label="%4$s"> 285 336 <h2 class="screen-reader-text">%2$s</h2> 286 337 <div class="nav-links hvn-theme-pagination-links">%3$s</div> … … 296 347 */ 297 348 function hvn_realty_get_sidebar_position() { 298 return get_theme_mod( 'hvn_realty_sidebar_position', ' right' );349 return get_theme_mod( 'hvn_realty_sidebar_position', 'none' ); 299 350 } 300 351 … … 434 485 435 486 /** 436 * Output inline CSS for blog columns using wp_add_inline_style437 */438 function hvn_realty_add_inline_blog_css() {439 // Only add on pages that display posts440 if ( ! is_home() && ! is_archive() && ! is_search() ) {441 return;442 }443 444 $blog_layout = hvn_realty_get_blog_layout();445 $blog_columns = hvn_realty_get_blog_columns();446 $sidebar_position = hvn_realty_get_sidebar_position();447 448 // Force columns to be between 1 and 4449 $blog_columns = max(1, min(4, intval($blog_columns)));450 451 // If list layout, force 1 column452 if ( 'list' === $blog_layout ) {453 $blog_columns = 1;454 }455 456 // Generate column CSS based on sidebar presence457 $has_sidebar = is_active_sidebar( 'sidebar-1' ) && 'none' !== $sidebar_position;458 459 // Calculate responsive columns460 $tablet_columns = $blog_columns > 2 ? 2 : $blog_columns;461 $mobile_columns = 1;462 463 $inline_css = '464 /* Force blog grid columns - Override any other styles */465 .hvn-theme-posts-grid {466 display: grid !important;467 grid-template-columns: repeat(' . esc_attr($blog_columns) . ', minmax(0, 1fr)) !important;468 gap: 2rem !important;469 }470 471 /* Tablet view */472 @media (max-width: 991px) {473 .hvn-theme-posts-grid {474 grid-template-columns: repeat(' . esc_attr($tablet_columns) . ', minmax(0, 1fr)) !important;475 }476 }477 478 /* Mobile view */479 @media (max-width: 576px) {480 .hvn-theme-posts-grid {481 grid-template-columns: repeat(' . esc_attr($mobile_columns) . ', minmax(0, 1fr)) !important;482 }483 }484 485 /* Make sure post cards fill their grid cells */486 .hvn-theme-post-card {487 width: 100% !important;488 max-width: 100% !important;489 margin: 0 !important;490 }';491 492 // List layout override493 if ('list' === $blog_layout) {494 $inline_css .= '495 .hvn-theme-posts-grid {496 display: block !important;497 }498 499 .hvn-theme-post-card {500 display: grid !important;501 grid-template-columns: 280px 1fr !important;502 margin-bottom: 2rem !important;503 }504 505 @media (max-width: 768px) {506 .hvn-theme-post-card {507 grid-template-columns: 1fr !important;508 }509 }';510 }511 512 // Add the inline style to the main theme stylesheet513 wp_add_inline_style( 'hvn-realty-style', $inline_css );514 }515 add_action( 'wp_enqueue_scripts', 'hvn_realty_add_inline_blog_css', 999 );516 517 /**518 * Add customizer dynamic styles using wp_add_inline_style519 */520 function hvn_realty_add_customizer_inline_css() {521 $primary_color = get_theme_mod( 'hvn_realty_primary_color', '#6C60FE' );522 $body_font_size = get_theme_mod( 'hvn_realty_body_font_size', '16' );523 $sidebar_position = hvn_realty_get_sidebar_position();524 $overlay_opacity = get_theme_mod( 'hvn_realty_header_overlay_opacity', '0' );525 $header_image = get_header_image();526 527 if ( ! $primary_color ) {528 $primary_color = '#6C60FE';529 }530 531 if ( ! $body_font_size ) {532 $body_font_size = '16';533 }534 535 // Get the darken and lighten colors536 $primary_dark = hvn_realty_darken_color( $primary_color, 10 );537 $primary_light = hvn_realty_lighten_color( $primary_color, 20 );538 539 $custom_css = '540 :root {541 --hvn-theme-brand-primary: ' . esc_attr( $primary_color ) . ';542 --hvn-theme-brand-primary-dark: ' . esc_attr( $primary_dark ) . ';543 --hvn-theme-brand-primary-light: ' . esc_attr( $primary_light ) . ';544 --hvn-theme-font-size-md: ' . absint( $body_font_size ) . 'px;545 }546 547 /* Header base styles - Default white background */548 .hvn-theme-site-header {549 position: relative;550 background: #ffffff;551 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);552 }553 554 .hvn-theme-site-title a,555 .hvn-theme-site-description,556 .hvn-theme-main-navigation .hvn-theme-nav-menu > li > a,557 .hvn-theme-search-toggle {558 transition: color 0.3s ease;559 }560 561 .hvn-theme-menu-toggle .hamburger,562 .hvn-theme-menu-toggle .hamburger::before,563 .hvn-theme-menu-toggle .hamburger::after {564 transition: background-color 0.3s ease;565 }566 567 .hvn-theme-nav-menu .menu-item-has-children > a {568 position: relative;569 }570 571 .hvn-theme-nav-menu .menu-item-has-children > a::after {572 content: "▼";573 font-size: 10px;574 margin-left: 5px;575 display: inline-block;576 transition: transform 0.3s ease;577 }578 579 .hvn-theme-nav-menu .menu-item-has-children:hover > a::after {580 transform: rotate(180deg);581 }';582 583 // Header image and overlay styles (only if header image exists)584 if ( ! empty( $header_image ) ) {585 $custom_css .= '586 .hvn-theme-site-header {587 background-image: url(' . esc_url( $header_image ) . ');588 background-size: cover;589 background-position: center;590 }591 592 .hvn-theme-site-header::before {593 content: "";594 position: absolute;595 top: 0;596 left: 0;597 right: 0;598 bottom: 0;599 background: rgba(0, 0, 0, ' . esc_attr( $overlay_opacity ) . ');600 z-index: 1;601 pointer-events: none;602 }603 604 .hvn-theme-site-header .hvn-theme-container,605 .hvn-theme-site-header .hvn-theme-header-inner,606 .hvn-theme-site-branding,607 .hvn-theme-main-navigation,608 .hvn-theme-header-actions {609 position: relative;610 z-index: 2;611 }';612 } else {613 // When no header image, ensure no overlay pseudo-element614 $custom_css .= '615 .hvn-theme-site-header::before {616 display: none;617 }';618 }619 620 // Sidebar position styles621 if ( 'none' === $sidebar_position ) {622 $custom_css .= '623 .hvn-theme-sidebar-area {624 display: none !important;625 }626 .hvn-theme-content-area {627 grid-column: span 12 !important;628 margin: 0 auto;629 }';630 }631 632 if ( 'left' === $sidebar_position && is_active_sidebar( 'sidebar-1' ) ) {633 $custom_css .= '634 @media (min-width: 992px) {635 .hvn-theme-content-area {636 grid-column: span 8 !important;637 order: 2 !important;638 }639 .hvn-theme-sidebar-area {640 grid-column: span 4 !important;641 order: 1 !important;642 }643 }';644 }645 646 wp_add_inline_style( 'hvn-realty-style', $custom_css );647 }648 add_action( 'wp_enqueue_scripts', 'hvn_realty_add_customizer_inline_css', 10 );649 650 /**651 * Darken a color.652 *653 * @param string $hex The hex color code.654 * @param int $percent The percentage to darken.655 * @return string Darkened hex color.656 */657 function hvn_realty_darken_color( $hex, $percent ) {658 $hex = ltrim( $hex, '#' );659 660 // Handle 3-digit hex661 if ( strlen( $hex ) === 3 ) {662 $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];663 }664 665 $r = hexdec( substr( $hex, 0, 2 ) );666 $g = hexdec( substr( $hex, 2, 2 ) );667 $b = hexdec( substr( $hex, 4, 2 ) );668 669 $r = max( 0, $r - ( $r * $percent / 100 ) );670 $g = max( 0, $g - ( $g * $percent / 100 ) );671 $b = max( 0, $b - ( $b * $percent / 100 ) );672 673 return sprintf( '#%02x%02x%02x', $r, $g, $b );674 }675 676 /**677 * Lighten a color.678 *679 * @param string $hex The hex color code.680 * @param int $percent The percentage to lighten.681 * @return string Lightened hex color.682 */683 function hvn_realty_lighten_color( $hex, $percent ) {684 $hex = ltrim( $hex, '#' );685 686 // Handle 3-digit hex687 if ( strlen( $hex ) === 3 ) {688 $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];689 }690 691 $r = hexdec( substr( $hex, 0, 2 ) );692 $g = hexdec( substr( $hex, 2, 2 ) );693 $b = hexdec( substr( $hex, 4, 2 ) );694 695 $r = min( 255, $r + ( ( 255 - $r ) * $percent / 100 ) );696 $g = min( 255, $g + ( ( 255 - $g ) * $percent / 100 ) );697 $b = min( 255, $b + ( ( 255 - $b ) * $percent / 100 ) );698 699 return sprintf( '#%02x%02x%02x', $r, $g, $b );700 }701 702 /**703 487 * Load required files. 704 488 */ 489 require get_template_directory() . '/inc/customizer/loader.php'; 490 require get_template_directory() . '/inc/plugin-hooks.php'; 491 require get_template_directory() . '/inc/integrations/havenlytics/bootstrap.php'; 492 require get_template_directory() . '/inc/setup/theme-launch.php'; 493 require get_template_directory() . '/inc/setup/theme-menus.php'; 494 require get_template_directory() . '/inc/setup/theme-footer-widgets.php'; 495 require get_template_directory() . '/inc/elementor.php'; 705 496 require get_template_directory() . '/inc/custom-header.php'; 706 497 require get_template_directory() . '/inc/template-tags.php'; 498 require get_template_directory() . '/inc/layout.php'; 707 499 require get_template_directory() . '/inc/template-functions.php'; 708 500 require get_template_directory() . '/inc/customizer.php'; 709 require get_template_directory() . '/inc/breadcrumbs.php'; 501 require get_template_directory() . '/inc/breadcrumbs.php'; 502 require get_template_directory() . '/inc/admin/realty-admin.php'; 503 require get_template_directory() . '/inc/admin/theme-welcome-notice.php'; 710 504 711 505 if ( defined( 'JETPACK__VERSION' ) ) { 712 require get_template_directory() . '/inc/jetpack.php';506 require get_template_directory() . '/inc/jetpack.php'; 713 507 } 714 508 715 509 require get_template_directory() . '/inc/class-hvn-realty-walker-nav-menu.php'; 716 717 718 /**719 * TGM plugin activation720 */721 require get_template_directory() . '/inc/tgmpa/class-tgm-plugin-activation.php';722 723 /**724 * Theme required plugin725 */726 require get_template_directory() . '/inc/tgmpa/recommended-plugins.php'; -
havenlytics-realty/1.15.0/header.php
r326407 r334339 3 3 * The header for our theme 4 4 * 5 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials6 *7 5 * @package Havenlytics_Realty 8 6 */ 9 7 8 $header_classes = array( 'hvn-theme-header' ); 10 9 ?> 11 10 <!doctype html> 12 11 <html <?php language_attributes(); ?>> 13 14 12 <head> 15 <meta charset="<?php bloginfo('charset'); ?>">16 <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">17 <link rel="profile" href="https://gmpg.org/xfn/11">18 <?php wp_head(); ?>13 <meta charset="<?php bloginfo( 'charset' ); ?>"> 14 <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> 15 <link rel="profile" href="https://gmpg.org/xfn/11"> 16 <?php wp_head(); ?> 19 17 </head> 20 18 21 <body <?php body_class(); ?>> 22 <?php wp_body_open(); ?> 19 <body <?php body_class(); ?><?php hvn_realty_body_layout_attrs(); ?>> 20 <?php wp_body_open(); ?> 21 <?php get_template_part( 'template-parts/header/preloader' ); ?> 23 22 24 <div id="page" class="hvn-theme-site">25 <a class="skip-link screen-reader-text" href="#primary">26 <?php esc_html_e('Skip to content', 'havenlytics-realty'); ?>27 </a>23 <div id="page" class="hvn-theme-site"> 24 <a class="skip-link screen-reader-text" href="#primary"> 25 <?php esc_html_e( 'Skip to content', 'havenlytics-realty' ); ?> 26 </a> 28 27 29 <header id="masthead" class="hvn-theme-site-header"> 30 <div class="hvn-theme-container"> 31 <div class="hvn-theme-header-inner"> 32 <div class="hvn-theme-site-branding"> 33 <?php if (has_custom_logo()) : ?> 34 <div class="hvn-theme-custom-logo"> 35 <?php the_custom_logo(); ?> 36 </div> 37 <?php else : ?> 38 <?php if (is_front_page() && is_home()) : ?> 39 <h1 class="hvn-theme-site-title"> 40 <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"> 41 <?php bloginfo('name'); ?> 42 </a> 43 </h1> 44 <?php else : ?> 45 <p class="hvn-theme-site-title"> 46 <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"> 47 <?php bloginfo('name'); ?> 48 </a> 49 </p> 50 <?php endif; ?> 51 <?php endif; ?> 52 </div><!-- .hvn-theme-site-branding --> 28 <header id="masthead" class="<?php echo esc_attr( implode( ' ', $header_classes ) ); ?>"> 29 <div class="hvn-theme-container"> 30 <div class="hvn-theme-header-row"> 31 <?php get_template_part( 'template-parts/header/branding' ); ?> 32 <?php get_template_part( 'template-parts/header/navigation' ); ?> 33 <?php get_template_part( 'template-parts/header/actions' ); ?> 34 </div> 35 </div> 36 </header> 53 37 54 <!-- DESKTOP NAVIGATION --> 55 <nav id="site-navigation" class="hvn-theme-main-navigation" 56 aria-label="<?php esc_attr_e('Main Navigation', 'havenlytics-realty'); ?>"> 57 <?php 58 if (has_nav_menu('primary')) { 59 wp_nav_menu( 60 array( 61 'theme_location' => 'primary', 62 'menu_id' => 'primary-menu', 63 'menu_class' => 'hvn-theme-nav-menu', 64 'container' => false, 65 'fallback_cb' => '__return_false', 66 'depth' => 3, 67 'walker' => new HVN_Realty_Walker_Nav_Menu(), 68 ) 69 ); 70 } else { 71 hvn_realty_primary_menu_fallback(); 72 } 73 ?> 74 </nav><!-- #site-navigation --> 38 <?php get_template_part( 'template-parts/header/mobile-menu' ); ?> 39 <?php get_template_part( 'template-parts/header/property-search-panel' ); ?> 75 40 76 <!-- HEADER ACTIONS (Mobile Menu Toggle + Search) --> 77 <div class="hvn-theme-header-actions"> 78 <button class="hvn-theme-menu-toggle" 79 aria-label="<?php esc_attr_e('Menu', 'havenlytics-realty'); ?>"> 80 <span class="hamburger"></span> 81 <span class="screen-reader-text"><?php esc_html_e('Menu', 'havenlytics-realty'); ?></span> 82 </button> 83 84 <button class="hvn-theme-search-toggle" 85 aria-label="<?php esc_attr_e('Search', 'havenlytics-realty'); ?>"> 86 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" 87 fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" 88 stroke-linejoin="round"> 89 <circle cx="11" cy="11" r="8"></circle> 90 <line x1="21" y1="21" x2="16.65" y2="16.65"></line> 91 </svg> 92 <span class="screen-reader-text"><?php esc_html_e('Search', 'havenlytics-realty'); ?></span> 93 </button> 94 </div> 95 </div><!-- .hvn-theme-header-inner --> 96 </div><!-- .hvn-theme-container --> 97 </header><!-- #masthead --> 98 99 <!-- MOBILE MENU (Hidden on desktop) --> 100 <div class="hvn-theme-mobile-menu" id="hvn-mobile-menu"> 101 <div class="hvn-theme-mobile-menu-header"> 102 <div class="hvn-theme-mobile-menu-title"> 103 <?php echo esc_html(get_bloginfo('name')); ?> 104 </div> 105 <button class="hvn-theme-mobile-menu-close" 106 aria-label="<?php esc_attr_e('Close Menu', 'havenlytics-realty'); ?>"> 107 <span aria-hidden="true">×</span> 108 <span class="screen-reader-text"><?php esc_html_e('Close Menu', 'havenlytics-realty'); ?></span> 109 </button> 110 </div> 111 <div class="hvn-theme-mobile-menu-content"> 112 <?php 113 if (has_nav_menu('primary')) { 114 wp_nav_menu( 115 array( 116 'theme_location' => 'primary', 117 'menu_class' => 'hvn-theme-mobile-nav-menu', 118 'container' => false, 119 'fallback_cb' => '__return_false', 120 'depth' => 3, 121 ) 122 ); 123 } else { 124 hvn_realty_mobile_menu_fallback(); 125 } 126 ?> 127 </div> 128 </div> 129 <div class="hvn-theme-mobile-overlay"></div> 130 131 <!-- SEARCH OVERLAY --> 132 <div class="hvn-theme-search-overlay"> 133 <div class="hvn-theme-search-overlay-inner"> 134 <button class="hvn-theme-search-close" 135 aria-label="<?php esc_attr_e('Close search', 'havenlytics-realty'); ?>"> 136 <span aria-hidden="true">×</span> 137 </button> 138 <?php get_search_form(); ?> 139 </div> 140 </div> 141 142 <div id="content" class="hvn-theme-site-content"> 41 <div id="content" class="hvn-theme-content"> -
havenlytics-realty/1.15.0/inc/breadcrumbs.php
r322094 r334339 40 40 41 41 // Open breadcrumb container with schema markup 42 $output .= '<nav class="hvn- breadcrumb-wrapper" aria-label="' . esc_attr__( 'Breadcrumb', 'havenlytics-realty' ) . '" itemscope itemtype="https://schema.org/BreadcrumbList">';42 $output .= '<nav class="hvn-theme-breadcrumbs hvn-breadcrumb-wrapper" aria-label="' . esc_attr__( 'Breadcrumb', 'havenlytics-realty' ) . '" itemscope itemtype="https://schema.org/BreadcrumbList">'; 43 43 $output .= '<div class="hvn-breadcrumb-container">'; 44 44 $output .= '<div class="hvn-breadcrumb-list">'; … … 46 46 // Position counter for schema 47 47 $position = 1; 48 $schema_items = array(); 49 50 $home_url = home_url( '/' ); 51 $schema_items[] = array( 52 '@type' => 'ListItem', 53 'position' => $position, 54 'name' => $args['home_text'], 55 'item' => $home_url, 56 ); 48 57 49 58 // Home link … … 69 78 $output .= $args['separator']; 70 79 $position++; 71 80 81 $plugin_trail = null; 82 $plugin_handled = false; 83 84 if ( function_exists( 'hvn_realty_breadcrumbs_plugin_integration' ) ) { 85 $plugin_trail = hvn_realty_breadcrumbs_plugin_integration( $args, $position, $schema_items ); 86 if ( null !== $plugin_trail ) { 87 $output .= $plugin_trail; 88 $plugin_handled = true; 89 } 90 } 91 72 92 // Single posts 73 if ( is_single() && ! is_attachment() ) { 93 if ( ! $plugin_handled && is_single() && ! is_attachment() ) { 94 95 $blog_page_id = (int) get_option( 'page_for_posts' ); 96 if ( $blog_page_id && 'post' === get_post_type() ) { 97 $blog_url = get_permalink( $blog_page_id ); 98 $output .= '<span class="hvn-breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">'; 99 $output .= '<a href="' . esc_url( $blog_url ) . '" class="hvn-breadcrumb-link" itemprop="item">'; 100 $output .= '<span itemprop="name">' . esc_html( get_the_title( $blog_page_id ) ) . '</span>'; 101 $output .= '</a>'; 102 $output .= '<meta itemprop="position" content="' . $position . '" />'; 103 $output .= '</span>'; 104 $output .= $args['separator']; 105 $schema_items[] = array( 106 '@type' => 'ListItem', 107 'position' => $position, 108 'name' => get_the_title( $blog_page_id ), 109 'item' => $blog_url, 110 ); 111 $position++; 112 } 74 113 75 114 // Get post type … … 92 131 if ( ! empty( $categories ) ) { 93 132 $category = $categories[0]; 94 $output .= '<span class="hvn-breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">'; 95 $output .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" class="hvn-breadcrumb-link" itemprop="item">'; 133 $cat_url = get_category_link( $category->term_id ); 134 $output .= '<span class="hvn-breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">'; 135 $output .= '<a href="' . esc_url( $cat_url ) . '" class="hvn-breadcrumb-link" itemprop="item">'; 96 136 $output .= '<span itemprop="name">' . esc_html( $category->name ) . '</span>'; 97 137 $output .= '</a>'; … … 99 139 $output .= '</span>'; 100 140 $output .= $args['separator']; 141 $schema_items[] = array( 142 '@type' => 'ListItem', 143 'position' => $position, 144 'name' => $category->name, 145 'item' => $cat_url, 146 ); 101 147 $position++; 102 148 } … … 104 150 // Current post 105 151 if ( $args['show_current'] ) { 152 $output .= '<span class="hvn-breadcrumb-item hvn-breadcrumb-current" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">'; 106 153 $output .= $args['before_current']; 107 154 $output .= '<span itemprop="name">' . esc_html( get_the_title() ) . '</span>'; 108 155 $output .= $args['after_current']; 156 $output .= '<meta itemprop="position" content="' . $position . '" />'; 157 $output .= '</span>'; 158 $schema_items[] = array( 159 '@type' => 'ListItem', 160 'position' => $position, 161 'name' => get_the_title(), 162 ); 109 163 } 110 164 } 111 165 // Pages 112 elseif ( is_page() && ! is_front_page() ) {166 elseif ( ! $plugin_handled && is_page() && ! is_front_page() ) { 113 167 114 168 // Get parent pages … … 148 202 } 149 203 // Category archive 150 elseif ( is_category() ) {204 elseif ( ! $plugin_handled && is_category() ) { 151 205 $current_category = single_cat_title( '', false ); 152 206 $output .= $args['before_current']; … … 155 209 } 156 210 // Tag archive 157 elseif ( is_tag() ) {211 elseif ( ! $plugin_handled && is_tag() ) { 158 212 $current_tag = single_tag_title( '', false ); 159 213 $output .= $args['before_current']; … … 162 216 } 163 217 // Author archive 164 elseif ( is_author() ) {218 elseif ( ! $plugin_handled && is_author() ) { 165 219 $author = get_the_author(); 166 220 $output .= $args['before_current']; … … 169 223 } 170 224 // Search results 171 elseif ( is_search() ) {225 elseif ( ! $plugin_handled && is_search() ) { 172 226 $search_query = get_search_query(); 173 227 $output .= $args['before_current']; … … 176 230 } 177 231 // Date archive 178 elseif ( is_date() ) {232 elseif ( ! $plugin_handled && is_date() ) { 179 233 if ( is_year() ) { 180 234 $year = get_the_time( 'Y' ); … … 222 276 } 223 277 // 404 page 224 elseif ( is_404() ) {278 elseif ( ! $plugin_handled && is_404() ) { 225 279 $output .= $args['before_current']; 226 280 $output .= '<span itemprop="name">' . esc_html__( '404 - Page Not Found', 'havenlytics-realty' ) . '</span>'; … … 228 282 } 229 283 // Post type archive 230 elseif ( is_post_type_archive() ) {284 elseif ( ! $plugin_handled && is_post_type_archive() ) { 231 285 $post_type = get_post_type_object( get_post_type() ); 232 286 if ( $post_type ) { … … 237 291 } 238 292 // Taxonomy archive 239 elseif ( is_tax() ) {293 elseif ( ! $plugin_handled && is_tax() ) { 240 294 $term = get_queried_object(); 241 295 if ( $term ) { … … 246 300 } 247 301 // Attachment page 248 elseif ( is_attachment() ) {302 elseif ( ! $plugin_handled && is_attachment() ) { 249 303 $parent = get_post( $post->post_parent ); 250 304 if ( $parent ) { … … 263 317 } 264 318 // Blog page 265 elseif ( is_home() && ! is_front_page() ) {319 elseif ( ! $plugin_handled && is_home() && ! is_front_page() ) { 266 320 $blog_page_id = get_option( 'page_for_posts' ); 267 321 if ( $blog_page_id ) { … … 272 326 } 273 327 // Default fallback 274 else {328 elseif ( ! $plugin_handled ) { 275 329 $output .= $args['before_current']; 276 330 $output .= '<span itemprop="name">' . esc_html( get_the_title() ) . '</span>'; … … 282 336 $output .= '</div>'; 283 337 $output .= '</nav>'; 338 339 if ( ! empty( $schema_items ) ) { 340 $schema_script = '<script type="application/ld+json">' . wp_json_encode( 341 array( 342 '@context' => 'https://schema.org', 343 '@type' => 'BreadcrumbList', 344 'itemListElement' => $schema_items, 345 ), 346 JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE 347 ) . '</script>'; 348 } else { 349 $schema_script = ''; 350 } 284 351 285 352 // Output or return 286 353 if ( $args['echo'] ) { 287 354 echo wp_kses_post( $output ); 355 if ( $schema_script ) { 356 echo $schema_script; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 357 } 288 358 } else { 289 return $output ;359 return $output . $schema_script; 290 360 } 291 361 } -
havenlytics-realty/1.15.0/inc/custom-header.php
r328418 r334339 1 1 <?php 2 2 /** 3 * Sample implementation of the Custom Header feature 4 * 5 * @link https://developer.wordpress.org/themes/functionality/custom-headers/ 3 * Disable header/background image features (solid colors only). 6 4 * 7 5 * @package Havenlytics_Realty … … 9 7 10 8 /** 11 * Set up the WordPress core custom header feature. 12 * 13 * @uses hvn_realty_header_style() 9 * Disable WordPress core custom header media support. 14 10 */ 15 function hvn_realty_custom_header_setup() { 16 add_theme_support( 17 'custom-header', 18 apply_filters( 19 'hvn_realty_custom_header_args', 20 array( 21 'default-image' => '', 22 'default-text-color' => '1E1E2F', 23 'width' => 1920, 24 'height' => 400, 25 'flex-height' => true, 26 'flex-width' => true, 27 'wp-head-callback' => 'hvn_realty_header_style', 28 'video' => true, 29 ) 30 ) 31 ); 32 33 // Only register default headers if the image exists 34 $default_header = get_template_directory_uri() . '/assets/images/default-header.jpg'; 35 if ( file_exists( get_template_directory() . '/assets/images/default-header.jpg' ) ) { 36 register_default_headers( 37 array( 38 'default-image' => array( 39 'url' => '%s/assets/images/default-header.jpg', 40 'thumbnail_url' => '%s/assets/images/default-header.jpg', 41 'description' => __( 'Default Header Image', 'havenlytics-realty' ), 42 ), 43 ) 44 ); 45 } 11 function hvn_realty_disable_header_media() { 12 remove_theme_support( 'custom-header' ); 46 13 } 47 add_action( 'after_setup_theme', 'hvn_realty_ custom_header_setup');14 add_action( 'after_setup_theme', 'hvn_realty_disable_header_media', 20 ); 48 15 49 if ( ! function_exists( 'hvn_realty_header_style' ) ) : 50 /** 51 * Styles the header image and text displayed on the blog. 52 * Uses wp_add_inline_style instead of direct style output. 53 * 54 * @see hvn_realty_custom_header_setup(). 55 */ 56 function hvn_realty_header_style() { 57 $header_text_color = get_header_textcolor(); 58 $header_image = get_header_image(); 59 $overlay_opacity = get_theme_mod( 'hvn_realty_header_overlay_opacity', '0' ); 60 61 $custom_css = ''; 62 63 // Header text color styles 64 if ( ! display_header_text() ) { 65 $custom_css .= ' 66 .hvn-theme-site-title, 67 .hvn-theme-site-description, 68 .hvn-theme-main-navigation .hvn-theme-nav-menu > li > a, 69 .hvn-theme-search-toggle, 70 .hvn-theme-menu-toggle .hamburger, 71 .hvn-theme-menu-toggle .hamburger::before, 72 .hvn-theme-menu-toggle .hamburger::after { 73 position: absolute; 74 clip: rect(1px, 1px, 1px, 1px); 75 }'; 76 } elseif ( ! empty( $header_text_color ) && '#1E1E2F' !== $header_text_color ) { 77 $custom_css .= ' 78 .hvn-theme-site-title a, 79 .hvn-theme-site-description { 80 color: #' . esc_attr( $header_text_color ) . '; 81 } 82 83 .hvn-theme-main-navigation .hvn-theme-nav-menu > li > a { 84 color: #' . esc_attr( $header_text_color ) . '; 85 } 86 87 .hvn-theme-search-toggle { 88 color: #' . esc_attr( $header_text_color ) . '; 89 } 90 91 .hvn-theme-menu-toggle .hamburger, 92 .hvn-theme-menu-toggle .hamburger::before, 93 .hvn-theme-menu-toggle .hamburger::after { 94 background-color: #' . esc_attr( $header_text_color ) . '; 95 } 96 97 .hvn-theme-nav-menu .menu-item-has-children > a::after { 98 color: #' . esc_attr( $header_text_color ) . '; 99 }'; 100 } 101 102 // Header image and overlay styles (only if header image exists) 103 if ( ! empty( $header_image ) ) { 104 $custom_css .= ' 105 .hvn-theme-site-header { 106 background-image: url(' . esc_url( $header_image ) . '); 107 background-size: cover; 108 background-position: center; 109 position: relative; 110 } 111 112 .hvn-theme-site-header::before { 113 content: ""; 114 position: absolute; 115 top: 0; 116 left: 0; 117 right: 0; 118 bottom: 0; 119 background: rgba(0, 0, 0, ' . esc_attr( $overlay_opacity ) . '); 120 z-index: 1; 121 } 122 123 .hvn-theme-site-header .hvn-theme-container, 124 .hvn-theme-site-header .hvn-theme-header-inner, 125 .hvn-theme-site-branding, 126 .hvn-theme-main-navigation, 127 .hvn-theme-header-actions { 128 position: relative; 129 z-index: 2; 130 }'; 131 } 132 133 // Add inline styles if we have any 134 if ( ! empty( $custom_css ) ) { 135 wp_add_inline_style( 'hvn-realty-style', $custom_css ); 136 } 137 } 138 endif; 139 add_action( 'wp_enqueue_scripts', 'hvn_realty_header_style', 11 ); 140 141 if ( ! function_exists( 'hvn_realty_header_video_settings' ) ) : 142 /** 143 * Custom header video settings. 144 * 145 * @param array $settings Video settings. 146 * @return array 147 */ 148 function hvn_realty_header_video_settings( $settings ) { 149 $settings['l10n']['play'] = __( 'Play', 'havenlytics-realty' ); 150 $settings['l10n']['pause'] = __( 'Pause', 'havenlytics-realty' ); 151 return $settings; 152 } 153 endif; 154 add_filter( 'header_video_settings', 'hvn_realty_header_video_settings' ); 16 /** 17 * Disable WordPress custom background image (keep color via Global Design). 18 */ 19 function hvn_realty_disable_background_image() { 20 remove_theme_support( 'custom-background' ); 21 } 22 add_action( 'after_setup_theme', 'hvn_realty_disable_background_image', 20 ); -
havenlytics-realty/1.15.0/inc/customizer.php
r328418 r334339 1 1 <?php 2 2 /** 3 * Havenlytics Realty Theme Customizer 3 * Havenlytics Realty Theme Customizer — core WordPress settings only. 4 * 5 * All theme options live under Appearance → Customize → Havenlytics Theme Settings. 4 6 * 5 7 * @package Havenlytics_Realty … … 7 9 8 10 /** 9 * Add postMessage support for site title and description for the Theme Customizer.11 * PostMessage support for site identity fields. 10 12 * 11 13 * @param WP_Customize_Manager $wp_customize Theme Customizer object. 12 14 */ 13 15 function hvn_realty_customize_register( $wp_customize ) { 14 15 // Site title and description 16 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 17 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 18 $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 19 20 // Selective refresh 21 if ( isset( $wp_customize->selective_refresh ) ) { 22 $wp_customize->selective_refresh->add_partial( 23 'blogname', 24 array( 25 'selector' => '.hvn-theme-site-title a', 26 'render_callback' => 'hvn_realty_customize_partial_blogname', 27 ) 28 ); 29 $wp_customize->selective_refresh->add_partial( 30 'blogdescription', 31 array( 32 'selector' => '.hvn-theme-site-description', 33 'render_callback' => 'hvn_realty_customize_partial_blogdescription', 34 ) 35 ); 36 } 37 38 // ============================================ 39 // COLORS SECTION 40 // ============================================ 41 42 $wp_customize->add_setting( 43 'hvn_realty_primary_color', 44 array( 45 'default' => '#6C60FE', 46 'sanitize_callback' => 'sanitize_hex_color', 47 'transport' => 'postMessage', 48 ) 49 ); 50 51 $wp_customize->add_control( 52 new WP_Customize_Color_Control( 53 $wp_customize, 54 'hvn_realty_primary_color', 55 array( 56 'label' => esc_html__( 'Primary Color', 'havenlytics-realty' ), 57 'section' => 'colors', 58 'settings' => 'hvn_realty_primary_color', 59 ) 60 ) 61 ); 62 63 // ============================================ 64 // HEADER OVERLAY SECTION 65 // ============================================ 66 67 // ============================================ 68 // HEADER OVERLAY SECTION 69 // ============================================ 70 71 $wp_customize->add_setting( 72 'hvn_realty_header_overlay_opacity', 73 array( 74 'default' => '0', // Changed from '0.6' to '0' 75 'sanitize_callback' => 'hvn_realty_sanitize_float', 76 'transport' => 'postMessage', 77 ) 78 ); 79 80 $wp_customize->add_control( 81 'hvn_realty_header_overlay_opacity', 82 array( 83 'label' => esc_html__( 'Header Overlay Opacity', 'havenlytics-realty' ), 84 'description' => esc_html__( 'Set the darkness of the overlay on header background image (0 = transparent, 1 = black).', 'havenlytics-realty' ), 85 'section' => 'header_image', 86 'type' => 'range', 87 'input_attrs' => array( 88 'min' => 0, 89 'max' => 1, 90 'step' => 0.1, 91 ), 92 ) 93 ); 94 95 // ============================================ 96 // LAYOUT SECTION 97 // ============================================ 98 99 $wp_customize->add_section( 100 'hvn_realty_layout', 101 array( 102 'title' => esc_html__( 'Layout Options', 'havenlytics-realty' ), 103 'priority' => 30, 104 'description' => esc_html__( 'Customize the layout of your site.', 'havenlytics-realty' ), 105 ) 106 ); 107 108 // Sidebar Position 109 $wp_customize->add_setting( 110 'hvn_realty_sidebar_position', 111 array( 112 'default' => 'right', 113 'sanitize_callback' => 'hvn_realty_sanitize_sidebar_position', 114 'transport' => 'refresh', 115 ) 116 ); 117 118 $wp_customize->add_control( 119 'hvn_realty_sidebar_position', 120 array( 121 'label' => esc_html__( 'Sidebar Position', 'havenlytics-realty' ), 122 'section' => 'hvn_realty_layout', 123 'type' => 'select', 124 'choices' => array( 125 'right' => esc_html__( 'Right Sidebar', 'havenlytics-realty' ), 126 'left' => esc_html__( 'Left Sidebar', 'havenlytics-realty' ), 127 'none' => esc_html__( 'No Sidebar', 'havenlytics-realty' ), 128 ), 129 ) 130 ); 131 132 // Blog Layout (Grid or List) 133 $wp_customize->add_setting( 134 'hvn_realty_blog_layout', 135 array( 136 'default' => 'grid', 137 'sanitize_callback' => 'hvn_realty_sanitize_blog_layout', 138 'transport' => 'refresh', 139 ) 140 ); 141 142 $wp_customize->add_control( 143 'hvn_realty_blog_layout', 144 array( 145 'label' => esc_html__( 'Blog Layout Style', 'havenlytics-realty' ), 146 'section' => 'hvn_realty_layout', 147 'type' => 'select', 148 'choices' => array( 149 'grid' => esc_html__( 'Grid Layout', 'havenlytics-realty' ), 150 'list' => esc_html__( 'List Layout', 'havenlytics-realty' ), 151 ), 152 ) 153 ); 154 155 // Blog Columns (Number of posts per row) - Only for Grid Layout 156 $wp_customize->add_setting( 157 'hvn_realty_blog_columns', 158 array( 159 'default' => 3, 160 'sanitize_callback' => 'hvn_realty_sanitize_blog_columns', 161 'transport' => 'refresh', 162 ) 163 ); 164 165 $wp_customize->add_control( 166 'hvn_realty_blog_columns', 167 array( 168 'label' => esc_html__( 'Blog Columns (Grid Layout)', 'havenlytics-realty' ), 169 'description' => esc_html__( 'Number of posts to display per row when using Grid layout.', 'havenlytics-realty' ), 170 'section' => 'hvn_realty_layout', 171 'type' => 'select', 172 'choices' => array( 173 '1' => esc_html__( '1 Column', 'havenlytics-realty' ), 174 '2' => esc_html__( '2 Columns', 'havenlytics-realty' ), 175 '3' => esc_html__( '3 Columns', 'havenlytics-realty' ), 176 '4' => esc_html__( '4 Columns', 'havenlytics-realty' ), 177 ), 178 ) 179 ); 180 181 // Posts Per Page (Override WordPress Reading Settings) 182 $wp_customize->add_setting( 183 'hvn_realty_posts_per_page', 184 array( 185 'default' => '', 186 'sanitize_callback' => 'hvn_realty_sanitize_posts_per_page', 187 'transport' => 'refresh', 188 ) 189 ); 190 191 $wp_customize->add_control( 192 'hvn_realty_posts_per_page', 193 array( 194 'label' => esc_html__( 'Posts Per Page', 'havenlytics-realty' ), 195 'description' => esc_html__( 'Number of posts to display on blog and archive pages. Leave empty to use WordPress Reading settings.', 'havenlytics-realty' ), 196 'section' => 'hvn_realty_layout', 197 'type' => 'number', 198 'input_attrs' => array( 199 'min' => 1, 200 'max' => 50, 201 'step' => 1, 202 ), 203 ) 204 ); 205 206 // Ignore Sticky Posts 207 $wp_customize->add_setting( 208 'hvn_realty_ignore_sticky_posts', 209 array( 210 'default' => false, 211 'sanitize_callback' => 'hvn_realty_sanitize_checkbox', 212 'transport' => 'refresh', 213 ) 214 ); 215 216 $wp_customize->add_control( 217 'hvn_realty_ignore_sticky_posts', 218 array( 219 'label' => esc_html__( 'Ignore Sticky Posts', 'havenlytics-realty' ), 220 'description' => esc_html__( 'Check this to prevent sticky posts from appearing at the top of your blog page.', 'havenlytics-realty' ), 221 'section' => 'hvn_realty_layout', 222 'type' => 'checkbox', 223 ) 224 ); 225 226 // ============================================ 227 // FOOTER SECTION 228 // ============================================ 229 230 $wp_customize->add_section( 231 'hvn_realty_footer', 232 array( 233 'title' => esc_html__( 'Footer Options', 'havenlytics-realty' ), 234 'priority' => 90, 235 'description' => esc_html__( 'Customize the footer of your site.', 'havenlytics-realty' ), 236 ) 237 ); 238 239 // Copyright Text 240 $wp_customize->add_setting( 241 'hvn_realty_copyright_text', 242 array( 243 'default' => '', 244 'sanitize_callback' => 'wp_kses_post', 245 'transport' => 'postMessage', 246 ) 247 ); 248 249 $wp_customize->add_control( 250 'hvn_realty_copyright_text', 251 array( 252 'label' => esc_html__( 'Copyright Text', 'havenlytics-realty' ), 253 'section' => 'hvn_realty_footer', 254 'type' => 'textarea', 255 'description' => esc_html__( 'Leave empty to use default copyright text.', 'havenlytics-realty' ), 256 ) 257 ); 258 259 // ============================================ 260 // TYPOGRAPHY SECTION (Optional) 261 // ============================================ 262 263 $wp_customize->add_section( 264 'hvn_realty_typography', 265 array( 266 'title' => esc_html__( 'Typography', 'havenlytics-realty' ), 267 'priority' => 40, 268 'description' => esc_html__( 'Customize typography settings.', 'havenlytics-realty' ), 269 ) 270 ); 271 272 // Body Font Size 273 $wp_customize->add_setting( 274 'hvn_realty_body_font_size', 275 array( 276 'default' => '16', 277 'sanitize_callback' => 'absint', 278 'transport' => 'postMessage', 279 ) 280 ); 281 282 $wp_customize->add_control( 283 'hvn_realty_body_font_size', 284 array( 285 'label' => esc_html__( 'Body Font Size (px)', 'havenlytics-realty' ), 286 'section' => 'hvn_realty_typography', 287 'type' => 'number', 288 'input_attrs' => array( 289 'min' => 12, 290 'max' => 24, 291 'step' => 1, 292 ), 293 ) 294 ); 16 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 17 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 18 $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 19 20 if ( $wp_customize->get_setting( 'custom_logo' ) ) { 21 $wp_customize->get_setting( 'custom_logo' )->transport = 'postMessage'; 22 } 23 24 if ( $wp_customize->get_setting( 'site_icon' ) ) { 25 $wp_customize->get_setting( 'site_icon' )->transport = 'postMessage'; 26 } 27 28 if ( isset( $wp_customize->selective_refresh ) ) { 29 $wp_customize->selective_refresh->add_partial( 30 'blogname', 31 array( 32 'selector' => '.hvn-theme-site-title a', 33 'render_callback' => 'hvn_realty_customize_partial_blogname', 34 ) 35 ); 36 $wp_customize->selective_refresh->add_partial( 37 'blogdescription', 38 array( 39 'selector' => '.hvn-theme-site-description', 40 'render_callback' => 'hvn_realty_customize_partial_blogdescription', 41 ) 42 ); 43 $wp_customize->selective_refresh->add_partial( 44 'custom_logo', 45 array( 46 'selector' => '.hvn-theme-logo', 47 'container_inclusive' => true, 48 'render_callback' => 'hvn_realty_customize_partial_logo', 49 ) 50 ); 51 } 295 52 } 296 53 add_action( 'customize_register', 'hvn_realty_customize_register' ); … … 298 55 /** 299 56 * Sanitize sidebar position. 300 * Ensures only valid values are saved. 301 * 302 * @param string $input The value to sanitize. 303 * @return string Sanitized value. 57 * 58 * @param string $input Value to sanitize. 59 * @return string 304 60 */ 305 61 function hvn_realty_sanitize_sidebar_position( $input ) { 306 $valid = array( 'right', 'left', 'none' ); 307 if ( in_array( $input, $valid, true ) ) { 308 return $input; 309 } 310 return 'right'; 311 } 312 62 $valid = array( 'right', 'left', 'none' ); 63 if ( in_array( $input, $valid, true ) ) { 64 return $input; 65 } 66 return 'none'; 67 } 313 68 /** 314 69 * Sanitize blog layout. 315 * Ensures only valid values are saved. 316 * 317 * @param string $input The value to sanitize. 318 * @return string Sanitized value. 70 * 71 * @param string $input Value to sanitize. 72 * @return string 319 73 */ 320 74 function hvn_realty_sanitize_blog_layout( $input ) { 321 $valid = array( 'grid', 'list' );322 if ( in_array( $input, $valid, true ) ) {323 return $input;324 }325 return 'grid';75 $valid = array( 'grid', 'list' ); 76 if ( in_array( $input, $valid, true ) ) { 77 return $input; 78 } 79 return 'grid'; 326 80 } 327 81 328 82 /** 329 83 * Sanitize blog columns. 330 * Ensures only valid values are saved. 331 * 332 * @param int|string $input The value to sanitize. 333 * @return int Sanitized value. 84 * 85 * @param int|string $input Value to sanitize. 86 * @return int 334 87 */ 335 88 function hvn_realty_sanitize_blog_columns( $input ) { 336 // Convert to integer 337 $input = intval( $input ); 338 339 // Valid values are 1, 2, 3, 4 340 $valid = array( 1, 2, 3, 4 ); 341 if ( in_array( $input, $valid, true ) ) { 342 return $input; 343 } 344 return 3; 89 $input = intval( $input ); 90 $valid = array( 1, 2, 3, 4 ); 91 if ( in_array( $input, $valid, true ) ) { 92 return $input; 93 } 94 return 3; 345 95 } 346 96 … … 348 98 * Sanitize posts per page. 349 99 * 350 * @param int $input The value to sanitize.351 * @return int|string Sanitized value.100 * @param int $input Value to sanitize. 101 * @return int|string 352 102 */ 353 103 function hvn_realty_sanitize_posts_per_page( $input ) { 354 if ( empty( $input ) ) {355 return '';356 }357 $input = absint( $input );358 if ( $input < 1 ) {359 return '';360 }361 if ( $input > 50 ) {362 return 50;363 }364 return $input;104 if ( empty( $input ) ) { 105 return ''; 106 } 107 $input = absint( $input ); 108 if ( $input < 1 ) { 109 return ''; 110 } 111 if ( $input > 50 ) { 112 return 50; 113 } 114 return $input; 365 115 } 366 116 … … 368 118 * Sanitize checkbox. 369 119 * 370 * @param bool $input The value to sanitize.120 * @param bool $input Value to sanitize. 371 121 * @return bool 372 122 */ 373 123 function hvn_realty_sanitize_checkbox( $input ) { 374 return (bool) $input; 124 return (bool) $input; 125 } 126 127 /** 128 * Sanitize hero map department mode. 129 * 130 * @param string $input Input. 131 * @return string 132 */ 133 function hvn_realty_sanitize_map_department_mode( $input ) { 134 return in_array( $input, array( 'all', 'selected' ), true ) ? $input : 'all'; 375 135 } 376 136 … … 378 138 * Sanitize float number. 379 139 * 380 * @param float $input The value to sanitize.140 * @param float $input Value to sanitize. 381 141 * @return float 382 142 */ 383 143 function hvn_realty_sanitize_float( $input ) { 384 return floatval( $input );385 } 386 387 /** 388 * Render the site title for the selective refresh partial.144 return floatval( $input ); 145 } 146 147 /** 148 * Render the site title for selective refresh. 389 149 */ 390 150 function hvn_realty_customize_partial_blogname() { 391 bloginfo( 'name' );392 } 393 394 /** 395 * Render the site tagline for the selective refresh partial.151 bloginfo( 'name' ); 152 } 153 154 /** 155 * Render the site tagline for selective refresh. 396 156 */ 397 157 function hvn_realty_customize_partial_blogdescription() { 398 bloginfo( 'description' ); 399 } 400 401 /** 402 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 158 bloginfo( 'description' ); 159 } 160 161 /** 162 * Render site logo / branding for selective refresh. 163 */ 164 function hvn_realty_customize_partial_logo() { 165 get_template_part( 'template-parts/header/branding' ); 166 } 167 168 /** 169 * Customizer preview scripts. 403 170 */ 404 171 function hvn_realty_customize_preview_js() { 405 wp_enqueue_script( 406 'hvn-realty-customizer', 407 get_template_directory_uri() . '/assets/js/customizer.js', 408 array( 'customize-preview', 'jquery' ), 409 HVN_REALTY_VERSION, 410 true 411 ); 172 wp_enqueue_script( 173 'hvn-realty-customizer', 174 get_template_directory_uri() . '/assets/js/customizer.js', 175 array( 'customize-preview', 'jquery' ), 176 HVN_REALTY_VERSION, 177 true 178 ); 179 180 $blog_url = home_url( '/' ); 181 $page_for_posts = (int) get_option( 'page_for_posts' ); 182 if ( $page_for_posts ) { 183 $blog_url = get_permalink( $page_for_posts ); 184 } 185 186 $localize = array( 187 'fontStacks' => hvn_realty_get_font_stack_map(), 188 'googleFonts' => hvn_realty_get_google_fonts_api_map(), 189 'defaultCopyright' => sprintf( 190 /* translators: 1: Year, 2: Site name */ 191 esc_html__( '© %1$s %2$s. All rights reserved.', 'havenlytics-realty' ), 192 date_i18n( 'Y' ), 193 get_bloginfo( 'name' ) 194 ), 195 'blogPreviewUrl' => esc_url( $blog_url ), 196 ); 197 198 if ( function_exists( 'hvn_realty_get_customizer_home_section_selectors' ) ) { 199 $localize['homeSections'] = hvn_realty_get_customizer_home_section_selectors(); 200 } 201 202 if ( function_exists( 'hvn_realty_get_customizer_home_section_visibility_map' ) ) { 203 $localize['homeSectionVisibility'] = hvn_realty_get_customizer_home_section_visibility_map(); 204 } 205 206 wp_localize_script( 207 'hvn-realty-customizer', 208 'hvnRealtyCustomizer', 209 $localize 210 ); 412 211 } 413 212 add_action( 'customize_preview_init', 'hvn_realty_customize_preview_js' ); -
havenlytics-realty/1.15.0/inc/jetpack.php
r322064 r334339 35 35 array( 36 36 'post-details' => array( 37 'stylesheet' => 'hvn-realty- style',37 'stylesheet' => 'hvn-realty-theme', 38 38 'date' => '.posted-on', 39 39 'categories' => '.cat-links', -
havenlytics-realty/1.15.0/inc/template-functions.php
r322064 r334339 13 13 */ 14 14 function hvn_realty_body_classes( $classes ) { 15 // Adds a class of hfeed to non-singular pages. 16 if ( ! is_singular() ) { 17 $classes[] = 'hfeed'; 18 } 19 20 // Adds a class of no-sidebar when there is no sidebar present. 21 if ( ! is_active_sidebar( 'sidebar-1' ) ) { 22 $classes[] = 'hvn-theme-no-sidebar'; 23 } 24 25 // Adds a class of has-sidebar when there is sidebar present. 26 if ( is_active_sidebar( 'sidebar-1' ) ) { 27 $classes[] = 'hvn-theme-has-sidebar'; 28 } 29 30 // Add sidebar position class based on customizer setting 31 $sidebar_position = hvn_realty_get_sidebar_position(); 32 if ( is_active_sidebar( 'sidebar-1' ) ) { 33 if ( 'left' === $sidebar_position ) { 34 $classes[] = 'hvn-theme-sidebar-left'; 35 } elseif ( 'right' === $sidebar_position ) { 36 $classes[] = 'hvn-theme-sidebar-right'; 37 } elseif ( 'none' === $sidebar_position ) { 38 $classes[] = 'hvn-theme-sidebar-none'; 39 } 40 } 41 42 // Add class for custom logo. 43 if ( has_custom_logo() ) { 44 $classes[] = 'hvn-theme-has-custom-logo'; 45 } 46 47 // Add class for keyboard navigation detection 48 $classes[] = 'mouse-user'; 49 50 // Add class for singular posts. 51 if ( is_singular() ) { 52 $classes[] = 'hvn-theme-singular'; 53 } 54 55 // Add class for archive pages. 56 if ( is_archive() ) { 57 $classes[] = 'hvn-theme-archive'; 58 } 59 60 // Add class for search page. 61 if ( is_search() ) { 62 $classes[] = 'hvn-theme-search'; 63 } 64 65 // Add blog layout class 66 $blog_layout = hvn_realty_get_blog_layout(); 67 if ( is_home() || is_archive() || is_search() ) { 68 if ( 'list' === $blog_layout ) { 69 $classes[] = 'hvn-theme-blog-list'; 70 } else { 71 $classes[] = 'hvn-theme-blog-grid'; 72 } 73 } 74 75 return $classes; 15 if ( ! is_singular() ) { 16 $classes[] = 'hfeed'; 17 } 18 19 if ( ! hvn_realty_has_sidebar() ) { 20 $classes[] = 'hvn-theme-no-sidebar'; 21 } 22 23 if ( hvn_realty_has_sidebar() ) { 24 $classes[] = 'hvn-theme-has-sidebar'; 25 $sidebar_position = hvn_realty_get_sidebar_position(); 26 if ( 'left' === $sidebar_position ) { 27 $classes[] = 'hvn-theme-sidebar-left'; 28 } elseif ( 'right' === $sidebar_position ) { 29 $classes[] = 'hvn-theme-sidebar-right'; 30 } 31 } else { 32 $classes[] = 'hvn-theme-sidebar-none'; 33 } 34 35 if ( has_custom_logo() ) { 36 $classes[] = 'hvn-theme-has-custom-logo'; 37 } 38 39 $classes[] = 'mouse-user'; 40 41 if ( is_singular() ) { 42 $classes[] = 'hvn-theme-singular'; 43 } 44 45 if ( is_page() || is_404() ) { 46 $classes[] = 'hvn-view-page'; 47 } 48 49 if ( ( is_home() || is_search() || ( is_archive() && ! hvn_realty_is_property_context() && ! ( function_exists( 'hvn_realty_is_havenlytics_view' ) && hvn_realty_is_havenlytics_view() ) ) ) ) { 50 $classes[] = 'hvn-view-blog'; 51 $classes[] = 'hvn-posts-cols-' . hvn_realty_get_blog_column_count(); 52 if ( 'list' === hvn_realty_get_blog_layout() ) { 53 $classes[] = 'hvn-blog-view-list'; 54 } else { 55 $classes[] = 'hvn-blog-view-grid'; 56 } 57 } 58 59 if ( is_single() && ! is_singular( 'hvnly_property' ) && ! is_singular( 'hvnly_agent' ) ) { 60 $classes[] = 'hvn-view-single'; 61 } 62 63 if ( is_archive() ) { 64 $classes[] = 'hvn-theme-archive'; 65 } 66 67 if ( is_search() ) { 68 $classes[] = 'hvn-theme-search'; 69 } 70 71 if ( hvn_realty_is_sticky_header() ) { 72 $classes[] = 'hvn-theme-sticky-header'; 73 } 74 75 $classes[] = 'hvn-header-layout-' . hvn_realty_get_header_layout(); 76 $classes[] = 'hvn-footer-cols-' . hvn_realty_get_footer_columns(); 77 $classes[] = 'hvn-container-' . hvn_realty_get_container_mode(); 78 79 if ( ! hvn_realty_show_header_search() ) { 80 $classes[] = 'hvn-header-no-search'; 81 } 82 83 if ( ! hvn_realty_show_header_cta() ) { 84 $classes[] = 'hvn-header-no-cta'; 85 } 86 87 if ( hvn_realty_show_back_to_top() ) { 88 $classes[] = 'hvn-has-back-to-top'; 89 } 90 91 if ( hvn_realty_is_havenlytics_plugin_active() ) { 92 $classes[] = 'hvn-havenlytics-active'; 93 } 94 95 if ( function_exists( 'hvn_realty_should_show_realty_home' ) && hvn_realty_should_show_realty_home() ) { 96 $classes[] = 'hvn-realty-homepage'; 97 } 98 99 return apply_filters( 'hvn_realty_body_classes', $classes ); 76 100 } 77 101 add_filter( 'body_class', 'hvn_realty_body_classes' ); … … 81 105 */ 82 106 function hvn_realty_pingback_header() { 83 if ( is_singular() && pings_open() ) {84 printf( '<link rel="pingback" href="%s">', esc_url( get_bloginfo( 'pingback_url' ) ) );85 }107 if ( is_singular() && pings_open() ) { 108 printf( '<link rel="pingback" href="%s">', esc_url( get_bloginfo( 'pingback_url' ) ) ); 109 } 86 110 } 87 111 add_action( 'wp_head', 'hvn_realty_pingback_header' ); … … 94 118 */ 95 119 function hvn_realty_excerpt_length( $length ) { 96 if ( is_admin() ) {97 return $length;98 }99 return 25;120 if ( is_admin() ) { 121 return $length; 122 } 123 return 25; 100 124 } 101 125 add_filter( 'excerpt_length', 'hvn_realty_excerpt_length' ); … … 108 132 */ 109 133 function hvn_realty_excerpt_more( $more ) { 110 if ( is_admin() ) {111 return $more;112 }113 return '...';134 if ( is_admin() ) { 135 return $more; 136 } 137 return '...'; 114 138 } 115 139 add_filter( 'excerpt_more', 'hvn_realty_excerpt_more' ); … … 122 146 */ 123 147 function hvn_realty_post_classes( $classes ) { 124 if ( ! is_singular() && has_post_thumbnail() ) {125 $classes[] = 'hvn-theme-has-thumbnail';126 }127 128 if ( is_sticky() && is_home() && ! is_paged() ) {129 $classes[] = 'hvn-theme-sticky';130 }131 132 return $classes;148 if ( ! is_singular() && has_post_thumbnail() ) { 149 $classes[] = 'hvn-theme-has-thumbnail'; 150 } 151 152 if ( is_sticky() && is_home() && ! is_paged() ) { 153 $classes[] = 'hvn-theme-sticky'; 154 } 155 156 return $classes; 133 157 } 134 158 add_filter( 'post_class', 'hvn_realty_post_classes' ); … … 141 165 */ 142 166 function hvn_realty_archive_title( $title ) { 143 if ( is_category() ) {144 $title = single_cat_title( '', false );145 } elseif ( is_tag() ) {146 $title = single_tag_title( '', false );147 } elseif ( is_author() ) {148 $title = '<span class="vcard">' . get_the_author() . '</span>';149 } elseif ( is_post_type_archive() ) {150 $title = post_type_archive_title( '', false );151 } elseif ( is_tax() ) {152 $title = single_term_title( '', false );153 }154 155 return $title;167 if ( is_category() ) { 168 $title = single_cat_title( '', false ); 169 } elseif ( is_tag() ) { 170 $title = single_tag_title( '', false ); 171 } elseif ( is_author() ) { 172 $title = '<span class="vcard">' . get_the_author() . '</span>'; 173 } elseif ( is_post_type_archive() ) { 174 $title = post_type_archive_title( '', false ); 175 } elseif ( is_tax() ) { 176 $title = single_term_title( '', false ); 177 } 178 179 return $title; 156 180 } 157 181 add_filter( 'get_the_archive_title', 'hvn_realty_archive_title' ); … … 164 188 */ 165 189 function hvn_realty_archive_description( $description ) { 166 if ( is_category() || is_tag() || is_tax() ) {167 $description = term_description();168 }169 return $description;190 if ( is_category() || is_tag() || is_tax() ) { 191 $description = term_description(); 192 } 193 return $description; 170 194 } 171 195 add_filter( 'get_the_archive_description', 'hvn_realty_archive_description' ); … … 175 199 */ 176 200 function hvn_realty_skip_link_focus_fix() { 177 ?>178 <script>179 /(trident|msie)/i.test(navigator.userAgent) && document.getElementById && window.addEventListener && window.addEventListener("hashchange", function() {180 var t, e = location.hash.substring(1);181 /^[A-z0-9_-]+$/.test(e) && (t = document.getElementById(e)) && (/^(?:a|select|input|button|textarea)$/i.test(t.tagName) || (t.tabIndex = -1), t.focus())182 }, !1);183 </script>184 <?php201 ?> 202 <script> 203 /(trident|msie)/i.test(navigator.userAgent) && document.getElementById && window.addEventListener && window.addEventListener("hashchange", function() { 204 var t, e = location.hash.substring(1); 205 /^[A-z0-9_-]+$/.test(e) && (t = document.getElementById(e)) && (/^(?:a|select|input|button|textarea)$/i.test(t.tagName) || (t.tabIndex = -1), t.focus()) 206 }, !1); 207 </script> 208 <?php 185 209 } 186 210 add_action( 'wp_print_footer_scripts', 'hvn_realty_skip_link_focus_fix' ); … … 190 214 */ 191 215 function hvn_realty_schema_markup() { 192 if ( is_single() || is_page() ) {193 echo '<meta property="og:title" content="' . esc_attr( get_the_title() ) . '">';194 echo '<meta property="og:type" content="article">';195 echo '<meta property="og:url" content="' . esc_url( get_permalink() ) . '">';196 197 if ( has_post_thumbnail() ) {198 $image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );199 if ( ! empty( $image[0] ) ) {200 echo '<meta property="og:image" content="' . esc_url( $image[0] ) . '">';201 }202 }203 204 $excerpt = get_the_excerpt();205 if ( ! empty( $excerpt ) ) {206 echo '<meta property="og:description" content="' . esc_attr( wp_trim_words( $excerpt, 30 ) ) . '">';207 }208 echo '<meta property="og:site_name" content="' . esc_attr( get_bloginfo( 'name' ) ) . '">';209 }216 if ( is_single() || is_page() ) { 217 echo '<meta property="og:title" content="' . esc_attr( get_the_title() ) . '">'; 218 echo '<meta property="og:type" content="article">'; 219 echo '<meta property="og:url" content="' . esc_url( get_permalink() ) . '">'; 220 221 if ( has_post_thumbnail() ) { 222 $image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' ); 223 if ( ! empty( $image[0] ) ) { 224 echo '<meta property="og:image" content="' . esc_url( $image[0] ) . '">'; 225 } 226 } 227 228 $excerpt = get_the_excerpt(); 229 if ( ! empty( $excerpt ) ) { 230 echo '<meta property="og:description" content="' . esc_attr( wp_trim_words( $excerpt, 30 ) ) . '">'; 231 } 232 echo '<meta property="og:site_name" content="' . esc_attr( get_bloginfo( 'name' ) ) . '">'; 233 } 210 234 } 211 235 add_action( 'wp_head', 'hvn_realty_schema_markup' ); 236 237 /** 238 * Whether the theme preloader should display. 239 * 240 * @return bool 241 */ 242 function hvn_realty_show_preloader() { 243 return (bool) get_theme_mod( 'hvn_realty_show_preloader', true ); 244 } 245 -
havenlytics-realty/1.15.0/inc/template-tags.php
r322064 r334339 156 156 array( 157 157 'mid_size' => 2, 158 'prev_text' => '<span class="hvn-theme-pagination-prev">' . esc_html__( 'Previous', 'havenlytics-realty' ) . '</span>', 159 'next_text' => '<span class="hvn-theme-pagination-next">' . esc_html__( 'Next', 'havenlytics-realty' ) . '</span>', 160 'before_page_number' => '<span class="hvn-theme-pagination-number">', 161 'after_page_number' => '</span>', 158 'prev_text' => esc_html__( 'Previous', 'havenlytics-realty' ), 159 'next_text' => esc_html__( 'Next', 'havenlytics-realty' ), 162 160 'screen_reader_text' => ' ', 163 161 ) -
havenlytics-realty/1.15.0/index.php
r322064 r334339 1 1 <?php 2 2 3 /** 4 3 5 * The main template file 6 4 7 * 8 5 9 * @package Havenlytics_Realty 10 6 11 */ 12 13 7 14 8 15 get_header(); 9 16 10 // Get blog layout setting 11 $blog_layout = hvn_realty_get_blog_layout(); 12 $grid_class = ( 'list' === $blog_layout ) ? 'hvn-theme-posts-list' : 'hvn-theme-posts-grid'; 17 18 19 $layout_class = hvn_realty_get_layout_sidebar_classes(); 20 21 $has_sidebar = hvn_realty_has_sidebar(); 22 13 23 ?> 14 24 15 <main id="primary" class="hvn-theme-site-main">16 <div class="hvn-theme-container">17 18 <?php19 // Only show breadcrumb on blog page if not front page20 if ( ! is_front_page() ) {21 hvn_realty_breadcrumbs();22 }23 ?>24 25 <div class="hvn-theme-row">26 <div class="hvn-theme-content-area <?php echo ( 'none' === hvn_realty_get_sidebar_position() || ! is_active_sidebar( 'sidebar-1' ) ) ? 'hvn-theme-full-width' : ''; ?>">27 28 <?php if ( have_posts() ) : ?>29 30 <?php if ( is_home() && ! is_front_page() ) : ?>31 <header class="hvn-theme-page-header">32 <h1 class="hvn-theme-page-title">33 <?php single_post_title(); ?>34 </h1>35 </header>36 <?php endif; ?>37 25 38 <div class="<?php echo esc_attr( $grid_class ); ?>">39 <?php40 while ( have_posts() ) :41 the_post();42 get_template_part( 'template-parts/content', get_post_type() );43 endwhile;44 ?>45 </div>46 26 47 <?php 48 // Modern Beautiful Pagination 49 the_posts_pagination( 50 array( 51 'prev_text' => '<span class="hvn-theme-pagination-prev">' . esc_html__( '← Previous', 'havenlytics-realty' ) . '</span>', 52 'next_text' => '<span class="hvn-theme-pagination-next">' . esc_html__( 'Next →', 'havenlytics-realty' ) . '</span>', 53 'before_page_number' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'havenlytics-realty' ) . ' </span>', 54 'after_page_number' => '', 55 'mid_size' => 2, 56 'screen_reader_text' => esc_html__( 'Posts navigation', 'havenlytics-realty' ), 57 ) 58 ); 59 ?> 27 <div id="primary" class="hvn-theme-layout hvn-layout-blog <?php echo esc_attr( $layout_class ); ?>"> 60 28 61 <?php else : ?>29 <div class="hvn-theme-container"> 62 30 63 <?php get_template_part( 'template-parts/content', 'none' );?>31 <?php if ( ! is_front_page() ) : ?> 64 32 65 <?php endif; ?>33 <?php hvn_realty_breadcrumbs(); ?> 66 34 67 </div>35 <?php endif; ?> 68 36 69 <?php70 // Only show sidebar if sidebar position is not 'none' and sidebar is active71 if ( 'none' !== hvn_realty_get_sidebar_position() && is_active_sidebar( 'sidebar-1' ) ) :72 ?>73 <aside class="hvn-theme-sidebar-area">74 <?php get_sidebar(); ?>75 </aside>76 <?php endif; ?>77 37 78 </div> 79 </div> 80 </main> 38 39 <?php if ( is_home() && ! is_front_page() ) : ?> 40 41 <header class="hvn-theme-blog-header"> 42 43 <h1 class="hvn-theme-blog-title"><?php single_post_title(); ?></h1> 44 45 </header> 46 47 <?php endif; ?> 48 49 50 51 <?php if ( $has_sidebar ) : ?> 52 53 <div class="hvn-theme-layout-row"> 54 55 <?php endif; ?> 56 57 58 59 <div class="hvn-theme-content-area"> 60 61 <?php get_template_part( 'template-parts/layout/blog-content' ); ?> 62 63 </div> 64 65 66 67 <?php if ( $has_sidebar ) : ?> 68 69 <?php hvn_realty_render_sidebar(); ?> 70 71 </div> 72 73 <?php endif; ?> 74 75 </div> 76 77 </div> 78 79 81 80 82 81 <?php 82 83 83 get_footer(); 84 -
havenlytics-realty/1.15.0/page.php
r322064 r334339 1 1 <?php 2 2 3 /** 4 3 5 * The template for displaying all pages 6 4 7 * 5 * This is the template that displays all pages by default. 6 * Please note that this is the WordPress construct of pages 7 * and that other 'pages' on your WordPress site may use a 8 * different template. 9 * 10 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 11 * 8 12 9 * @package Havenlytics_Realty 10 13 11 */ 14 12 13 14 15 15 get_header(); 16 17 18 19 $layout_class = hvn_realty_get_layout_sidebar_classes(); 20 21 $has_sidebar = hvn_realty_has_sidebar(); 22 23 if ( function_exists( 'hvn_realty_is_plugin_shortcode_page' ) && hvn_realty_is_plugin_shortcode_page() ) { 24 $has_sidebar = false; 25 } 26 16 27 ?> 17 28 18 <main id="primary" class="hvn-theme-site-main">19 <div class="hvn-theme-container">20 <?php hvn_realty_breadcrumbs(); ?>21 <div class="hvn-theme-row">22 <div class="hvn-theme-content-area <?php echo ( 'none' === hvn_realty_get_sidebar_position() || ! is_active_sidebar( 'sidebar-1' ) ) ? 'hvn-theme-full-width' : ''; ?>">23 24 <?php25 while ( have_posts() ) :26 the_post();27 ?>28 29 29 <article id="post-<?php the_ID(); ?>" <?php post_class( 'hvn-theme-single-content hvn-theme-page' ); ?>>30 31 <?php if ( has_post_thumbnail() ) : ?>32 <div class="hvn-theme-single-featured-image">33 <?php the_post_thumbnail( 'large', array( 'class' => 'hvn-theme-featured-image' ) ); ?>34 </div>35 <?php endif; ?>36 30 37 <header class="entry-header"> 38 <?php the_title( '<h1 class="entry-title hvn-theme-page-title">', '</h1>' ); ?> 39 </header> 31 <div id="primary" class="hvn-theme-layout hvn-layout-page hvn-theme-page-layout <?php echo esc_attr( $layout_class ); ?><?php echo ( function_exists( 'hvn_realty_is_plugin_shortcode_page' ) && hvn_realty_is_plugin_shortcode_page() ) ? ' hvn-realty-plugin-page-layout' : ''; ?>"> 40 32 41 <div class="entry-content hvn-theme-post-content"> 42 <?php 43 the_content(); 33 <div class="hvn-theme-container"> 44 34 45 wp_link_pages( 46 array( 47 'before' => '<div class="page-links hvn-theme-page-links">' . esc_html__( 'Pages:', 'havenlytics-realty' ), 48 'after' => '</div>', 49 'link_before' => '<span class="page-link">', 50 'link_after' => '</span>', 51 ) 52 ); 53 ?> 54 </div> 35 <?php hvn_realty_breadcrumbs(); ?> 55 36 56 <?php if ( get_edit_post_link() ) : ?>57 <footer class="entry-footer hvn-theme-entry-footer">58 <?php59 edit_post_link(60 sprintf(61 wp_kses(62 /* translators: %s: Name of current post. */63 __( 'Edit <span class="screen-reader-text">%s</span>', 'havenlytics-realty' ),64 array(65 'span' => array(66 'class' => array(),67 ),68 )69 ),70 get_the_title()71 ),72 '<span class="edit-link">',73 '</span>'74 );75 ?>76 </footer>77 <?php endif; ?>78 </article>79 37 80 <?php81 // If comments are open or we have at least one comment, load up the comment template.82 if ( comments_open() || get_comments_number() ) :83 comments_template();84 endif;85 38 86 endwhile; // End of the loop. 87 ?> 39 <?php if ( $has_sidebar ) : ?> 88 40 89 </div><!-- .hvn-theme-content-area -->41 <div class="hvn-theme-layout-row"> 90 42 91 <?php 92 // Only show sidebar if sidebar position is not 'none' and sidebar is active 93 if ( 'none' !== hvn_realty_get_sidebar_position() && is_active_sidebar( 'sidebar-1' ) ) : 94 ?> 95 <aside class="hvn-theme-sidebar-area"> 96 <?php get_sidebar(); ?> 97 </aside> 98 <?php endif; ?> 43 <?php endif; ?> 99 44 100 </div><!-- .hvn-theme-row --> 101 </div><!-- .hvn-theme-container --> 102 </main><!-- #main --> 45 46 47 <main class="hvn-theme-content-area hvn-theme-page-content"> 48 49 <?php 50 51 while ( have_posts() ) : 52 53 the_post(); 54 55 get_template_part( 'template-parts/content', 'page' ); 56 57 58 59 if ( comments_open() || get_comments_number() ) : 60 61 comments_template(); 62 63 endif; 64 65 endwhile; 66 67 ?> 68 69 </main> 70 71 72 73 <?php if ( $has_sidebar ) : ?> 74 75 <?php hvn_realty_render_sidebar(); ?> 76 77 </div> 78 79 <?php endif; ?> 80 81 </div> 82 83 </div> 84 85 103 86 104 87 <?php 88 105 89 get_footer(); 90 -
havenlytics-realty/1.15.0/readme.txt
r330492 r334339 4 4 Tags: two-columns, right-sidebar, custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready, block-styles, wide-blocks 5 5 Requires at least: 6.0 6 Tested up to: 6. 76 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 1. 0.58 Stable tag: 1.15.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Havenlytics Realty is a modern, lightweight, and SEO-optimized real estate WordPress theme perfect for property listings, real estate directories, and agent platforms.12 Havenlytics Realty is the official companion theme for the free Havenlytics plugin — launch a professional real estate website with search, listings, and agents in minutes. 13 13 14 14 == Description == 15 15 16 Havenlytics Realty is a sophisticated WordPress blog theme crafted specifically for real estate professionals, property bloggers, and real estate agencies. With its clean design and professional aesthetics, it's perfect for sharing market insights, property tips, and industry expertise. 17 18 = Features = 16 **Havenlytics Realty is the official companion theme for the free [Havenlytics](https://wordpress.org/plugins/havenlytics/) plugin.** Install both to launch a property directory with search, listings, agents, and agencies — or use the theme on its own as a fast, accessible blog and business layout. 17 18 The theme automatically enhances the Havenlytics experience when both are active: a 10-section real estate homepage, plugin page styling, theme breadcrumbs, a Realty setup hub, and Customizer controls for hero text, listing counts, and section visibility. 19 20 = Launch in 4 steps = 21 22 1. Activate **Havenlytics Realty** 23 2. Go to **Appearance → Realty** 24 3. Install and activate the **Havenlytics** plugin (recommended, not required) 25 4. Run the plugin **Setup Wizard** to import demo listings — the theme configures your homepage and menu automatically 26 27 = Real estate homepage (with Havenlytics plugin) = 28 29 * Hero property search section 30 * Featured and latest property listings 31 * Property category cards (Sale, Rent, and more) 32 * Featured agents and agencies 33 * Live statistics (properties, agents, agencies) 34 * Call-to-action banners and blog section 35 * Full Customizer control over hero, counts, and section toggles 36 37 = Havenlytics plugin integration = 38 39 * CSS harmonization for property, agent, and agency pages 40 * Header search links to the plugin Property Search page 41 * Theme breadcrumbs on listings and agent archives 42 * Full-width layout for plugin shortcode pages 43 * Works with plugin templates — no forked overrides required 44 45 = Theme foundation = 46 47 * Lightweight, modular CSS architecture 48 * Unified Customizer panel (design, header, footer, layout, typography) 49 * Responsive header with mobile menu and optional CTA 50 * Blog grid and list layouts with column controls 51 * Professional breadcrumb navigation with schema markup 52 * Elementor-compatible full-width pages 53 * Block editor styles and patterns 54 55 = Accessibility = 19 56 20 57 * Full keyboard navigation support … … 24 61 * Screen reader friendly 25 62 * High contrast focus indicators 26 * Dropdown menu keyboard navigation 27 * Form field accessibility 28 29 = Key Features = 30 31 * Responsive design that looks great on all devices 32 * Clean, modern layout optimized for readability 33 * Customizable header with logo support 34 * Multiple widget areas (sidebar and footer) 35 * Custom color scheme with real estate industry colors 36 * SEO-optimized structure 37 * Translation ready with POT file included 38 * RTL language support 39 * Accessibility ready (WCAG 2.1 AA compliant) 40 * Gutenberg optimized with custom block styles and patterns 41 * Customizer settings for easy customization 42 * Sticky sidebar for better user experience 43 * Modern pagination design 44 * Blog post grid and list layouts 45 * Customizable blog columns (1-4 columns) 46 * Posts per page control 47 * Ignore sticky posts option 48 * Professional breadcrumb navigation 49 * Scroll to top button with animation 50 51 = Theme Includes = 52 53 * Custom homepage template 54 * Multiple page templates 55 * Custom widgets support 56 * Social media integration ready 57 * Contact Form 7 compatible 58 * Newsletter integration ready 59 * Custom block styles for quote and button blocks 60 * Hero section block pattern 63 64 = Performance = 65 66 * Minimal vanilla JavaScript (no jQuery on the front end) 67 * Conditional stylesheet loading per template 68 * Google Fonts loaded only for selected typography choices 69 70 = Works without the plugin = 71 72 Havenlytics Realty remains a fully functional WordPress theme for blogs, business pages, and directories. Without the Havenlytics plugin, the real estate homepage shows a friendly prompt to install the plugin — no errors, no broken layouts. 61 73 62 74 == Installation == 63 75 64 1. In your admin panel, go to Appearance > Themes and click the 'Add New' button. 65 2. Search for 'Havenlytics Realty' or upload the theme zip file. 66 3. Click on the 'Activate' button to use your new theme right away. 67 4. Navigate to Appearance > Customize to customize your theme settings. 76 = Quick start (recommended) = 77 78 1. Install and activate **Havenlytics Realty** from Appearance → Themes. 79 2. Open **Appearance → Realty** for the setup checklist. 80 3. Install the free **[Havenlytics plugin](https://wordpress.org/plugins/havenlytics/)** when prompted (recommended, not required). 81 4. Run the plugin **Setup Wizard** to import demo properties. 82 5. Visit your site — the theme creates the homepage, primary menu, and front page automatically. 83 84 = Manual install = 85 86 1. In your admin panel, go to Appearance → Themes and click **Add New**. 87 2. Search for **Havenlytics Realty** or upload the theme ZIP file. 88 3. Click **Activate**. 89 4. Go to **Appearance → Customize → Havenlytics Theme Settings** to adjust colors, header, footer, and layout. 90 91 = After activation = 92 93 * **Appearance → Realty** — onboarding checklist and quick links 94 * **Appearance → Customize → Real Estate Homepage** — hero, listings, and section controls (requires Havenlytics plugin) 95 * **Appearance → Customize → Havenlytics Theme Settings** — global design, header, footer, typography, layout 68 96 69 97 == Frequently Asked Questions == 70 98 99 = Do I need the Havenlytics plugin? = 100 101 No. Havenlytics Realty works as a standalone WordPress theme for blogs and business sites. For property listings, search, agents, agencies, and the real estate homepage, install the free [Havenlytics plugin](https://wordpress.org/plugins/havenlytics/) — the theme is built as its official companion. 102 103 = How do I launch a real estate homepage? = 104 105 Install the Havenlytics plugin, run the Setup Wizard to import demo content, and the theme automatically creates a Home page, primary menu, and static front page. Use **Appearance → Realty** to track progress or **Appearance → Customize → Real Estate Homepage** to customize sections. 106 107 = Does the theme modify the Havenlytics plugin? = 108 109 No. All integration is theme-side: shortcodes, CSS harmonization, body classes, breadcrumbs, and admin onboarding. The plugin continues to work with any WordPress theme. 110 71 111 = Does this theme support plugins? = 72 112 73 Havenlytics Realty includes support for Contact Form 7, Jetpack, and WooCommerce out of the box.113 Yes. Havenlytics Realty integrates with the Havenlytics property plugin, Contact Form 7, Jetpack, and Elementor. 74 114 75 115 = Is this theme accessibility ready? = 76 116 77 Yes, Havenlytics Realty is built with accessibility in mind and includes full keyboard navigation, focus styles, ARIA labels, and screen reader support. 78 79 = Can I use this theme for my real estate business? = 80 81 Absolutely! Havenlytics Realty is specifically designed for real estate professionals and can be easily customized to match your brand. 82 83 = Does this theme support Gutenberg block styles? = 84 85 Yes, Havenlytics Realty includes custom block styles for quote and button blocks, as well as a hero section block pattern. 117 Yes. The theme includes keyboard navigation, focus styles, skip links, ARIA landmarks, and screen reader support. 86 118 87 119 = How do I change the primary color? = 88 120 89 You can change the primary color from Appearance > Customize > Colors.90 91 = How do I c hange the number of blog columns? =92 93 Go to Appearance > Customize > Layout Options and select the number of columns (1-4) under "Blog Columns (Grid Layout)".94 95 = How do I change the number ofposts per page? =96 97 Go to Appearance > Customize > Layout Options and enter the number under "Posts Per Page". Leave empty to use WordPress default settings.121 Go to **Appearance → Customize → Havenlytics Theme Settings → Global Design System**. 122 123 = How do I customize the real estate homepage? = 124 125 With the Havenlytics plugin active, go to **Appearance → Customize → Real Estate Homepage** to edit the hero, listing counts, CTA text, and section visibility. 126 127 = How do I change blog columns or posts per page? = 128 129 Go to **Appearance → Customize → Havenlytics Theme Settings → Layout Settings**. 98 130 99 131 == Screenshots == 100 132 101 1. Homepage layout with grid view102 2. Single post page with sidebar103 3. Blog archive page104 4. Customizer settings panel105 5. Mobile responsive menu106 6. Footer widget areas133 1. Real estate homepage with hero search and featured property listings (Havenlytics plugin active) 134 2. Property single page with theme header and styled listing details 135 3. Property search page with filters and results grid 136 4. Agents directory grid page 137 5. Customizer — Real Estate Homepage settings (hero, counts, section toggles) 138 6. Mobile homepage with responsive search and listing cards 107 139 108 140 == Changelog == 141 142 = 1.15.0 - June 8, 2026 = 143 * Improved Customizer live preview for site logo, favicon, header CTA link, footer columns, back-to-top, and homepage section toggles/text 144 * Expanded typography choices with 12 additional Google Fonts (Roboto, Open Sans, Montserrat, Lato, Nunito, Source Sans Pro, Work Sans, Raleway, DM Sans, Outfit, Manrope, Playfair Display, Merriweather) 145 * Responsive fixes for narrow mobile headers, property search panel, mobile menu, homepage section headings, and tablet footer columns 146 * Minor Customizer preview stability improvements (font loading in preview iframe) 147 148 = 1.13.0 - June 8, 2026 = 149 * Replaced Getting Started with **Appearance → Realty** admin hub (progress ring, step cards, quick actions) 150 * Removed TGMPA plugin installer library and notices; plugin install links to WordPress.org 151 * Completed setup steps show disabled "Completed" buttons; legacy URL redirects to Realty page 152 153 = 1.12.0 - June 8, 2026 = 154 * Phase 5: WordPress.org companion positioning — readme, installation guide, FAQ, and screenshot list 155 * Updated theme description for Havenlytics plugin pairing 156 * TGMPA recommended-plugin notice with Getting Started guidance 157 * Font credits updated (Inter, Poppins) 158 159 = 1.11.0 - June 8, 2026 = 160 * Phase 4: Real Estate Homepage Customizer section (hero, counts, CTA text, section toggles) 161 * Hero background color and image with live preview 162 * Auto-setup toggle for theme launch after demo import 163 * Selective refresh for homepage text fields 164 * Customizer preview defaults to static front page 165 166 = 1.10.0 - June 8, 2026 = 167 * Phase 3: Getting Started admin page under Appearance with 4-step onboarding checklist 168 * Progress bar, quick links, and site snapshot (properties, agents, agencies) 169 * Manual theme setup trigger when demo is imported but homepage not configured 170 * Welcome and launch notices link to Getting Started page 171 * Getting Started link added on Themes screen 172 173 = 1.9.0 - June 8, 2026 = 174 * Phase 2: Full Havenlytics front-end integration via CSS harmonization (property, agent, agency, shortcode pages) 175 * Smart context detection for property taxonomies, agents, agencies, and plugin pages 176 * Theme breadcrumbs on plugin archives with Listings/Agents/Agencies parent links 177 * Plugin shell hooks (hvnly_before_main_content) for layout alignment 178 * Body classes: hvn-realty-plugin-property, hvn-realty-plugin-agent, hvn-realty-plugin-agency, hvn-realty-plugin-page 179 * Plugin shortcode pages use full-width layout without sidebar 180 181 = 1.8.0 - June 8, 2026 = 182 * Added Real Estate Homepage template with 10 sections (hero search, featured/latest listings, categories, agents, agencies, stats, CTAs, blog) 183 * Added theme launch pack: auto-creates Home page, Primary menu, and front page assignment after demo import 184 * Added Havenlytics integration module (helpers, shortcode wrappers, compat CSS) 185 * Post-import admin notice with View Website CTA 186 187 = 1.7.4 - June 8, 2026 = 188 * Fixed Havenlytics plugin detection (HvnlyNab class) and hvnly_property CPT integration 189 * Header search icon links to the Havenlytics Property Search page when the plugin is active 190 * Property archives no longer receive blog grid body classes 191 * Added dismissible admin welcome notice after theme activation 192 * Added read-only plugin page ID helper for theme integration without modifying plugin code 193 194 = 1.7.3 - June 8, 2026 = 195 * Fixed blog pagination double-box styling (removed duplicate CSS + inner span wrappers) 196 * Pages and singles use full container width by default; sidebar grid only when sidebar is active 197 * Removed unnecessary layout-row markup when no sidebar is assigned 198 * Added animated hover effects for blog post cards 199 * Elementor full-width reset scoped to #primary only — header/footer containers stay boxed 200 201 = 1.7.2 - June 8, 2026 = 202 * Reordered Customizer: Global Design System, Site Identity, Header, Typography, Layout, Footer 203 * Removed header/background image sections and custom-background theme support 204 * Fixed Posts Per Row grid on frontend (legacy layout CSS conflict + body/grid class collision) 205 * Blog column CSS now matches Customizer preview selectors on saved frontend output 206 207 = 1.6.0 - June 8, 2026 = 208 * Architecture: Full template rebuild — isolated page, blog, and single layouts (Astra-style) 209 * Removed: Search modal overlay (HTML, CSS, JS); header search icon now links to /?s= search page 210 * Fixed: Page layout no longer force-centers content at 900px; full container width by default 211 * Added: single.css loaded only on single posts; unified optional sidebar module (.hvn-theme-sidebar-area) 212 * Fixed: Elementor pages get full-width container reset without breaking standard pages 213 * CSS: Strict file split — page.css, blog.css, single.css, layouts.css (shared utilities only) 214 215 = 1.5.1 - June 8, 2026 = 216 * Refactor: Complete page/blog separation — dedicated `hvn-page-*` markup and `page.css` / `blog.css` loaded per context 217 * Added: Conditional stylesheet enqueue (pages + 404 → page.css; blog/archive/search → blog.css) 218 * Added: Body class `hvn-view-page` for static pages and 404 219 * Fixed: Archive titles use `hvn-blog-title` instead of shared page title class 220 * Fixed: 404 template uses page shell markup; inline blog grid CSS attaches to blog handle only 221 222 = 1.5.0 - June 8, 2026 = 223 * Refactor: Isolated layout system — blog, page, and single post use separate wrappers and CSS 224 * Fixed: Removed global 12-column grid leakage from page/single/blog templates 225 * Fixed: Sidebar default is now none; only renders when Customizer enables it 226 * Added: layouts.css with scoped blog grid, page (900px), single (800px), pagination, breadcrumbs 227 * Improved: Breadcrumb SEO schema (JSON-LD BreadcrumbList) and Home > Blog > Category > Post trail 228 229 = 1.4.0 - June 8, 2026 = 230 * Fixed: Typography system — Inter (body) + Poppins (headings) with optimized Google Fonts loading 231 * Fixed: Mobile header navigation (hamburger menu, desktop nav hide/show) 232 * Fixed: Header CTA visibility on desktop; CTA added to mobile drawer 233 * Fixed: Blog grid cards, single post readability, search page, and default page layouts 234 * Fixed: Footer widget columns, spacing, and bottom bar alignment 235 * Added: Production polish stylesheet (assets/css/polish.css) for responsive and UI consistency 236 237 = 1.3.1 - June 8, 2026 = 238 * Added: Core WP Customizer sections (Site Identity, Header Image, Background) moved into Havenlytics Theme Settings panel 239 * Added: Block editor design token output matching frontend Customizer values 240 * Added: Selective refresh for copyright and header CTA 241 * Added: Live preview for typography fonts, blog layout, container mode, and header toggles 242 * Added: Property archive/single plugin hook calls in templates 243 * Fixed: Footer widget text/title colors respect Customizer footer color settings 244 245 = 1.3.0 - June 8, 2026 = 246 * Added: Modular Customizer architecture (inc/customizer/) 247 * Added: Typography section — font families, line height, heading scale 248 * Added: Border color, transparent header, CTA toggle/link, footer link color, back-to-top 249 * Added: Container width mode (boxed/full) and plugin-ready hooks (inc/plugin-hooks.php) 250 * Changed: Dynamic Google Fonts loading from Customizer typography choices 251 252 = 1.2.0 - June 8, 2026 = 253 * Added: Unified Customizer panel "Havenlytics Theme Settings" (Global Design, Header, Footer, Layout) 254 * Refactor: Modern header markup (hvn-theme-header, hvn-theme-nav, hvn-theme-actions) 255 * Refactor: Modern footer markup (hvn-theme-footer, hvn-cols-{n}, hvn-theme-footer-bottom) 256 * Added: Header layout options (1–3), search toggle, CTA button text 257 * Added: Footer column count, footer background/text colors via CSS variables 258 * Changed: CSS consolidated to theme.css and editor.css only; property styles merged into theme.css 259 260 = 1.1.0 - June 8, 2026 = 261 * Refactor: Merged fragmented CSS into assets/css/theme.css 262 * Added: Havenlytics Global Settings customizer section with design tokens 263 * Added: Elementor support, theme.json (FSE-ready), property.css placeholder 264 * Added: Header/footer template parts; vanilla JS theme.js (no jQuery) 265 * Changed: Footer widgets expanded to 4 columns 266 * Changed: Sticky header is now optional via customizer 109 267 110 268 = 1.0.5 - May 26, 2026 = … … 163 321 * Based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html) 164 322 165 * Google Fonts: Montserrat and Plus Jakarta Sans,licensed under SIL Open Font License 1.1323 * Google Fonts: Inter, Poppins, Plus Jakarta Sans, Roboto, Open Sans, Montserrat, Lato, Nunito, Source Sans Pro, Work Sans, Raleway, DM Sans, Outfit, Manrope, Playfair Display, and Merriweather — licensed under SIL Open Font License 1.1 166 324 Source: https://fonts.google.com/ 167 325 … … 207 365 Havenlytics Realty Theme is distributed under the terms of the GNU GPL. 208 366 209 For more information about the theme, please visit: https://havenlytics.com/ 367 * Theme: https://wordpress.org/themes/havenlytics-realty/ 368 * Plugin: https://wordpress.org/plugins/havenlytics/ 369 * Author: https://profiles.wordpress.org/havenlytics/ 210 370 211 371 == Upgrade Notice == 372 373 = 1.15.0 = 374 Customizer live preview improvements, expanded Google Fonts, and responsive fixes. No breaking changes. 375 376 = 1.12.0 = 377 WordPress.org companion positioning update. Readme, onboarding guide, and Havenlytics plugin pairing documentation improved. No breaking changes. 378 379 = 1.11.0 = 380 Adds Real Estate Homepage Customizer controls when the Havenlytics plugin is active. 212 381 213 382 = 1.0.3 = -
havenlytics-realty/1.15.0/search.php
r322064 r334339 1 1 <?php 2 2 3 /** 4 3 5 * The template for displaying search results pages 6 4 7 * 5 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result 6 * 8 7 9 * @package Havenlytics_Realty 10 8 11 */ 12 13 9 14 10 15 get_header(); 11 16 12 // Get blog layout setting 13 $blog_layout = hvn_realty_get_blog_layout(); 14 $grid_class = ( 'list' === $blog_layout ) ? 'hvn-theme-posts-list' : 'hvn-theme-posts-grid'; 17 18 19 $layout_class = hvn_realty_get_layout_sidebar_classes(); 20 21 $has_sidebar = hvn_realty_has_sidebar(); 22 15 23 ?> 16 24 17 <main id="primary" class="hvn-theme-site-main">18 <div class="hvn-theme-container">19 <?php hvn_realty_breadcrumbs(); ?>20 <div class="hvn-theme-row">21 <div class="hvn-theme-content-area <?php echo ( 'none' === hvn_realty_get_sidebar_position() || ! is_active_sidebar( 'sidebar-1' ) ) ? 'hvn-theme-full-width' : ''; ?>">22 25 23 <!-- Modern Search Header -->24 <div class="hvn-theme-search-header">25 <div class="hvn-theme-search-header-icon">26 <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="var(--hvn-theme-brand-primary)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">27 <circle cx="11" cy="11" r="8"></circle>28 <line x1="21" y1="21" x2="16.65" y2="16.65"></line>29 </svg>30 </div>31 <h1 class="hvn-theme-search-title">32 <?php33 /* translators: %s: search query. */34 printf( esc_html__( 'Search Results for: %s', 'havenlytics-realty' ), '<span class="search-query">"' . get_search_query() . '"</span>' );35 ?>36 </h1>37 <div class="hvn-theme-search-count">38 <?php39 global $wp_query;40 printf(41 /* translators: %d: number of results */42 esc_html( _n( '%d result found', '%d results found', $wp_query->found_posts, 'havenlytics-realty' ) ),43 number_format_i18n( $wp_query->found_posts )44 );45 ?>46 </div>47 48 <!-- Search form inside results -->49 <div class="hvn-theme-search-inline">50 <?php get_search_form(); ?>51 </div>52 </div>53 26 54 <?php if ( have_posts() ) : ?>27 <div id="primary" class="hvn-theme-layout hvn-layout-blog <?php echo esc_attr( $layout_class ); ?>"> 55 28 56 <div class="<?php echo esc_attr( $grid_class ); ?>"> 57 <?php 58 /* Start the Loop */ 59 while ( have_posts() ) : 60 the_post(); 61 get_template_part( 'template-parts/content', 'search' ); 62 endwhile; 63 ?> 64 </div> 29 <div class="hvn-theme-container"> 65 30 66 <?php 67 // Modern Pagination 68 the_posts_pagination( 69 array( 70 'prev_text' => '<span class="hvn-theme-pagination-prev">' . esc_html__( 'Previous', 'havenlytics-realty' ) . '</span>', 71 'next_text' => '<span class="hvn-theme-pagination-next">' . esc_html__( 'Next', 'havenlytics-realty' ) . '</span>', 72 'before_page_number' => '<span class="hvn-theme-pagination-number">', 73 'after_page_number' => '</span>', 74 'mid_size' => 2, 75 'screen_reader_text' => ' ', 76 ) 77 ); 78 ?> 31 <?php hvn_realty_breadcrumbs(); ?> 79 32 80 <?php else : ?>81 33 82 <!-- Modern No Results -->83 <div class="hvn-theme-no-results-modern">84 <div class="hvn-theme-no-results-icon">85 <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 24 24" fill="none" stroke="var(--hvn-theme-brand-primary)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">86 <circle cx="11" cy="11" r="8"></circle>87 <line x1="21" y1="21" x2="16.65" y2="16.65"></line>88 <path d="M11 8v3M11 14h.01"></path>89 </svg>90 </div>91 <h2 class="hvn-theme-no-results-title"><?php esc_html_e( 'No results found', 'havenlytics-realty' ); ?></h2>92 <p class="hvn-theme-no-results-message"><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with different keywords.', 'havenlytics-realty' ); ?></p>93 94 <div class="hvn-theme-no-results-suggestions">95 <h3><?php esc_html_e( 'Try these suggestions:', 'havenlytics-realty' ); ?></h3>96 <ul>97 <li><?php esc_html_e( 'Make sure all words are spelled correctly', 'havenlytics-realty' ); ?></li>98 <li><?php esc_html_e( 'Try different keywords', 'havenlytics-realty' ); ?></li>99 <li><?php esc_html_e( 'Try more general keywords', 'havenlytics-realty' ); ?></li>100 <li><?php esc_html_e( 'Try fewer keywords', 'havenlytics-realty' ); ?></li>101 </ul>102 </div>103 104 <div class="hvn-theme-no-results-search">105 <?php get_search_form(); ?>106 </div>107 108 <div class="hvn-theme-no-results-browse">109 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="hvn-theme-btn hvn-theme-btn-outline">110 <?php esc_html_e( 'Back to Homepage', 'havenlytics-realty' ); ?>111 </a>112 </div>113 </div>114 34 115 <?php endif; ?>35 <div class="hvn-theme-search-header"> 116 36 117 </div><!-- .hvn-theme-content-area -->37 <h1 class="hvn-theme-search-title"> 118 38 119 <?php 120 // Only show sidebar if sidebar position is not 'none' and sidebar is active 121 if ( 'none' !== hvn_realty_get_sidebar_position() && is_active_sidebar( 'sidebar-1' ) ) : 122 ?> 123 <aside class="hvn-theme-sidebar-area"> 124 <?php get_sidebar(); ?> 125 </aside> 126 <?php endif; ?> 39 <?php 127 40 128 </div><!-- .hvn-theme-row --> 129 </div><!-- .hvn-theme-container --> 130 </main><!-- #main --> 41 printf( 42 43 /* translators: %s: search query. */ 44 45 esc_html__( 'Search Results for: %s', 'havenlytics-realty' ), 46 47 '<span class="search-query">"' . esc_html( get_search_query() ) . '"</span>' 48 49 ); 50 51 ?> 52 53 </h1> 54 55 <div class="hvn-theme-search-count"> 56 57 <?php 58 59 global $wp_query; 60 61 printf( 62 63 /* translators: %d: number of results */ 64 65 esc_html( _n( '%d result found', '%d results found', $wp_query->found_posts, 'havenlytics-realty' ) ), 66 67 number_format_i18n( $wp_query->found_posts ) 68 69 ); 70 71 ?> 72 73 </div> 74 75 <div class="hvn-theme-search-inline"> 76 77 <?php get_search_form(); ?> 78 79 </div> 80 81 </div> 82 83 84 85 <?php if ( $has_sidebar ) : ?> 86 87 <div class="hvn-theme-layout-row"> 88 89 <?php endif; ?> 90 91 92 93 <div class="hvn-theme-content-area"> 94 95 <?php get_template_part( 'template-parts/layout/blog-content' ); ?> 96 97 </div> 98 99 100 101 <?php if ( $has_sidebar ) : ?> 102 103 <?php hvn_realty_render_sidebar(); ?> 104 105 </div> 106 107 <?php endif; ?> 108 109 </div> 110 111 </div> 112 113 131 114 132 115 <?php 116 133 117 get_footer(); 118 -
havenlytics-realty/1.15.0/single.php
r322064 r334339 1 1 <?php 2 2 3 /** 4 3 5 * The template for displaying all single posts 6 4 7 * 5 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post 6 * 8 7 9 * @package Havenlytics_Realty 10 8 11 */ 9 12 13 14 10 15 get_header(); 16 17 18 19 $layout_class = hvn_realty_get_layout_sidebar_classes(); 20 21 $has_sidebar = hvn_realty_has_sidebar(); 22 11 23 ?> 12 24 13 <main id="primary" class="hvn-theme-site-main">14 <div class="hvn-theme-container">15 <?php hvn_realty_breadcrumbs(); ?>16 <div class="hvn-theme-row">17 <div class="hvn-theme-content-area <?php echo ( 'none' === hvn_realty_get_sidebar_position() || ! is_active_sidebar( 'sidebar-1' ) ) ? 'hvn-theme-full-width' : ''; ?>">18 19 <?php20 while ( have_posts() ) :21 the_post();22 ?>23 25 24 <article id="post-<?php the_ID(); ?>" <?php post_class( 'hvn-theme-single-content' ); ?>>25 26 <?php if ( has_post_thumbnail() ) : ?>27 <div class="hvn-theme-single-featured-image">28 <?php the_post_thumbnail( 'large', array( 'class' => 'hvn-theme-featured-image' ) ); ?>29 </div>30 <?php endif; ?>31 26 32 <header class="entry-header"> 33 <?php the_title( '<h1 class="entry-title hvn-theme-single-title">', '</h1>' ); ?> 27 <div id="primary" class="hvn-theme-layout hvn-layout-single hvn-theme-single-layout <?php echo esc_attr( $layout_class ); ?>"> 34 28 35 <div class="entry-meta hvn-theme-entry-meta"> 36 <span class="posted-on"> 37 <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 38 <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect> 39 <line x1="16" y1="2" x2="16" y2="6"></line> 40 <line x1="8" y1="2" x2="8" y2="6"></line> 41 <line x1="3" y1="10" x2="21" y2="10"></line> 42 </svg> 43 <?php hvn_realty_posted_on(); ?> 44 </span> 45 <span class="byline"> 46 <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 47 <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path> 48 <circle cx="12" cy="7" r="4"></circle> 49 </svg> 50 <?php hvn_realty_posted_by(); ?> 51 </span> 52 <span class="comments-link"> 53 <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 54 <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path> 55 </svg> 56 <?php comments_popup_link( '0', '1', '%' ); ?> 57 </span> 58 </div> 59 </header> 29 <div class="hvn-theme-container"> 60 30 61 <div class="entry-content hvn-theme-post-content"> 62 <?php 63 the_content( 64 sprintf( 65 wp_kses( 66 /* translators: %s: Name of current post. */ 67 __( 'Continue reading %s', 'havenlytics-realty' ), 68 array( 69 'span' => array( 70 'class' => array(), 71 ), 72 ) 73 ), 74 the_title( '<span class="screen-reader-text">"', '"</span>', false ) 75 ) 76 ); 31 <?php hvn_realty_breadcrumbs(); ?> 77 32 78 wp_link_pages(79 array(80 'before' => '<div class="page-links hvn-theme-page-links">' . esc_html__( 'Pages:', 'havenlytics-realty' ),81 'after' => '</div>',82 'link_before' => '<span class="page-link">',83 'link_after' => '</span>',84 )85 );86 ?>87 </div>88 33 89 <footer class="entry-footer hvn-theme-entry-footer">90 <?php if ( has_tag() ) : ?>91 <div class="hvn-theme-post-tags">92 <span class="tags-label"><?php esc_html_e( 'Tags:', 'havenlytics-realty' ); ?></span>93 <?php the_tags( '', ' ', '' ); ?>94 </div>95 <?php endif; ?>96 </footer>97 34 98 <?php 99 // Author bio 100 if ( get_the_author_meta( 'description' ) ) : 101 ?> 102 <div class="hvn-theme-author-box"> 103 <div class="hvn-theme-author-avatar"> 104 <?php echo get_avatar( get_the_author_meta( 'ID' ), 80 ); ?> 105 </div> 106 <div class="hvn-theme-author-info"> 107 <h3 class="hvn-theme-author-name"> 108 <?php echo esc_html( get_the_author() ); ?> 109 </h3> 110 <div class="hvn-theme-author-bio"> 111 <?php echo wp_kses_post( get_the_author_meta( 'description' ) ); ?> 112 </div> 113 <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="hvn-theme-author-link"> 114 <?php esc_html_e( 'View all posts', 'havenlytics-realty' ); ?> → 115 </a> 116 </div> 117 </div> 118 <?php endif; ?> 119 </article> 35 <?php if ( $has_sidebar ) : ?> 120 36 121 <?php 122 // Post navigation 123 the_post_navigation( 124 array( 125 'prev_text' => '<span class="nav-label">' . esc_html__( 'Previous Post', 'havenlytics-realty' ) . '</span><span class="nav-title">%title</span>', 126 'next_text' => '<span class="nav-label">' . esc_html__( 'Next Post', 'havenlytics-realty' ) . '</span><span class="nav-title">%title</span>', 127 'screen_reader_text' => esc_html__( 'Post navigation', 'havenlytics-realty' ), 128 ) 129 ); 37 <div class="hvn-theme-layout-row"> 130 38 131 // If comments are open or we have at least one comment, load up the comment template. 132 if ( comments_open() || get_comments_number() ) : 133 comments_template(); 134 endif; 39 <?php endif; ?> 135 40 136 endwhile; // End of the loop.137 ?>138 41 139 </div><!-- .hvn-theme-content-area -->140 42 141 <?php 142 // Only show sidebar if sidebar position is not 'none' and sidebar is active 143 if ( 'none' !== hvn_realty_get_sidebar_position() && is_active_sidebar( 'sidebar-1' ) ) : 144 ?> 145 <aside class="hvn-theme-sidebar-area"> 146 <?php get_sidebar(); ?> 147 </aside> 148 <?php endif; ?> 43 <div class="hvn-theme-content-area"> 149 44 150 </div><!-- .hvn-theme-row --> 151 </div><!-- .hvn-theme-container --> 152 </main><!-- #main --> 45 <?php 46 47 while ( have_posts() ) : 48 49 the_post(); 50 51 get_template_part( 'template-parts/content', 'single' ); 52 53 hvn_realty_property_single_after(); 54 55 the_post_navigation( 56 57 array( 58 59 'prev_text' => '<span class="nav-label">' . esc_html__( 'Previous Post', 'havenlytics-realty' ) . '</span><span class="nav-title">%title</span>', 60 61 'next_text' => '<span class="nav-label">' . esc_html__( 'Next Post', 'havenlytics-realty' ) . '</span><span class="nav-title">%title</span>', 62 63 'screen_reader_text' => esc_html__( 'Post navigation', 'havenlytics-realty' ), 64 65 ) 66 67 ); 68 69 if ( comments_open() || get_comments_number() ) : 70 71 comments_template(); 72 73 endif; 74 75 endwhile; 76 77 ?> 78 79 </div> 80 81 82 83 <?php if ( $has_sidebar ) : ?> 84 85 <?php hvn_realty_render_sidebar(); ?> 86 87 </div> 88 89 <?php endif; ?> 90 91 </div> 92 93 </div> 94 95 153 96 154 97 <?php 98 155 99 get_footer(); 100 -
havenlytics-realty/1.15.0/style.css
r330492 r334339 1 1 /* 2 2 Theme Name: Havenlytics Realty 3 Theme URI: 3 Theme URI: https://demo.havenlytics.com/ 4 4 Author: Havenlytics 5 5 Author URI: https://profiles.wordpress.org/havenlytics/ 6 Description: Havenlytics Realty is a modern, lightweight, and SEO-optimized WordPress theme designed for real estate professionals, property bloggers, and real estate agencies. Perfect for sharing market insights, property tips, and industry expertise with fast performance and clean design.7 Version: 1. 0.56 Description: Official companion theme for the free Havenlytics plugin. Launch a real estate website with property search, listings, and agents — or use as a lightweight, accessible blog and business theme. 7 Version: 1.15.0 8 8 Tested up to: 6.9 9 9 Requires PHP: 7.4 … … 32 32 --------------------------------------------------------------*/ 33 33 34 /* Note: All CSS is organized in separate files within /assets/css/ 35 and enqueued via functions.php for better maintainability. 36 37 File structure: 38 - assets/css/base/variables.css 39 - assets/css/base/reset.css 40 - assets/css/base/typography.css 41 - assets/css/layouts/grid.css 42 - assets/css/components/buttons.css 43 - assets/css/components/cards.css 44 - assets/css/components/forms.css 45 - assets/css/components/widgets.css 46 - assets/css/components/pagination.css 47 - assets/css/layouts/header.css 48 - assets/css/layouts/navigation.css 49 - assets/css/layouts/content.css 50 - assets/css/layouts/sidebar.css 51 - assets/css/layouts/comments.css 52 - assets/css/layouts/footer.css 53 - assets/css/pages/archive.css 54 - assets/css/pages/single.css 55 - assets/css/pages/404.css 56 - assets/css/utilities/accessibility.css 57 - assets/css/utilities/responsive.css 58 */ 34 /* Note: Primary theme styles are bundled in assets/css/theme.css (v1.1.0). 35 style.css retains WordPress metadata and supplemental WP-required classes. */ 59 36 60 37 /* Editor Style Support */ 61 38 .editor-styles-wrapper { 62 font-family: var(--hvn- theme-font-family-base, 'Plus Jakarta Sans', sans-serif);39 font-family: var(--hvn-font-body, var(--hvn-theme-font-family-base, 'Inter', sans-serif)); 63 40 } 64 41 … … 69 46 .editor-styles-wrapper h5, 70 47 .editor-styles-wrapper h6 { 71 font-family: var(--hvn- theme-font-family-heading, 'Montserrat', sans-serif);48 font-family: var(--hvn-font-heading, var(--hvn-theme-font-family-heading, 'Poppins', sans-serif)); 72 49 display: block; 73 50 line-break: anywhere; … … 90 67 .wp-caption-text { 91 68 font-size: 0.875rem; 92 color: #6c757d;69 color: var(--hvn-theme-text-muted, #6c757d); 93 70 text-align: center; 94 71 margin-top: 0.5rem; … … 96 73 97 74 .sticky { 98 background: #f8f9fa;75 background: var(--hvn-bg, #f8f9fa); 99 76 padding: 1.5rem; 100 border-radius: 12px;77 border-radius: var(--hvn-radius, 12px); 101 78 } 102 79 103 80 .gallery-caption { 104 81 font-size: 0.875rem; 105 color: #6c757d;82 color: var(--hvn-theme-text-muted, #6c757d); 106 83 } 107 84 … … 193 170 } 194 171 172 .hvn-theme-header, 195 173 .hvn-theme-site-header, 196 174 .hvn-theme-sidebar-area, 175 .hvn-theme-footer, 197 176 .hvn-theme-site-footer, 198 177 .hvn-theme-menu-toggle, … … 201 180 .hvn-theme-comments-area, 202 181 .hvn-theme-related-posts, 203 .hvn-theme-back-to-top, 204 .hvn-theme-search-overlay { 182 .hvn-theme-back-to-top { 205 183 display: none !important; 206 184 } … … 218 196 a[href]:after { 219 197 content: " (" attr(href) ")"; 198 } 199 200 a[href^="#"]:after, 201 a[href^="javascript"]:after { 202 content: ""; 220 203 } 221 204 … … 245 228 .post, 246 229 .page { 247 margin: 0 0 1.5em;230 margin: 0; 248 231 } 249 232 -
havenlytics-realty/1.15.0/template-parts/content-page.php
r322064 r334339 3 3 * Template part for displaying page content in page.php 4 4 * 5 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/6 *7 5 * @package Havenlytics_Realty 8 6 */ 9 10 7 ?> 11 8 12 <article id="post-<?php the_ID(); ?>" <?php post_class('hvn-theme-page-content'); ?>> 13 14 <?php if (has_post_thumbnail()) : ?> 15 <div class="hvn-theme-page-featured-image"> 16 <?php the_post_thumbnail('large'); ?> 17 </div> 18 <?php endif; ?> 9 <article id="post-<?php the_ID(); ?>" <?php post_class( 'hvn-theme-page-article' ); ?>> 10 <?php if ( has_post_thumbnail() && ! hvn_realty_is_elementor_page() ) : ?> 11 <figure class="hvn-theme-page-hero"> 12 <?php 13 the_post_thumbnail( 14 'large', 15 array( 16 'class' => 'hvn-theme-page-hero-image', 17 'loading' => 'eager', 18 ) 19 ); 20 ?> 21 </figure> 22 <?php endif; ?> 19 23 20 <div class="hvn-theme-page-content-inner"> 21 <?php 22 the_content(); 24 <?php 25 $hide_page_header = hvn_realty_is_elementor_page() 26 || ( function_exists( 'hvn_realty_is_plugin_shortcode_page' ) && hvn_realty_is_plugin_shortcode_page() ); 27 ?> 28 <?php if ( ! $hide_page_header ) : ?> 29 <header class="hvn-theme-page-header"> 30 <?php the_title( '<h1 class="hvn-theme-page-title">', '</h1>' ); ?> 31 </header> 32 <?php endif; ?> 23 33 24 wp_link_pages( 25 array( 26 'before' => '<div class="page-links">' . esc_html__('Pages:', 'havenlytics-realty'), 27 'after' => '</div>', 28 ) 29 ); 30 ?> 31 </div> 34 <div class="hvn-theme-page-body"> 35 <?php 36 the_content(); 32 37 33 <?php if (get_edit_post_link()) : ?> 34 <footer class="hvn-theme-page-footer"> 35 <?php edit_post_link(esc_html__('Edit', 'havenlytics-realty'), '<span class="edit-link">', '</span>'); ?> 36 </footer> 37 <?php endif; ?> 38 wp_link_pages( 39 array( 40 'before' => '<nav class="hvn-theme-page-links" aria-label="' . esc_attr__( 'Page links', 'havenlytics-realty' ) . '"><span class="hvn-theme-page-links-label">' . esc_html__( 'Pages:', 'havenlytics-realty' ) . '</span>', 41 'after' => '</nav>', 42 'link_before' => '<span class="hvn-theme-page-link">', 43 'link_after' => '</span>', 44 ) 45 ); 46 ?> 47 </div> 48 49 <?php if ( get_edit_post_link() ) : ?> 50 <footer class="hvn-theme-page-footer"> 51 <?php 52 edit_post_link( 53 sprintf( 54 wp_kses( 55 __( 'Edit <span class="screen-reader-text">%s</span>', 'havenlytics-realty' ), 56 array( 57 'span' => array( 58 'class' => array(), 59 ), 60 ) 61 ), 62 get_the_title() 63 ), 64 '<span class="hvn-theme-page-edit-link">', 65 '</span>' 66 ); 67 ?> 68 </footer> 69 <?php endif; ?> 38 70 </article>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)