Docs: Simplify get_plugin_data() and get_file_data() description.

See #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45917 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2019-08-30 16:56:39 +00:00
parent b36feb1b5d
commit 3a0faad226
2 changed files with 11 additions and 16 deletions

View File

@@ -5684,11 +5684,11 @@ function wp_scheduled_delete() {
/**
* Retrieve metadata from a file.
*
* Searches for metadata in the first 8kiB of a file, such as a plugin or theme.
* Searches for metadata in the first 8 KB of a file, such as a plugin or theme.
* Each piece of metadata must be on its own line. Fields can not span multiple
* lines, the value will get cut at the end of the first line.
*
* If the file data is not within that first 8kiB, then the author should correct
* If the file data is not within that first 8 KB, then the author should correct
* their plugin file and move the data headers to the top.
*
* @link https://codex.wordpress.org/File_Header
@@ -5696,7 +5696,7 @@ function wp_scheduled_delete() {
* @since 2.9.0
*
* @param string $file Absolute path to the file.
* @param array $default_headers List of headers, in the format `array('HeaderKey' => 'Header Name')`.
* @param array $default_headers List of headers, in the format `array( 'HeaderKey' => 'Header Name' )`.
* @param string $context Optional. If specified adds filter hook {@see 'extra_$context_headers'}.
* Default empty.
* @return array Array of file headers in `HeaderKey => Header Value` format.
@@ -5705,7 +5705,7 @@ function get_file_data( $file, $default_headers, $context = '' ) {
// We don't need to write to the file, so just open for reading.
$fp = fopen( $file, 'r' );
// Pull only the first 8kiB of the file in.
// Pull only the first 8 KB of the file in.
$file_data = fread( $fp, 8 * KB_IN_BYTES );
// PHP will close file handle, but we are good citizens.