| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | if ( ! defined( 'ABSPATH' ) ) { |
| 12: | exit; |
| 13: | } |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | |
| 26: | class EPL_Elementor_Loop_Card_Document extends EPL_Elementor_Listing_Document { |
| 27: | |
| 28: | |
| 29: | const TYPE = 'epl-loop-card'; |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | |
| 35: | |
| 36: | |
| 37: | public function get_name() { |
| 38: | return self::TYPE; |
| 39: | } |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | |
| 45: | |
| 46: | |
| 47: | public static function get_type() { |
| 48: | return self::TYPE; |
| 49: | } |
| 50: | |
| 51: | |
| 52: | |
| 53: | |
| 54: | |
| 55: | |
| 56: | |
| 57: | public static function get_title() { |
| 58: | return esc_html__( 'EPL Listing Card', 'easy-property-listings' ); |
| 59: | } |
| 60: | |
| 61: | |
| 62: | |
| 63: | |
| 64: | |
| 65: | |
| 66: | |
| 67: | public static function get_plural_title() { |
| 68: | return esc_html__( 'EPL Listing Cards', 'easy-property-listings' ); |
| 69: | } |
| 70: | |
| 71: | |
| 72: | |
| 73: | |
| 74: | |
| 75: | protected function register_controls() { |
| 76: | parent::register_controls(); |
| 77: | |
| 78: | $this->start_controls_section( |
| 79: | 'epl_card_settings', |
| 80: | array( |
| 81: | 'label' => esc_html__( 'EPL Card Settings', 'easy-property-listings' ), |
| 82: | 'tab' => \Elementor\Controls_Manager::TAB_SETTINGS, |
| 83: | ) |
| 84: | ); |
| 85: | |
| 86: | $this->add_control( |
| 87: | 'epl_card_preview_width', |
| 88: | array( |
| 89: | 'label' => esc_html__( 'Editing Preview Width (px)', 'easy-property-listings' ), |
| 90: | 'type' => \Elementor\Controls_Manager::NUMBER, |
| 91: | 'min' => 150, |
| 92: | 'max' => 800, |
| 93: | 'step' => 10, |
| 94: | 'default' => 320, |
| 95: | 'description' => esc_html__( 'Narrows the editor to card width. No effect on the front end.', 'easy-property-listings' ), |
| 96: | ) |
| 97: | ); |
| 98: | |
| 99: | $this->end_controls_section(); |
| 100: | } |
| 101: | } |
| 102: | |