PluginProbe
MotoPress Hotel Booking for Divi / trunk
MotoPress Hotel Booking for Divi vtrunk
trunk 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 2.0.0
mphb-divi / divi-4 / includes / modules / accommodation / featured-image / featured-image.php

featured-image.php in MotoPress Hotel Booking for Divi trunk, at divi-4/includes/modules/accommodation/featured-image/featured-image.php

47 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class MPHB_Divi_Accommodation_Type_Featured_Image_Module extends MPHB_Divi_Abstract_Accommodation_Module {
4
5 public $slug = 'mphb-divi-accommodation-type-featured-image';
6
7 public function init() {
8 $this->name = esc_html__( 'HB Acc. Type Featured Image', 'mphb-divi' );
9 }
10
11 public function mphb_get_fields() {
12 return array(
13 'link_to_post' => array(
14 'label' => esc_html__( 'Link to post', 'mphb-divi' ),
15 'type' => 'yes_no_button',
16 'options' => array(
17 'on' => esc_html__( 'Yes', 'mphb-divi' ),
18 'off' => esc_html__( 'No', 'mphb-divi' ),
19 ),
20 'default' => 'off',
21 'computed_affects' => array(
22 '__html',
23 ),
24 ),
25 'image_size' => array(
26 'label' => esc_html__( 'Image size', 'mphb-divi' ),
27 'type' => 'select',
28 'options' => $this->get_image_sizes_select(),
29 'default' => 'large',
30 'computed_affects' => array(
31 '__html',
32 ),
33 ),
34 );
35 }
36
37 public function mphb_render_depends_on() {
38 return array( 'link_to_post', 'image_size' );
39 }
40
41 public static function get_html( $attrs = array() ) {
42 return MPHB_Divi_Renderers::accommodation_featured_image( $attrs );
43 }
44 }
45
46 new MPHB_Divi_Accommodation_Type_Featured_Image_Module();
47