core/Container/Post_Meta_Container.php 1 location
|
@@ 248-262 (lines=15) @@
|
245 |
|
* |
246 |
|
* @return array<string> |
247 |
|
*/ |
248 |
|
public function get_post_type_visibility() { |
249 |
|
$all_post_types = get_post_types(); |
250 |
|
$filtered_collection = $this->condition_collection->filter( array( 'post_type' ) ); |
251 |
|
|
252 |
|
$shown_on = array(); |
253 |
|
foreach ( $all_post_types as $post_type ) { |
254 |
|
$environment = array( |
255 |
|
'post_type' => $post_type, |
256 |
|
); |
257 |
|
if ( $filtered_collection->is_fulfilled( $environment ) ) { |
258 |
|
$shown_on[] = $post_type; |
259 |
|
} |
260 |
|
} |
261 |
|
return $shown_on; |
262 |
|
} |
263 |
|
|
264 |
|
/** |
265 |
|
* COMMON USAGE METHODS |
core/Container/Term_Meta_Container.php 1 location
|
@@ 190-204 (lines=15) @@
|
187 |
|
* |
188 |
|
* @return array<string> |
189 |
|
*/ |
190 |
|
public function get_taxonomy_visibility() { |
191 |
|
$all_taxonomies = get_taxonomies(); |
192 |
|
$filtered_collection = $this->condition_collection->filter( array( 'term_taxonomy' ) ); |
193 |
|
|
194 |
|
$shown_on = array(); |
195 |
|
foreach ( $all_taxonomies as $taxonomy ) { |
196 |
|
$environment = array( |
197 |
|
'taxonomy' => $taxonomy, |
198 |
|
); |
199 |
|
if ( $filtered_collection->is_fulfilled( $environment ) ) { |
200 |
|
$shown_on[] = $taxonomy; |
201 |
|
} |
202 |
|
} |
203 |
|
return $shown_on; |
204 |
|
} |
205 |
|
|
206 |
|
/** |
207 |
|
* Show the container only on terms from the specified taxonomies. |