Switch language

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




wp_doc_link_parse [ WordPress Function ]

wp_doc_link_parse ( $content )
Defined at:



No description yet.

Source


<?php
function wp_doc_link_parse$content ) {
    if ( !
is_string$content ) || empty( $content ) )
        return array();

    if ( !
function_exists('token_get_all') )
        return array();

    
$tokens token_get_all$content );
    
$functions = array();
    
$ignore_functions = array();
    for ( 
$t 0$count count$tokens ); $t $count$t++ ) {
        if ( !
is_array$tokens[$t] ) ) continue;
        if ( 
T_STRING == $tokens[$t][0] && ( '(' == $tokens$t ] || '(' == $tokens$t ] ) ) {
            
// If it's a function or class defined locally, there's not going to be any docs available
            
if ( ( isset( $tokens$t ][1] ) && in_array$tokens$t ][1], array( 'function''class' ) ) ) || ( isset( $tokens$t ][0] ) && T_OBJECT_OPERATOR == $tokens$t ][0] ) ) {
                
$ignore_functions[] = $tokens[$t][1];
            }
            
// Add this to our stack of unique references
            
$functions[] = $tokens[$t][1];
        }
    }

    
$functions array_unique$functions );
    
sort$functions );
    
$ignore_functions apply_filters'documentation_ignore_functions'$ignore_functions );
    
$ignore_functions array_unique$ignore_functions );

    
$out = array();
    foreach ( 
$functions as $function ) {
        if ( 
in_array$function$ignore_functions ) )
            continue;
        
$out[] = $function;
    }

    return 
$out;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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