Changeset 1841
- Timestamp:
- 12/10/2008 06:58:13 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bb-admin/includes/functions.bb-admin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/includes/functions.bb-admin.php
r1829 r1841 1002 1002 ); 1003 1003 } 1004 $plugin_data = implode('', file($plugin_file)); 1004 $plugin_code = implode('', file($plugin_file)); 1005 // Grab just the first commented area from the file 1006 if ( !preg_match( '|/\*(.*)\*/|msU', $plugin_code, $plugin_block ) ) 1007 return false; 1008 $plugin_data = trim( $plugin_block[1] ); 1005 1009 if ( !preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name) ) 1006 1010 return false; … … 1105 1109 if ( strpos($theme_file, '#') !== false ) 1106 1110 $theme_file = bb_get_theme_directory( $theme_file ) . 'style.css'; 1107 $theme_data = implode( '', file( $theme_file ) ); 1108 $theme_data = str_replace ( '\r', '\n', $theme_data ); 1111 $theme_code = implode( '', file( $theme_file ) ); 1112 $theme_code = str_replace ( '\r', '\n', $theme_code ); 1113 // Grab just the first commented area from the file 1114 preg_match( '|/\*(.*)\*/|msU', $theme_code, $theme_block ); 1115 $theme_data = trim( $theme_block[1] ); 1109 1116 preg_match( '|Theme Name:(.*)|i', $theme_data, $theme_name ); 1110 1117 preg_match( '|Theme URI:(.*)|i', $theme_data, $theme_uri );
Note: See TracChangeset
for help on using the changeset viewer.