diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index e43d641f9..baf506fc0 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -91,10 +91,10 @@ default: if ( ! $error ) { $content = file_get_contents( $real_file ); - - if ( 'php' == mb_substr( $real_file, mb_strrpos( $real_file, '.' ) + 1 ) ) { + + if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { $functions = wp_doc_link_parse( $content ); - + $docs_select = ''; } - + $content = htmlspecialchars( $content ); $codepress_lang = codepress_get_lang($real_file); } diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 2afa56118..28fc83d20 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -83,19 +83,19 @@ default: update_recently_edited($file); - if (!is_file($real_file)) + if ( !is_file($real_file) ) $error = 1; - if (!$error && filesize($real_file) > 0) { + if ( !$error && filesize($real_file) > 0 ) { $f = fopen($real_file, 'r'); $content = fread($f, filesize($real_file)); - if ( 'php' == mb_substr( $real_file, mb_strrpos( $real_file, '.' ) + 1 ) ) { + if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { $functions = wp_doc_link_parse( $content ); - + $docs_select = '';