| 1 |
<?php |
| 2 |
/** |
| 3 |
* Single Property Actions (Make Enquiry etc) |
| 4 |
* Editable through use of the filter propertyhive_single_property_actions |
| 5 |
* |
| 6 |
* @author PropertyHive |
| 7 |
* @package PropertyHive/Templates |
| 8 |
* @version 1.0.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 12 |
|
| 13 |
global $post, $property; |
| 14 |
?> |
| 15 |
<div class="property_actions"> |
| 16 |
|
| 17 |
<?php do_action( 'propertyhive_property_actions_start' ); ?> |
| 18 |
|
| 19 |
<ul> |
| 20 |
|
| 21 |
<?php |
| 22 |
/** |
| 23 |
* propertyhive_single_property_summary hook |
| 24 |
* |
| 25 |
* @hooked propertyhive_make_enquiry_button - 10 |
| 26 |
* |
| 27 |
*/ |
| 28 |
do_action( 'propertyhive_property_actions_list_start' ); |
| 29 |
?> |
| 30 |
|
| 31 |
<?php |
| 32 |
foreach ($actions as $action) |
| 33 |
{ |
| 34 |
$action['class'] = ( isset( $action['class'] ) ) ? $action['class'] : ''; |
| 35 |
|
| 36 |
echo ' |
| 37 |
<li class="' . esc_attr($action['class']) . '"'; |
| 38 |
if ( isset( $action['parent_attributes'] ) && ! empty( $action['parent_attributes'] ) ) |
| 39 |
{ |
| 40 |
foreach ( $action['parent_attributes'] as $key => $value ) |
| 41 |
{ |
| 42 |
echo ' ' . $key . '="' . esc_attr($value) . '"'; |
| 43 |
} |
| 44 |
} |
| 45 |
echo '><a href="' . esc_url($action['href']) . '"'; |
| 46 |
if ( isset( $action['attributes'] ) && ! empty( $action['attributes'] ) ) |
| 47 |
{ |
| 48 |
foreach ( $action['attributes'] as $key => $value ) |
| 49 |
{ |
| 50 |
echo ' ' . $key . '="' . esc_attr($value) . '"'; |
| 51 |
} |
| 52 |
} |
| 53 |
echo '>' . esc_html($action['label']) . '</a></li> |
| 54 |
'; |
| 55 |
} |
| 56 |
?> |
| 57 |
|
| 58 |
<?php do_action( 'propertyhive_property_actions_list_end' ); ?> |
| 59 |
|
| 60 |
</ul> |
| 61 |
|
| 62 |
<?php do_action( 'propertyhive_property_actions_end' ); ?> |
| 63 |
|
| 64 |
</div> |