| 1: | <?php |
| 2: | /** |
| 3: | * Elementor EPL Agent Template document. |
| 4: | * |
| 5: | * @package EPL |
| 6: | * @subpackage PageBuilders/Elementor |
| 7: | * @since 3.6.0 |
| 8: | */ |
| 9: | |
| 10: | // Exit if accessed directly. |
| 11: | if ( ! defined( 'ABSPATH' ) ) { |
| 12: | exit; |
| 13: | } |
| 14: | |
| 15: | /** |
| 16: | * Dedicated saved-template document for Agents Loop items. |
| 17: | * |
| 18: | * Agent designs deliberately use a normal library-document lifecycle instead |
| 19: | * of Elementor Pro's Loop Item lifecycle. They are rendered inside a property |
| 20: | * Loop Item and must not own an independent query, preview provider, Theme |
| 21: | * Builder conditions, or Loop CSS selector rewriting. |
| 22: | */ |
| 23: | class EPL_Elementor_Agent_Document extends \Elementor\Modules\Library\Documents\Container { |
| 24: | |
| 25: | /** Document type slug. */ |
| 26: | const TYPE = 'epl-agent'; |
| 27: | |
| 28: | /** |
| 29: | * Get document name. |
| 30: | * |
| 31: | * @return string |
| 32: | * @since 3.6.0 New: Elementor widgets (beta). |
| 33: | */ |
| 34: | public function get_name() { |
| 35: | return self::TYPE; |
| 36: | } |
| 37: | |
| 38: | /** |
| 39: | * Get document type. |
| 40: | * |
| 41: | * @return string |
| 42: | * @since 3.6.0 New: Elementor widgets (beta). |
| 43: | */ |
| 44: | public static function get_type() { |
| 45: | return self::TYPE; |
| 46: | } |
| 47: | |
| 48: | /** |
| 49: | * Get singular title. |
| 50: | * |
| 51: | * @return string |
| 52: | * @since 3.6.0 New: Elementor widgets (beta). |
| 53: | */ |
| 54: | public static function get_title() { |
| 55: | return esc_html__( 'EPL Agent Template', 'easy-property-listings' ); |
| 56: | } |
| 57: | |
| 58: | /** |
| 59: | * Get plural title. |
| 60: | * |
| 61: | * @return string |
| 62: | * @since 3.6.0 New: Elementor widgets (beta). |
| 63: | */ |
| 64: | public static function get_plural_title() { |
| 65: | return esc_html__( 'EPL Agent Templates', 'easy-property-listings' ); |
| 66: | } |
| 67: | |
| 68: | /** |
| 69: | * Document properties. |
| 70: | * |
| 71: | * @return array |
| 72: | * @since 3.6.0 New: Elementor widgets (beta). |
| 73: | */ |
| 74: | public static function get_properties() { |
| 75: | $properties = parent::get_properties(); |
| 76: | $properties['support_conditions'] = false; |
| 77: | return $properties; |
| 78: | } |
| 79: | } |
| 80: |