class-wpml-ls-shortcode-actions-slot.php
1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
class WPML_LS_Shortcode_Actions_Slot extends WPML_LS_Slot {
/**
* @return array
*/
protected function get_allowed_properties() {
$allowed_properties = array(
'show' => array(
'type' => 'int',
'force_missing_to' => 0,
),
'template' => array(
'type' => 'string',
'force_missing_to' => $this->get_core_template( 'list-horizontal' ),
),
'slot_group' => array(
'type' => 'string',
'force_missing_to' => 'statics',
),
'slot_slug' => array(
'type' => 'string',
'force_missing_to' => 'shortcode_actions',
),
);
return array_merge( parent::get_allowed_properties(), $allowed_properties );
}
public function is_enabled() {
/**
* This filter allows to programmatically enable/disable the custom language switcher.
*
* @since 4.3.0
*
* @param bool $is_enabled The original status.
*/
return apply_filters( 'wpml_custom_language_switcher_is_enabled', parent::is_enabled() );
}
}