Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_filter_object_list [ WordPress Function ]

wp_filter_object_list ( $list, $args = array(), $operator = 'and', $field = false )
Parameters:
  • (array) $list An array of objects to filter
  • (array) $args An array of key => value arguments to match against each object
  • (string) $operator The logical operation to perform. 'or' means only one element from the array needs to match; 'and' means all elements must match. The default is 'and'.
  • (bool|string) $field A field from the object to place instead of the entire object
Returns:
  • (array) A list of objects or object fields
Defined at:



Filters a list of objects, based on a set of key => value arguments.

Source


<?php
function wp_filter_object_list$list$args = array(), $operator 'and'$field false ) {
    if ( ! 
is_array$list ) )
        return array();

    
$list wp_list_filter$list$args$operator );

    if ( 
$field )
        
$list wp_list_pluck$list$field );

    return 
$list;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics