Is in this function
function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
if ( ! is_array( $list ) )
retu array();
if ( empty( $args ) )
retu $list;
$operator = strtoupper( $operator );
$count = count( $args );
$filtered = array();
foreach ( $list as $key => $obj ) {
$to_match = (array) $obj;
$matched = 0;
foreach ( $args as $m_key => $m_value ) {
if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] )
$matched++;
}
if ( ( 'AND' == $operator && $matched == $count )
|| ( 'OR' == $operator && $matched > 0 )
|| ( 'NOT' == $operator && 0 == $matched ) ) {
$filtered[$key] = $obj;
}
}
retu $filtered;
}
WordPress ...
ما را در سایت WordPress دنبال می کنید
برچسب : نویسنده : استخدام کار wpss بازدید : 85 تاريخ : پنجشنبه 16 ارديبهشت 1395 ساعت: 2:05