Code Duplication    Length = 7-7 lines in 3 locations

src/wp-includes/post.php 2 locations

@@ 863-869 (lines=7) @@
860
 *                               Default 'and'.
861
 * @return array A list of post status names or objects.
862
 */
863
function get_post_stati( $args = array(), $output = 'names', $operator = 'and' ) {
864
	global $wp_post_statuses;
865
866
	$field = ('names' == $output) ? 'name' : false;
867
868
	return wp_filter_object_list($wp_post_statuses, $args, $operator, $field);
869
}
870
871
/**
872
 * Whether the post type is hierarchical.
@@ 961-967 (lines=7) @@
958
 *                               must match; 'not' means no elements may match. Default 'and'.
959
 * @return array A list of post type names or objects.
960
 */
961
function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) {
962
	global $wp_post_types;
963
964
	$field = ('names' == $output) ? 'name' : false;
965
966
	return wp_filter_object_list($wp_post_types, $args, $operator, $field);
967
}
968
969
/**
970
 * Registers a post type.

src/wp-includes/taxonomy.php 1 location

@@ 168-174 (lines=7) @@
165
 *                         Default 'and'.
166
 * @return array A list of taxonomy names or objects.
167
 */
168
function get_taxonomies( $args = array(), $output = 'names', $operator = 'and' ) {
169
	global $wp_taxonomies;
170
171
	$field = ('names' == $output) ? 'name' : false;
172
173
	return wp_filter_object_list($wp_taxonomies, $args, $operator, $field);
174
}
175
176
/**
177
 * Return the names or objects of the taxonomies which are registered for the requested object or object type, such as