diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 442a574609..caf4e80f47 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -9,10 +9,9 @@ /** * Parses the plugin contents to retrieve plugin's metadata. * - * The metadata of the plugin's data searches for the following in the plugin's - * header. All plugin data must be on its own line. For plugin description, it - * must not have any newlines or only parts of the description will be displayed - * and the same goes for the plugin data. The below is formatted for printing. + * All plugin headers must be on their own line. Plugin description must not have + * any newlines, otherwise only parts of the description will be displayed. + * The below is formatted for printing. * * /* * Plugin Name: Name of the plugin. @@ -33,14 +32,10 @@ * activated on a single site when Multisite is enabled. * Requires at least: Optional. Specify the minimum required WordPress version. * Requires PHP: Optional. Specify the minimum required PHP version. - * * / # Remove the space to close comment + * * / # Remove the space to close comment. * - * Some users have issues with opening large files and manipulating the contents - * for want is usually the first 1kiB or 2kiB. This function stops pulling in - * the plugin contents when it has all of the required plugin data. - * - * The first 8kiB of the file will be pulled in and if the plugin data is not - * within that first 8kiB, then the plugin author should correct their plugin + * The first 8 KB of the file will be pulled in and if the plugin data is not + * within that first 8 KB, then the plugin author should correct their plugin * and move the plugin data headers to the top. * * The plugin file is assumed to have permissions to allow for scripts to read @@ -48,7 +43,7 @@ * reading. * * @since 1.5.0 - * @since 5.3.0 Added support for `Requires at least` and `Requires PHP`. + * @since 5.3.0 Added support for `Requires at least` and `Requires PHP` headers. * * @param string $plugin_file Absolute path to the main plugin file. * @param bool $markup Optional. If the returned data should have HTML markup applied. diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 3acfe7318e..1ca29cf864 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -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.