Changeset 8718 for trunk/wp-admin/includes/file.php
- Timestamp:
- 08/23/2008 09:49:52 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r8716 r8718 1 1 <?php 2 2 3 $wp_file_descriptions = array ('index.php' => __( 'Main Index Template' ), 'style.css' => __( 'Stylesheet' ), 'rtl.css' => __( 'RTL Stylesheet' ), 'comments.php' => __( 'Comments' ), 'comments-popup.php' => __( 'Popup Comments' ), 'footer.php' => __( 'Footer' ), 'header.php' => __( 'Header' ), 'sidebar.php' => __( 'Sidebar' ), 'archive.php' => __( 'Archives' ), 'category.php' => __( 'Category Template' ), 'page.php' => __( 'Page Template' ), 'search.php' => __( 'Search Results' ), 'searchform.php' => __( 'Search Form' ), 'single.php' => __( 'Single Post' ), '404.php' => __( '404 Template' ), 'link.php' => __( 'Links Template' ), 'functions.php' => __( 'Theme Functions' ), 'attachment.php' => __( 'Attachment Template' ), 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), '.htaccess' => __( '.htaccess (for rewrite rules )' ), 3 $wp_file_descriptions = array ( 4 'index.php' => __( 'Main Index Template' ), 5 'style.css' => __( 'Stylesheet' ), 6 'rtl.css' => __( 'RTL Stylesheet' ), 7 'comments.php' => __( 'Comments' ), 8 'comments-popup.php' => __( 'Popup Comments' ), 9 'footer.php' => __( 'Footer' ), 10 'header.php' => __( 'Header' ), 11 'sidebar.php' => __( 'Sidebar' ), 12 'archive.php' => __( 'Archives' ), 13 'category.php' => __( 'Category Template' ), 14 'page.php' => __( 'Page Template' ), 15 'search.php' => __( 'Search Results' ), 16 'searchform.php' => __( 'Search Form' ), 17 'single.php' => __( 'Single Post' ), 18 '404.php' => __( '404 Template' ), 19 'link.php' => __( 'Links Template' ), 20 'functions.php' => __( 'Theme Functions' ), 21 'attachment.php' => __( 'Attachment Template' ), 22 'image.php' => __('Image Attachment Template'), 23 'video.php' => __('Video Attachment Template'), 24 'audio.php' => __('Audio Attachment Template'), 25 'application.php' => __('Application Attachment Template'), 26 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), 27 '.htaccess' => __( '.htaccess (for rewrite rules )' ), 4 28 // Deprecated files 5 29 'wp-layout.css' => __( 'Stylesheet' ), 'wp-comments.php' => __( 'Comments Template' ), 'wp-comments-popup.php' => __( 'Popup Comments Template' )); … … 10 34 return $wp_file_descriptions[basename( $file )]; 11 35 } 12 elseif ( file_exists( WP_CONTENT_ PATH . $file ) && is_file( WP_CONTENT_PATH. $file ) ) {13 $template_data = implode( '', file( WP_CONTENT_ PATH. $file ) );14 if ( preg_match( "|Template Name:(.*)|i", $template_data, $name ))15 return $name[1] ;36 elseif ( file_exists( WP_CONTENT_DIR . $file ) && is_file( WP_CONTENT_DIR . $file ) ) { 37 $template_data = implode( '', file( WP_CONTENT_DIR . $file ) ); 38 if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name )) 39 return $name[1] . ' Page Template'; 16 40 } 17 41
Note: See TracChangeset
for help on using the changeset viewer.