WordPress.org

Make WordPress Core

Ticket #14071: 14071.patch

File 14071.patch, 2.0 KB (added by hakre, 8 years ago)
  • wp-includes/functions.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress
     
    41364136}
    41374137
    41384138/**
    4139  * Parse the file contents to retrieve its metadata.
     4139 * Retrieve metadata from a file.
    41404140 *
    4141  * Searches for metadata for a file, such as a plugin or theme.  Each piece of
    4142  * metadata must be on its own line. For a field spanning multple lines, it
    4143  * must not have any newlines or only parts of it will be displayed.
     4141 * Searches for metadata in the first 8kiB of a file, such as a plugin or theme.
     4142 * Each piece of metadata must be on its own line. Fields can not span multple
     4143 * lines, the value will get cut at the end of the first line.
    41444144 *
    4145  * Some users have issues with opening large files and manipulating the contents
    4146  * for want is usually the first 1kiB or 2kiB. This function stops pulling in
    4147  * the file contents when it has all of the required data.
     4145 * If the file data is not within that first 8kiB, then the author should correct
     4146 * their plugin file and move the data headers to the top.
    41484147 *
    4149  * The first 8kiB of the file will be pulled in and if the file data is not
    4150  * within that first 8kiB, then the author should correct their plugin file
    4151  * and move the data headers to the top.
     4148 * @see http://codex.wordpress.org/File_Header
    41524149 *
    4153  * The file is assumed to have permissions to allow for scripts to read
    4154  * the file. This is not checked however and the file is only opened for
    4155  * reading.
    4156  *
    41574150 * @since 2.9.0
    4158  *
    41594151 * @param string $file Path to the file
    4160  * @param bool $markup If the returned data should have HTML markup applied
     4152 * @param array $default_headers array of regular expressions keyed with a fieldname, e.g. <code>array('Name' => 'Plugin Name')</code>
    41614153 * @param string $context If specified adds filter hook "extra_<$context>_headers"
    41624154 */
    41634155function get_file_data( $file, $default_headers, $context = '' ) {