WordPress.org

Make WordPress Core

Ticket #5651: plugin_data_opt.diff

File plugin_data_opt.diff, 602 bytes (added by filosofo, 10 years ago)
  • wp-admin/includes/plugin.php

     
    11<?php
    22
    33function get_plugin_data( $plugin_file ) {
    4         $plugin_data = implode( '', file( $plugin_file ));
     4        $plugin_data = implode( '', array_slice(file( $plugin_file ), 0, 30) );
    55        preg_match( '|Plugin Name:(.*)$|mi', $plugin_data, $plugin_name );
    66        preg_match( '|Plugin URI:(.*)$|mi', $plugin_data, $plugin_uri );
    77        preg_match( '|Description:(.*)$|mi', $plugin_data, $description );