Changeset 1842 for branches/0.9/bb-admin/admin-functions.php
- Timestamp:
- 12/10/2008 07:10:24 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9/bb-admin/admin-functions.php
r1503 r1842 848 848 ); 849 849 } 850 $plugin_data = implode('', file($plugin_file)); 850 $plugin_code = implode('', file($plugin_file)); 851 // Grab just the first commented area from the file 852 if ( !preg_match( '|/\*(.*)\*/|msU', $plugin_code, $plugin_block ) ) 853 return false; 854 $plugin_data = trim( $plugin_block[1] ); 851 855 if ( !preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name) ) 852 856 return false; … … 917 921 if ( strpos($theme_file, '#') !== false ) 918 922 $theme_file = bb_get_theme_directory( $theme_file ) . 'style.css'; 919 $theme_data = implode( '', file( $theme_file ) ); 920 $theme_data = str_replace ( '\r', '\n', $theme_data ); 923 $theme_code = implode( '', file( $theme_file ) ); 924 $theme_code = str_replace ( '\r', '\n', $theme_code ); 925 // Grab just the first commented area from the file 926 preg_match( '|/\*(.*)\*/|msU', $theme_code, $theme_block ); 927 $theme_data = trim( $theme_block[1] ); 921 928 preg_match( '|Theme Name:(.*)|i', $theme_data, $theme_name ); 922 929 preg_match( '|Theme URI:(.*)|i', $theme_data, $theme_uri );
Note: See TracChangeset
for help on using the changeset viewer.