1: <?php
2: /**
3: * SHORTCODE :: Listing Advanced [listing_advanced]
4: *
5: * @package EPL
6: * @subpackage Shortcode/ListingAdvanced
7: * @copyright Copyright (c) 2020, Merv Barrett
8: * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9: * @since 3.3
10: */
11:
12: // Exit if accessed directly.
13: if ( ! defined( 'ABSPATH' ) ) {
14: exit;
15: }
16:
17: /**
18: * Listing Shortcode [listing_advanced]
19: *
20: * This shortcode allows for you to specify the property type(s) using
21: * [listing_advanced post_type="property,rental" status="current,sold,leased" template="default"] option. You can also
22: * limit the number of entries that display. using [listing limit="5"]
23: *
24: * @param array $atts Shortcode attributes.
25: *
26: * @return false|string
27: * @since 1.0
28: */
29: function epl_shortcode_listing_advanced_callback( $atts ) {
30:
31: $shortcode = new EPL_Advanced_Shortcode_Listing( $atts );
32:
33: return $shortcode->render();
34: }
35: add_shortcode( 'listing_advanced', 'epl_shortcode_listing_advanced_callback' );
36: