class-wpml-ls-menu-slot.php
988 Bytes
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
42
43
44
45
<?php
class WPML_LS_Menu_Slot extends WPML_LS_Slot {
/**
* @return bool
*/
public function is_enabled() {
return true;
}
/**
* @return array
*/
protected function get_allowed_properties() {
$allowed_properties = array(
'position_in_menu' => array(
'type' => 'string',
'force_missing_to' => 'after',
),
'is_hierarchical' => array(
'type' => 'int',
'force_missing_to' => 1,
),
'show' => array(
'type' => 'int',
'force_missing_to' => 1,
),
'template' => array(
'type' => 'string',
'force_missing_to' => $this->get_core_template( 'menu-item' ),
),
'slot_group' => array(
'type' => 'string',
'force_missing_to' => 'menus',
),
'slot_slug' => array(
'type' => 'int',
'force_missing_to' => 0,
),
);
return array_merge( parent::get_allowed_properties(), $allowed_properties );
}
}