| 1 |
<?php |
| 2 |
|
| 3 |
add_shortcode( 'avada_property_actions', function( $atts ) { |
| 4 |
$atts = shortcode_atts( array( |
| 5 |
|
| 6 |
), $atts ); |
| 7 |
|
| 8 |
if ( get_post_type( get_the_ID() ) != 'property' ) |
| 9 |
{ |
| 10 |
return ''; |
| 11 |
} |
| 12 |
|
| 13 |
fusion_element_rendering_elements( true ); |
| 14 |
|
| 15 |
global $property; |
| 16 |
|
| 17 |
if ( empty($property) ) |
| 18 |
{ |
| 19 |
$property = new PH_Property(get_the_ID()); |
| 20 |
} |
| 21 |
|
| 22 |
ob_start(); |
| 23 |
|
| 24 |
echo '<div ' . FusionBuilder::attributes( 'property-actions-shortcode' ) . '>'; |
| 25 |
propertyhive_template_single_actions(); |
| 26 |
echo '</div>'; |
| 27 |
|
| 28 |
$html = ob_get_clean(); |
| 29 |
|
| 30 |
fusion_element_rendering_elements( false ); |
| 31 |
|
| 32 |
return $html; |
| 33 |
}); |