1 | <?php |
||
30 | class Term_Condition extends Condition { |
||
31 | |||
32 | /** |
||
33 | * WP_Toolset to fetch term data with |
||
34 | * |
||
35 | * @var WP_Toolset |
||
36 | */ |
||
37 | protected $wp_toolset; |
||
38 | |||
39 | /** |
||
40 | * Constructor |
||
41 | */ |
||
42 | public function __construct( $wp_toolset ) { |
||
45 | |||
46 | /** |
||
47 | * Get the condition value |
||
48 | * |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function get_value() { |
||
62 | |||
63 | /** |
||
64 | * Pluck term id from a full term descriptor |
||
65 | * |
||
66 | * @param array $full_term_descriptor |
||
67 | * @return integer |
||
68 | */ |
||
69 | protected function get_term_id_from_full_term_descriptor( $full_term_descriptor ) { |
||
72 | |||
73 | /** |
||
74 | * Pluck term ids from array of full term descriptors |
||
75 | * |
||
76 | * @param array $full_term_descriptors |
||
77 | * @return array<integer> |
||
78 | */ |
||
79 | protected function get_term_ids_from_full_term_descriptors( $full_term_descriptors ) { |
||
82 | |||
83 | /** |
||
84 | * Check if the condition is fulfilled |
||
85 | * |
||
86 | * @param array $environment |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function is_fulfilled( $environment ) { |
||
117 | } |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.