diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index b717f65a5..356c6b001 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -272,6 +272,9 @@ 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(); diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index 813c1e476..fb6fba4ae 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -111,12 +111,14 @@ default: if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { $functions = wp_doc_link_parse( $content ); - $docs_select = ''; + $docs_select .= ''; + foreach ( $functions as $function) { + $docs_select .= ''; + } + $docs_select .= ''; } - $docs_select .= ''; } $content = htmlspecialchars( $content ); @@ -204,7 +206,7 @@ foreach ( $plugin_files as $plugin_file ) : - +