1 | <?php |
||
7 | class Container_Validator { |
||
8 | |||
9 | /** |
||
10 | * Proxy method that calls appropriate method for validation |
||
11 | * after some preliminary checks |
||
12 | * |
||
13 | * @param object $container |
||
14 | * @param string $type |
||
15 | * @param string $id |
||
16 | * @return boolean |
||
17 | */ |
||
18 | public function is_valid_container( $container, $type, $id, $check_rest_visibilty = true ) { |
||
31 | |||
32 | /** |
||
33 | * Validates Theme Options container |
||
34 | * |
||
35 | * @param object $container |
||
36 | * @param string $id |
||
37 | * @return boolean |
||
38 | */ |
||
39 | public function is_valid_theme_options_container( $container, $id = '' ) { |
||
42 | |||
43 | /** |
||
44 | * Validates Post Meta container |
||
45 | * |
||
46 | * @param object $container |
||
47 | * @param string $id |
||
48 | * @return boolean |
||
49 | */ |
||
50 | public function is_valid_post_meta_container( $container, $id ) { |
||
53 | |||
54 | /** |
||
55 | * Validates User Meta container |
||
56 | * |
||
57 | * @param object $container |
||
58 | * @param string $id |
||
59 | * @return boolean |
||
60 | */ |
||
61 | public function is_valid_user_meta_container( $container, $id ) { |
||
64 | |||
65 | /** |
||
66 | * Validates Term Meta container |
||
67 | * |
||
68 | * @param object $container |
||
69 | * @param string $id |
||
70 | * @return boolean |
||
71 | */ |
||
72 | public function is_valid_term_meta_container( $container, $id ) { |
||
97 | |||
98 | /** |
||
99 | * Validates Comment Meta container |
||
100 | * |
||
101 | * @param object $container |
||
102 | * @param string $id |
||
103 | * @return boolean |
||
104 | */ |
||
105 | public function is_valid_comment_meta_container( $container, $id = '' ) { |
||
108 | |||
109 | /** |
||
110 | * Returns the number of parents of a taxonomy term |
||
111 | * |
||
112 | * @param object $term |
||
113 | * @return int |
||
114 | */ |
||
115 | public static function get_term_level( $term ) { |
||
124 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.