PluginProbe
Property Hive / 2.3.1
Property Hive v2.3.1
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
propertyhive / templates / account / owner-properties.php

owner-properties.php in Property Hive 2.3.1, at templates/account/owner-properties.php

101 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Applicant viewings page within My Account
4 *
5 * This template can be overridden by copying it to yourtheme/propertyhive/account/applicant-viewings.php.
6 *
7 * @author PropertyHive
8 * @package PropertyHive/Templates
9 * @version 1.0.0
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15 ?>
16
17 <div class="propertyhive-owner-properties">
18
19 <?php
20 if ( !empty($properties) )
21 {
22 echo '
23 <table class="viewings-table upcoming-viewings-table" width="100%">
24 <tr>
25 <th>&nbsp;</th>
26 <th>' . esc_html(__( 'Address', 'propertyhive' )) . '</th>
27 <th>' . esc_html(__( 'Price', 'propertyhive' )) . '</th>
28 <th>' . esc_html(__( 'Status', 'propertyhive' )) . '</th>
29 </tr>
30 ';
31 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable included through the account rendering helper scope.
32 foreach ( $properties as $property )
33 {
34 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable included through the account rendering helper scope.
35 $property_url = ( 'yes' === $property->on_market )
36 ? get_permalink( $property->id )
37 : '';
38
39 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable included through the account rendering helper scope.
40 $image = $property->get_main_photo_src();
41
42 echo '<tr>';
43
44 echo '<td>';
45
46 if ( false !== $image )
47 {
48 if ( $property_url )
49 {
50 echo '<a href="' . esc_url( $property_url ) . '">';
51 }
52
53 echo '<img src="' . esc_url( $image ) . '" width="75" alt="' . esc_attr( get_the_title( $property->id ) ) . '">';
54
55 if ( $property_url )
56 {
57 echo '</a>';
58 }
59 }
60
61 echo '</td>';
62
63 echo '<td>';
64
65 if ( $property_url )
66 {
67 echo '<a href="' . esc_url( $property_url ) . '">';
68 }
69
70 echo esc_html( get_the_title( $property->id ) );
71
72 if ( $property_url )
73 {
74 echo '</a>';
75 }
76
77 echo '</td>';
78
79 echo '<td>' . wp_kses_post( $property->get_formatted_price() ) . '</td>';
80
81 echo '<td>' .
82 esc_html( $property->availability ) .
83 '<br>' .
84 ( 'yes' === $property->on_market
85 ? esc_html__( 'On Market', 'propertyhive' )
86 : esc_html__( 'Not On Market', 'propertyhive' )
87 ) .
88 '</td>';
89
90 echo '</tr>';
91 }
92 echo '</table>';
93 }
94 else
95 {
96 echo '<p class="propertyhive-info">' . esc_html(__( 'No properties found', 'propertyhive' )) . '</p>';
97 }
98 ?>
99
100 </div>
101