Switch language

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




wp_find_hierarchy_loop [ WordPress Function ]

wp_find_hierarchy_loop ( $callback, $start, $start_parent, $callback_args = array() )
Access:
  • private
Parameters:
  • (callback) $callback function that accepts ( ID, $callback_args ) and outputs parent_ID
  • (int) $start The ID to start the loop check at
  • (int) $start_parent the parent_ID of $start to use instead of calling $callback( $start ). Use null to always use $callback
  • (array) $callback_args optional additional arguments to send to $callback
Returns:
  • (array) IDs of all members of loop
Defined at:



Finds hierarchy loops using a callback function that maps object IDs to parent IDs.

Source


<?php
function wp_find_hierarchy_loop$callback$start$start_parent$callback_args = array() ) {
    
$override is_null$start_parent ) ? array() : array( $start => $start_parent );

    if ( !
$arbitrary_loop_member wp_find_hierarchy_loop_tortoise_hare$callback$start$override$callback_args ) )
        return array();

    return 
wp_find_hierarchy_loop_tortoise_hare$callback$arbitrary_loop_member$override$callback_argstrue );
}
?>

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