WordPress.org

Make WordPress Core

Ticket #18744: functions.diff

File functions.diff, 625 bytes (added by denzel_chia, 7 years ago)
  • functions.php

     
    43984398 * @param string $context If specified adds filter hook "extra_{$context}_headers"
    43994399 */
    44004400function get_file_data( $file, $default_headers, $context = '' ) {
     4401
     4402        //check if web host enabled allow_url_fopen
     4403        $php_ini = ini_get('allow_url_fopen');
     4404        if($php_ini == '' || $php_ini == 0){
     4405           $file_data = array();
     4406           return $file_data;
     4407        }
     4408
    44014409        // We don't need to write to the file, so just open for reading.
    44024410        $fp = fopen( $file, 'r' );
    44034411