Changeset 5630
- Timestamp:
- 06/02/2007 12:02:06 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r5566 r5630 3 3 function get_plugin_data( $plugin_file ) { 4 4 $plugin_data = implode( '', file( $plugin_file )); 5 preg_match( "|Plugin Name:(.*)|i", $plugin_data, $plugin_name ); 6 preg_match( "|Plugin URI:(.*)|i", $plugin_data, $plugin_uri ); 7 preg_match( "|Description:(.*)|i", $plugin_data, $description ); 8 preg_match( "|Author:(.*)|i", $plugin_data, $author_name ); 9 preg_match( "|Author URI:(.*)|i", $plugin_data, $author_uri ); 5 preg_match( '|Plugin Name:(.*)$|mi', $plugin_data, $plugin_name ); 6 preg_match( '|Plugin URI:(.*)$|mi', $plugin_data, $plugin_uri ); 7 preg_match( '|Description:(.*)$|mi', $plugin_data, $description ); 8 preg_match( '|Author:(.*)$|mi', $plugin_data, $author_name ); 9 preg_match( '|Author URI:(.*)$|mi', $plugin_data, $author_uri ); 10 10 11 if ( preg_match( "|Version:(.*)|i", $plugin_data, $version )) 11 12 $version = trim( $version[1] ); -
trunk/wp-admin/includes/theme.php
r5566 r5630 34 34 foreach ( $templates as $template ) { 35 35 $template_data = implode( '', file( ABSPATH.$template )); 36 preg_match( "|Template Name:(.*)|i", $template_data, $name ); 37 preg_match( "|Description:(.*)|i", $template_data, $description ); 36 37 preg_match( '|Template Name:(.*)$|mi', $template_data, $name ); 38 preg_match( '|Description:(.*)$|mi', $template_data, $description ); 38 39 39 40 $name = $name[1]; 40 41 $description = $description[1]; 41 42 42 if ( !empty( $name ) ) {43 if ( !empty( $name ) ) { 43 44 $page_templates[trim( $name )] = basename( $template ); 44 45 } -
trunk/wp-includes/theme.php
r5581 r5630 74 74 $theme_data = implode( '', file( $theme_file ) ); 75 75 $theme_data = str_replace ( '\r', '\n', $theme_data ); 76 preg_match( '|Theme Name:(.*) |i', $theme_data, $theme_name );77 preg_match( '|Theme URI:(.*) |i', $theme_data, $theme_uri );78 preg_match( '|Description:(.*) |i', $theme_data, $description );79 preg_match( '|Author:(.*) |i', $theme_data, $author_name );80 preg_match( '|Author URI:(.*) |i', $theme_data, $author_uri );81 preg_match( '|Template:(.*) |i', $theme_data, $template );76 preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name ); 77 preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri ); 78 preg_match( '|Description:(.*)$|mi', $theme_data, $description ); 79 preg_match( '|Author:(.*)$|mi', $theme_data, $author_name ); 80 preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri ); 81 preg_match( '|Template:(.*)$|mi', $theme_data, $template ); 82 82 83 83 if ( preg_match( '|Version:(.*)|i', $theme_data, $version ) )
Note: See TracChangeset
for help on using the changeset viewer.