diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index b717f65a52..356c6b0018 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 813c1e476e..fb6fba4ae5 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 = ''; } $content = htmlspecialchars( $content ); @@ -204,7 +206,7 @@ foreach ( $plugin_files as $plugin_file ) : - +