wp_doc_link_parse [ WordPress Function ]
wp_doc_link_parse ( $content )
| Defined at: |
|
Soorgelijke functies: wp_link_pages, _wp_link_page, wp_set_link_cats, wp_get_link_cats, add_links_page
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 + 1 ] || '(' == $tokens[ $t + 2 ] ) ) {
// If it's a function or class defined locally, there's not going to be any docs available
if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][1], array( 'function', 'class' ) ) ) || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][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
- wp_doc_link_parse | A HitchHackers guide through WordPress
Feb 12, 2011 ... function wp_doc_link_parse( $content ) { if ( !is_string( $content ) || empty( $ content ) ) return array(); if ( !function_exists('token_get_all') ) return ...
hitchhackerguide.com - WordPress › Support » Few issues after upgrading to 2.8
Anything wrong with your translation stuff? The other one in admin happens in wp_doc_link_parse() so did you maybe upload some massive attachment?
wordpress.org - Docs for page misc.php
wp_doc_link_parse (line 276). void wp_doc_link_parse ( $content). $content. wp_reset_vars (line 241). Resets global variables based on $_GET and $_POST ...
phpdoc.wordpress.org - <?php /** * Theme editor administration panel. * * @package ...
$functions = wp_doc_link_parse( $content ); $docs_select = '<select name="docs -list" id="docs-list">'; $docs_select .= '<option value="">' . esc_attr__( 'Function ...
svn.automattic.com