Changeset 14369
- Timestamp:
- 05/03/2010 01:23:34 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/theme.php
r13827 r14369 209 209 } 210 210 211 /** 212 * Check the current theme for reliance on deprecated theme compatibility 213 * 214 * Check to see if the current theme has all the required templates available 215 * from itself or its parent 216 * 217 * @return nothing 218 */ 219 function _check_theme_deprecated_files() { 220 $files = array( ); 221 222 if ( ! locate_template( array( 'header.php' ) ) ) 223 $files[] = 'header.php'; 224 if ( ! locate_template( array( 'footer.php' ) ) ) 225 $files[] = 'footer.php'; 226 if ( ! locate_template( array( 'sidebar.php' ) ) ) 227 $files[] = 'sidebar.php'; 228 229 // Only notify if both are missing as you can use one or the other 230 if ( ! ( $comment = locate_template( array( 'comments.php' ) ) ) && ! ( $comment_popup = locate_template( array( 'comments-popup.php' ) ) ) ) { 231 $files[] = 'comments.php'; 232 $files[] = 'comments-popup.php'; 233 } 234 235 if ( ! empty( $files ) ) : ?> 236 <div id="deprecated-files-message" class="error"><p> 237 <?php echo sprintf( __('The current theme is incomplete as it is missing %1$s. Please update your theme to include these files as you are currently relying on deprecated behaviour.'), implode( $files, ', ') ); ?> 238 </p></div> 239 <?php endif; 240 } 241 211 242 ?> -
trunk/wp-admin/themes.php
r14347 r14369 60 60 <div id="message3" class="updated"><p><?php _e('Theme deleted.') ?></p></div> 61 61 <?php endif; ?> 62 63 <?php 62 <?php 63 _check_theme_deprecated_files(); 64 64 $themes = get_allowed_themes(); 65 65 $ct = current_theme_info();
Note: See TracChangeset
for help on using the changeset viewer.