Changeset 3334735
- Timestamp:
- 07/27/2025 07:55:09 AM (7 months ago)
- Location:
- havenlytics
- Files:
-
- 109 added
- 13 edited
-
tags/1.0.9 (added)
-
tags/1.0.9/admin (added)
-
tags/1.0.9/admin/assets (added)
-
tags/1.0.9/admin/assets/css (added)
-
tags/1.0.9/admin/assets/css/havenlytics-metabox.css (added)
-
tags/1.0.9/admin/assets/css/leaflet (added)
-
tags/1.0.9/admin/assets/css/leaflet/leaflet.css (added)
-
tags/1.0.9/admin/assets/js (added)
-
tags/1.0.9/admin/assets/js/havenlytics-metabox.js (added)
-
tags/1.0.9/admin/assets/js/leaflet (added)
-
tags/1.0.9/admin/assets/js/leaflet/leaflet.js (added)
-
tags/1.0.9/admin/class-admin-assets.php (added)
-
tags/1.0.9/havenlytics.php (added)
-
tags/1.0.9/includes (added)
-
tags/1.0.9/includes/class-init.php (added)
-
tags/1.0.9/includes/class-meta-fields.php (added)
-
tags/1.0.9/includes/class-post-type.php (added)
-
tags/1.0.9/includes/class-property-views.php (added)
-
tags/1.0.9/includes/class-shortcodes.php (added)
-
tags/1.0.9/includes/features (added)
-
tags/1.0.9/includes/features/similar-carousel (added)
-
tags/1.0.9/includes/functions-core.php (added)
-
tags/1.0.9/includes/modals (added)
-
tags/1.0.9/includes/modals/modal-agent.php (added)
-
tags/1.0.9/includes/modals/modal-brochure.php (added)
-
tags/1.0.9/includes/modals/modal-enquiry.php (added)
-
tags/1.0.9/includes/modals/modal-epc.php (added)
-
tags/1.0.9/includes/modals/modal-floorplan.php (added)
-
tags/1.0.9/includes/modals/modal-map.php (added)
-
tags/1.0.9/includes/modals/modal-mortgage-calculator.php (added)
-
tags/1.0.9/includes/modals/modal-viewing.php (added)
-
tags/1.0.9/includes/modals/modal-virtual-tour.php (added)
-
tags/1.0.9/languages (added)
-
tags/1.0.9/languages/havenlytics.pot (added)
-
tags/1.0.9/public (added)
-
tags/1.0.9/public/assets (added)
-
tags/1.0.9/public/assets/css (added)
-
tags/1.0.9/public/assets/css/havenlytics-mortgage-calculator.init.css (added)
-
tags/1.0.9/public/assets/css/havenlytics-property-featured-carousel.css (added)
-
tags/1.0.9/public/assets/css/havenlytics-property-grid.css (added)
-
tags/1.0.9/public/assets/css/havenlytics-property-list.css (added)
-
tags/1.0.9/public/assets/css/havenlytics-property-popups.css (added)
-
tags/1.0.9/public/assets/css/havenlytics-property-related-carousel.css (added)
-
tags/1.0.9/public/assets/css/havenlytics-property-single.css (added)
-
tags/1.0.9/public/assets/css/havenlytics-property-video.css (added)
-
tags/1.0.9/public/assets/css/havenlytics-root-style.css (added)
-
tags/1.0.9/public/assets/img (added)
-
tags/1.0.9/public/assets/img/layers-2x.png (added)
-
tags/1.0.9/public/assets/img/layers.png (added)
-
tags/1.0.9/public/assets/img/marker-icon.png (added)
-
tags/1.0.9/public/assets/img/no-thumb.png (added)
-
tags/1.0.9/public/assets/img/video-placeholder.png (added)
-
tags/1.0.9/public/assets/js (added)
-
tags/1.0.9/public/assets/js/havenlytics-frontend-popups.js (added)
-
tags/1.0.9/public/assets/js/havenlytics-frontend-scripts.js (added)
-
tags/1.0.9/public/assets/js/havenlytics-map.js (added)
-
tags/1.0.9/public/assets/js/havenlytics-mortgage-calculator.init.js (added)
-
tags/1.0.9/public/assets/plugins (added)
-
tags/1.0.9/public/assets/plugins/bootstrap (added)
-
tags/1.0.9/public/assets/plugins/bootstrap/css (added)
-
tags/1.0.9/public/assets/plugins/bootstrap/css/bootstrap.min.css (added)
-
tags/1.0.9/public/assets/plugins/bootstrap/css/leaflet.css (added)
-
tags/1.0.9/public/assets/plugins/bootstrap/js (added)
-
tags/1.0.9/public/assets/plugins/bootstrap/js/bootstrap.bundle.min.js (added)
-
tags/1.0.9/public/assets/plugins/bootstrap/js/leaflet.js (added)
-
tags/1.0.9/public/assets/plugins/chart (added)
-
tags/1.0.9/public/assets/plugins/chart/chart.js (added)
-
tags/1.0.9/public/assets/plugins/fontawesome (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/css (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/css/all.min.css (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/css/fontawesome.min.css (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts/fa-brands-400.ttf (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts/fa-brands-400.woff2 (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts/fa-regular-400.ttf (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts/fa-regular-400.woff2 (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts/fa-solid-900.ttf (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts/fa-solid-900.woff2 (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts/fa-v4compatibility.ttf (added)
-
tags/1.0.9/public/assets/plugins/fontawesome/webfonts/fa-v4compatibility.woff2 (added)
-
tags/1.0.9/public/assets/plugins/jspdf (added)
-
tags/1.0.9/public/assets/plugins/jspdf/html2canvas.min.js (added)
-
tags/1.0.9/public/assets/plugins/jspdf/jspdf.umd.min.js (added)
-
tags/1.0.9/public/assets/plugins/leaflet (added)
-
tags/1.0.9/public/assets/plugins/leaflet/css (added)
-
tags/1.0.9/public/assets/plugins/leaflet/css/leaflet.css (added)
-
tags/1.0.9/public/assets/plugins/leaflet/js (added)
-
tags/1.0.9/public/assets/plugins/leaflet/js/leaflet.js (added)
-
tags/1.0.9/public/assets/plugins/owl.carouse (added)
-
tags/1.0.9/public/assets/plugins/owl.carouse/css (added)
-
tags/1.0.9/public/assets/plugins/owl.carouse/css/owl.carousel.min.css (added)
-
tags/1.0.9/public/assets/plugins/owl.carouse/js (added)
-
tags/1.0.9/public/assets/plugins/owl.carouse/js/owl.carousel.min.js (added)
-
tags/1.0.9/public/assets/plugins/theia-sticky-sidebar (added)
-
tags/1.0.9/public/assets/plugins/theia-sticky-sidebar/ResizeSensor.js (added)
-
tags/1.0.9/public/assets/plugins/theia-sticky-sidebar/theia-sticky-sidebar.js (added)
-
tags/1.0.9/public/class-frontend-assets.php (added)
-
tags/1.0.9/public/class-frontend.php (added)
-
tags/1.0.9/readme.txt (added)
-
tags/1.0.9/templates (added)
-
tags/1.0.9/templates/hvnly_property-single.php (added)
-
tags/1.0.9/templates/property-card-grid.php (added)
-
tags/1.0.9/templates/property-card-list.php (added)
-
tags/1.0.9/templates/property-card.php (added)
-
tags/1.0.9/uninstall.php (added)
-
trunk/havenlytics.php (modified) (3 diffs)
-
trunk/includes/class-property-views.php (modified) (2 diffs)
-
trunk/includes/features (added)
-
trunk/includes/features/similar-carousel (added)
-
trunk/public/assets/css/havenlytics-mortgage-calculator.init.css (modified) (1 diff)
-
trunk/public/assets/css/havenlytics-property-popups.css (modified) (1 diff)
-
trunk/public/assets/css/havenlytics-property-single.css (modified) (1 diff)
-
trunk/public/assets/js/havenlytics-frontend-scripts.js (modified) (1 diff)
-
trunk/public/assets/plugins/chart (added)
-
trunk/public/assets/plugins/chart/chart.js (added)
-
trunk/public/class-frontend-assets.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (6 diffs)
-
trunk/templates/hvnly_property-single.php (modified) (18 diffs)
-
trunk/templates/property-card-grid.php (modified) (1 diff)
-
trunk/templates/property-card-list.php (modified) (1 diff)
-
trunk/templates/property-card.php (modified) (1 diff)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
havenlytics/trunk/havenlytics.php
r3334405 r3334735 4 4 Plugin URI: https://wordpress.org/plugins/havenlytics/ 5 5 Description: A property listing plugin for WordPress that allows users to easily manage and display property listings. 6 Version: 1.0. 86 Version: 1.0.9 7 7 Author: Havenlytics 8 8 Author URI: https://havenlytics.com … … 30 30 31 31 // Define constants 32 define('HVNLY_PROPERTY_VERSION', '1.0. 8');32 define('HVNLY_PROPERTY_VERSION', '1.0.9'); 33 33 define('HVNLY_PROPERTY_URL', plugin_dir_url(__FILE__)); 34 34 define('HVNLY_PROPERTY_PATH', plugin_dir_path(__FILE__)); … … 46 46 // Initialize the plugin 47 47 Hvnly_Property_Init::get_instance(); 48 49 // Load plugin text domain for translations50 51 function hvnly_property_load_textdomain()52 {53 load_plugin_textdomain('havenlytics', false, dirname(plugin_basename(__FILE__)) . '/languages');54 }55 add_action('init', 'hvnly_property_load_textdomain'); -
havenlytics/trunk/includes/class-property-views.php
r3334405 r3334735 33 33 $_SESSION['hvnly_viewed_' . $post_id] = true; 34 34 35 // 1. Total views (as before) 35 36 $views = (int) get_post_meta($post_id, '_hvnly_property_views', true); 36 37 update_post_meta($post_id, '_hvnly_property_views', $views + 1); 38 39 // 2. Daily views 40 $daily_views = get_post_meta($post_id, '_hvnly_property_daily_views', true); 41 if (!is_array($daily_views)) { 42 $daily_views = []; 43 } 44 45 $today = current_time('Y-m-d'); 46 47 if (isset($daily_views[$today])) { 48 $daily_views[$today]++; 49 } else { 50 $daily_views[$today] = 1; 51 } 52 53 update_post_meta($post_id, '_hvnly_property_daily_views', $daily_views); 37 54 } 38 55 } 56 39 57 40 58 /** … … 64 82 return number_format_i18n($views); 65 83 } 84 85 86 public static function get_daily_views_data($post_id) 87 { 88 $daily_views = get_post_meta($post_id, '_hvnly_property_daily_views', true); 89 90 if (empty($daily_views) || !is_array($daily_views)) { 91 // error_log('Fallback triggered for daily views on post ' . $post_id); 92 // error_log('Current meta: ' . print_r($daily_views, true)); 93 return [ 94 'labels' => ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], 95 'data' => [10, 25, 40, 32, 55, 20, 18], // fallback sample 96 ]; 97 } 98 99 // Sort by date ascending 100 ksort($daily_views); 101 102 // Keep only last 7 days (chronologically) 103 $daily_views = array_slice(array_reverse($daily_views), 0, 7, true); 104 $daily_views = array_reverse($daily_views); 105 106 $labels = []; 107 $data = []; 108 109 foreach ($daily_views as $date => $count) { 110 $labels[] = date_i18n('M j', strtotime($date)); // e.g., Jul 26 111 $data[] = (int) $count; 112 } 113 114 return [ 115 'labels' => $labels, 116 'data' => $data, 117 ]; 118 } 66 119 } 67 120 } -
havenlytics/trunk/public/assets/css/havenlytics-mortgage-calculator.init.css
r3334405 r3334735 428 428 429 429 .Havenlytics_mortgage_cal-currency select { 430 background: transparent ;430 background: transparent !important; 431 431 border: none; 432 432 color: white; -
havenlytics/trunk/public/assets/css/havenlytics-property-popups.css
r3334405 r3334735 298 298 /* Map Styles */ 299 299 .havenlytics_popup_map { 300 height: 500px;300 max-height: 550px; 301 301 background: #f0f0f0; 302 302 border-radius: 10px; -
havenlytics/trunk/public/assets/css/havenlytics-property-single.css
r3324509 r3334735 1085 1085 transform: scale(1.3); 1086 1086 } 1087 1088 1089 /* Property view count chart pie css */ 1090 .havenlytics-single-property-container .havenlytics-daily-stats-card{ background: var(--havenlytics-cardBg); 1091 border: var(--havenlytics-cardBorder); 1092 box-shadow: var(--havenlytics-cardShadow); 1093 border-radius: var(--havenlytics-cardRadius); 1094 padding: var(--havenlytics-cardPadding); 1095 margin-bottom: 0.5rem; 1096 } -
havenlytics/trunk/public/assets/js/havenlytics-frontend-scripts.js
r3334405 r3334735 723 723 724 724 725 // Havenlytics Daily Views Chart 726 document.addEventListener("DOMContentLoaded", function () { 727 const canvas = document.getElementById("havenlyticsDailyViewsChart"); 728 729 if (typeof Chart === 'undefined' || !canvas || typeof havenlyticsChartData === 'undefined') { 730 console.warn("Chart.js, canvas element, or chart data is missing."); 731 return; 732 } 733 734 const ctx = canvas.getContext("2d"); 735 const rootStyles = getComputedStyle(document.documentElement); 736 737 new Chart(ctx, { 738 type: 'line', 739 data: { 740 labels: havenlyticsChartData.labels, 741 datasets: [{ 742 label: 'Views', 743 data: havenlyticsChartData.data, 744 backgroundColor: rootStyles.getPropertyValue('--havenlytics-primary').trim() + '1A', 745 borderColor: rootStyles.getPropertyValue('--havenlytics-primary').trim(), 746 borderWidth: 2, 747 fill: true, 748 tension: 0.3, 749 pointRadius: 4, 750 pointHoverRadius: 6, 751 pointBackgroundColor: rootStyles.getPropertyValue('--havenlytics-primary').trim(), 752 pointHoverBackgroundColor: rootStyles.getPropertyValue('--havenlytics-secondary').trim(), 753 pointBorderColor: rootStyles.getPropertyValue('--havenlytics-primary').trim(), 754 pointHoverBorderColor: rootStyles.getPropertyValue('--havenlytics-secondary').trim(), 755 }] 756 }, 757 options: { 758 responsive: true, 759 maintainAspectRatio: false, 760 plugins: { 761 legend: { display: false }, 762 tooltip: { 763 mode: 'index', 764 intersect: false, 765 backgroundColor: rootStyles.getPropertyValue('--havenlytics-primary').trim(), 766 titleColor: rootStyles.getPropertyValue('--havenlytics-bg-white').trim(), 767 bodyColor: rootStyles.getPropertyValue('--havenlytics-bg-white').trim(), 768 } 769 }, 770 scales: { 771 y: { 772 beginAtZero: true, 773 ticks: { 774 color: rootStyles.getPropertyValue('--havenlytics-text-secondary').trim(), 775 }, 776 grid: { 777 color: rootStyles.getPropertyValue('--havenlytics-border').trim(), 778 } 779 }, 780 x: { 781 ticks: { 782 color: rootStyles.getPropertyValue('--havenlytics-text-secondary').trim(), 783 }, 784 grid: { 785 color: 'transparent', 786 } 787 } 788 } 789 } 790 }); 791 }); 792 793 794 795 796 797 798 799 800 801 725 802 })(jQuery); 726 803 -
havenlytics/trunk/public/class-frontend-assets.php
r3334405 r3334735 173 173 174 174 175 175 176 // ✅ Havenlytics Map JS 176 177 wp_enqueue_script( … … 209 210 } 210 211 212 213 // ✅ Havenlytics chart JS 214 wp_enqueue_script( 215 'havenlytics-chart', 216 HVNLY_PROPERTY_URL . 'public/assets/plugins/chart/chart.js', 217 [], 218 HVNLY_PROPERTY_VERSION, 219 true 220 ); 221 222 211 223 // ✅ Front End JS 212 224 wp_enqueue_script( 213 225 'havenlytics-frontend-scripts', 214 226 HVNLY_PROPERTY_URL . 'public/assets/js/havenlytics-frontend-scripts.js', 215 ['jquery'], 216 HVNLY_PROPERTY_VERSION, 217 true 218 ); 227 ['jquery', 'havenlytics-owl-carousel', 'havenlytics-leaflet', 'havenlytics-chart'], 228 HVNLY_PROPERTY_VERSION, 229 true 230 ); 231 232 // ✅ Safely prepare data 233 $chart_data = Hvnly_Property_Views::get_daily_views_data(get_the_ID()); 234 235 wp_localize_script('havenlytics-frontend-scripts', 'havenlyticsChartData', [ 236 'labels' => !empty($chart_data['labels']) ? $chart_data['labels'] : [], 237 'data' => !empty($chart_data['data']) ? $chart_data['data'] : [], 238 ]); 219 239 } 220 240 } -
havenlytics/trunk/readme.txt
r3334405 r3334735 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.2 8 Stable tag: 1.0. 88 Stable tag: 1.0.9 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 59 59 The following pages will be automatically created upon plugin activation (if not already present): 60 60 61 - [havenlytics_grid]62 - [havenlytics_list]63 - [havenlytics_mortgage_calculator]61 - Grid Property 62 - Grid Property 63 - Mortgage Calculator 64 64 65 65 = Grid View = … … 145 145 146 146 == Changelog == 147 148 = 1.0.8 = 147 = 1.0.9 (2025-07-27) = 148 * Added new frontend chart widget to track daily and weekly property views 149 * Added dynamic canvas rendering using Chart.js 150 * Improved i18n with proper use of `esc_html__()` and text domain `havenlytics` 151 * Minor UI style enhancements using CSS variables 152 * Ensured WP coding standards with output escaping for JSON/HTML 153 154 155 = 1.0.8 (2025-07-26) = 149 156 * Added property view counter to track how many users viewed a property 150 157 * Automatically create required pages on plugin activation … … 152 159 153 160 154 = 1.0.7 =161 = 1.0.7 (2025-07-23) = 155 162 * Fixed responsive UI issues across various sections for better mobile experience. 156 163 * Organized modal templates into a separate folder for better code structure and maintainability. … … 159 166 160 167 161 = 1.0.6 =168 = 1.0.6 (2025-07-22) = 162 169 * Introduced dynamic rendering of featured properties in the single property widget carousel. 163 170 * Added option to enable or disable "Featured Property" for individual listings via the property edit screen. … … 165 172 166 173 167 = 1.0.5 =174 = 1.0.5 (2025-07-13) = 168 175 * Added feedback form link in plugin readme 169 176 * Improved documentation structure -
havenlytics/trunk/templates/hvnly_property-single.php
r3334405 r3334735 232 232 <!-- Property Overview --> 233 233 <div class="property-details-card"> 234 <h2 class="section-title">Overview</h2> 235 234 235 <h2 class="section-title"><?php esc_html_e('Overview', 'havenlytics'); ?></h2> 236 236 <div class="row"> 237 237 <div class="col-lg-4 col-md-6"> … … 345 345 <!-- Property Summary --> 346 346 <div class="property-details-card"> 347 <h2 class="section-title">Property Summary</h2> 347 <h2 class="section-title"><?php esc_html_e('Property Summary', 'havenlytics'); ?></h2> 348 348 349 <p class="property-description"> 349 350 <?php echo esc_html($short_description); ?> … … 354 355 <!-- Property Details --> 355 356 <div class="property-details-card"> 356 <h2 class="section-title">Property Details</h2> 357 <h2 class="section-title"><?php esc_html_e('Property Details', 'havenlytics'); ?></h2> 358 357 359 <div class="property-description"> 358 360 <?php the_content(); ?> … … 475 477 <!-- Popup Gallery --> 476 478 <div class="property-details-card"> 477 <h2 class="section-title">Property Gallery</h2> 479 <h2 class="section-title"><?php esc_html_e('Property Gallery', 'havenlytics'); ?></h2> 480 478 481 <div class="row"> 479 482 <div class="col-md-12 mb-4"> … … 525 528 <a href="#" class="havenlytics_gallery_fancybox_property_button" 526 529 target="_blank"> 527 View Property Details <i class="fas fa-arrow-right"></i> 530 <?php esc_html_e('View Property Details', 'havenlytics'); ?><i 531 class="fas fa-arrow-right"></i> 528 532 </a> 529 533 </div> … … 549 553 <!-- Amenities Section --> 550 554 <div class="property-details-card"> 551 <h2 class="section-title">Property Amenities</h2> 555 556 <h2 class="section-title"><?php esc_html_e('Property Amenities', 'havenlytics'); ?></h2> 552 557 <div class="havenlytics-amenities-grid"> 553 558 <?php … … 560 565 <i class="fas fa-calendar"></i> 561 566 </div> 562 <h4>Book Property</h4> 567 <h4><?php esc_html_e('Book Property', 'havenlytics'); ?> 568 </h4> 569 563 570 </div> 564 571 <?php endif; ?> … … 573 580 <i class="fas fa-calculator"></i> 574 581 </div> 575 <h4>Mortgage calculator</h4> 582 <h4> 583 <?php esc_html_e('Mortgage calculator', 'havenlytics'); ?></h4> 584 576 585 </div> 577 586 <?php endif; ?> … … 583 592 <i class="fas fa-vr-cardboard"></i> 584 593 </div> 585 <h4>Virtual Tour</h4> 594 <h4><?php esc_html_e('Virtual Tour', 'havenlytics'); ?></h4> 595 586 596 </div> 587 597 <?php endif; ?> … … 592 602 <i class="fas fa-vector-square"></i> 593 603 </div> 594 <h4>Floorplan</h4> 604 <h4><?php esc_html_e('Floorplan', 'havenlytics'); ?></h4> 605 595 606 </div> 596 607 <?php endif; ?> … … 601 612 <i class="fas fa-file-alt"></i> 602 613 </div> 603 <h4>View Brochure</h4> 614 <h4><?php esc_html_e('View Brochure', 'havenlytics'); ?> 615 </h4> 616 604 617 </div> 605 618 <?php endif; ?> … … 610 623 <i class="fas fa-clipboard"></i> 611 624 </div> 612 <h4>View Epc</h4> 625 <h4><?php esc_html_e('View Epc', 'havenlytics'); ?></h4> 626 613 627 </div> 614 628 <?php endif; ?> … … 619 633 <i class="fas fa-map-marked-alt"></i> 620 634 </div> 621 <h4>Map</h4> 635 <h4><?php esc_html_e('Map', 'havenlytics'); ?></h4> 636 622 637 </div> 623 638 <?php endif; ?> … … 628 643 <i class="fas fa-phone-alt"></i> 629 644 </div> 630 <h4>Request Call Back</h4> 645 <h4><?php esc_html_e('Request Call Back', 'havenlytics'); ?> 646 </h4> 647 631 648 </div> 632 649 <?php endif; ?> … … 637 654 <i class="fas fa-calendar-check"></i> 638 655 </div> 639 <h4>Arrange Viewing</h4> 656 <h4><?php esc_html_e('Arrange Viewing', 'havenlytics'); ?> 657 </h4> 658 640 659 </div> 641 660 <?php endif; ?> … … 653 672 <div class="property-details-card"> 654 673 655 <h2 class="section-title">Featured Property</h2> 674 675 <h2 class="section-title"><?php esc_html_e('Featured Property', 'havenlytics'); ?></h2> 656 676 657 677 <div class="havenlytics_featured_items-widget"> … … 877 897 </div> 878 898 <?php endif; ?> 899 900 <!-- Daily View Property Section --> 901 <div class="property-details-card"> 902 903 <h2 class="section-title"><?php esc_html_e('Property Views This Week', 'havenlytics'); ?> 904 </h2> 905 906 <?php 907 // Get chart data 908 $chart_data = Hvnly_Property_Views::get_daily_views_data(get_the_ID()); 909 910 // Prepare and safely encode chart data 911 $labels = !empty($chart_data['labels']) ? wp_json_encode($chart_data['labels']) : '[]'; 912 $data = !empty($chart_data['data']) ? wp_json_encode($chart_data['data']) : '[]'; 913 ?> 914 915 <div class="havenlytics-daily-stats-card"> 916 917 <div class="havenlytics-daily-stats-chart-wrapper" style="width: 100%; height: 280px;"> 918 <canvas id="havenlyticsDailyViewsChart" style="width: 100%; height: 100%;"></canvas> 919 </div> 920 </div> 921 922 923 924 925 </div> 926 927 879 928 880 929 </div> … … 1130 1179 </a> 1131 1180 </li> 1181 <li class="havenlytics-property-views-item"> 1182 <div class="havenlytics-property-views-card"> 1183 <svg class="havenlytics-property-views-icon" viewBox="0 0 24 24" 1184 aria-hidden="true"> 1185 <path fill="currentColor" fill-rule="evenodd" 1186 clip-rule="evenodd" 1187 d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm-3-5c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z" /> 1188 </svg> 1189 <div class="havenlytics-property-views-count"> 1190 <?php echo esc_html(Hvnly_Property_Views::get_formatted_views(get_the_ID())); ?> 1191 1192 </div> 1193 <!-- Tooltip element --> 1194 <div class="havenlytics-property-views-tooltip"> 1195 <?php esc_html_e('Property Views', 'havenlytics'); ?> 1196 </div> 1197 </div> 1198 </li> 1132 1199 </ul> 1133 1200 </div> -
havenlytics/trunk/templates/property-card-grid.php
r3334405 r3334735 182 182 </div> 183 183 <!-- Tooltip element --> 184 <div class="havenlytics-property-views-tooltip">Property Views</div> 184 <div class="havenlytics-property-views-tooltip"> 185 <?php esc_html_e('Property Views', 'havenlytics'); ?></div> 185 186 </div> 186 187 </li> -
havenlytics/trunk/templates/property-card-list.php
r3334405 r3334735 171 171 </div> 172 172 <!-- Tooltip element --> 173 <div class="havenlytics-property-views-tooltip">Property Views</div> 173 <div class="havenlytics-property-views-tooltip"> 174 <?php esc_html_e('Property Views', 'havenlytics'); ?></div> 174 175 </div> 175 176 </li> -
havenlytics/trunk/templates/property-card.php
r3334405 r3334735 176 176 </div> 177 177 <!-- Tooltip element --> 178 <div class="havenlytics-property-views-tooltip">Property Views</div> 178 <div class="havenlytics-property-views-tooltip"> 179 <?php esc_html_e('Property Views', 'havenlytics'); ?></div> 179 180 </div> 180 181 </li> -
havenlytics/trunk/uninstall.php
r3334405 r3334735 51 51 delete_option('hvnly_property_grid_page_id'); 52 52 delete_option('hvnly_property_list_page_id'); 53 delete_option('hvnly_mortgage_calculator_page_id'); 53 54 54 55 // Add any other plugin options or custom tables cleanup below as needed
Note: See TracChangeset
for help on using the changeset viewer.