Changeset 2032
- Timestamp:
- 01/02/2005 02:47:45 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 6 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r2009 r2032 2 2 /* Don't remove this line. */ 3 3 require('./wp-blog-header.php'); 4 get_header();5 4 ?> 6 7 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>8 9 <?php the_date('','<h2>','</h2>'); ?>10 11 <div class="post">12 <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>13 <div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></div>14 15 <div class="storycontent">16 <?php the_content(__('(more...)')); ?>17 </div>18 19 <div class="feedback">20 <?php wp_link_pages(); ?>21 <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>22 </div>23 24 <!--25 <?php trackback_rdf(); ?>26 -->27 28 </div>29 30 <?php comments_template( is_single() ); // Get wp-comments.php template ?>31 32 <?php endwhile; else: ?>33 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>34 <?php endif; ?>35 36 <?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>37 38 <?php get_footer(); ?> -
trunk/wp-includes/functions.php
r2027 r2032 1254 1254 $template = get_template(); 1255 1255 1256 if (empty($template) || $template == 'default') { 1257 $template = ABSPATH . "wp-content"; 1258 } else { 1259 $template = ABSPATH . "wp-content/themes/$template"; 1260 } 1256 $template = ABSPATH . "wp-content/themes/$template"; 1261 1257 1262 1258 return $template; … … 1331 1327 } 1332 1328 1333 $default_files = array('wp-comments.php', 'wp-comments-popup.php', 'wp-comments-post.php', 'wp-footer.php', 'wp-header.php', 'wp-sidebar.php', 'footer.php', 'header.php', 'sidebar.php');1334 1335 // Get the files for the default template.1336 $default_template_files = array();1337 {1338 // Find the index.1339 if (file_exists(ABSPATH .'wp-content/index.php')) {1340 $default_template_files[] = 'wp-content/index.php';1341 } else {1342 $default_template_files[] = 'index.php';1343 }1344 1345 $dirs = array('', 'wp-content');1346 foreach ($dirs as $dir) {1347 $template_dir = @ dir(ABSPATH . $dir);1348 while(($file = $template_dir->read()) !== false) {1349 if ( !preg_match('|^\.+$|', $file) && in_array($file, $default_files))1350 $default_template_files[] = trim("$dir/$file", '/');1351 }1352 }1353 }1354 1355 // Get the files for the default stylesheet.1356 $default_stylesheet_files = array();1357 {1358 $stylesheet_dir = @ dir(ABSPATH);1359 while(($file = $stylesheet_dir->read()) !== false) {1360 if ( !preg_match('|^\.+$|', $file) && preg_match('|\.css$|', $file))1361 $default_stylesheet_files[] = "$file";1362 }1363 }1364 1365 // The default theme always exists.1366 $themes['Default'] = array('Name' => 'Default', 'Title' => 'WordPress Default', 'Description' => 'The default theme included with WordPress.', 'Author' => 'Dave Shea', 'Version' => '1.3', 'Template' => 'default', 'Stylesheet' => 'default', 'Template Files' => $default_template_files, 'Stylesheet Files' => $default_stylesheet_files, 'Template Dir' => '/', 'Stylesheet Dir' => '/', 'Parent Theme' => '');1367 1368 1329 if (!$themes_dir || !$theme_files) { 1369 1330 return $themes; … … 1398 1359 $template = trim($template); 1399 1360 1400 if ( ($template != 'default') && (! file_exists("$theme_root/$template/index.php"))) {1361 if (! file_exists("$theme_root/$template/index.php")) { 1401 1362 $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); 1402 1363 continue; … … 1404 1365 1405 1366 $stylesheet_files = array(); 1406 if ($stylesheet != 'default') { 1407 $stylesheet_dir = @ dir("$theme_root/$stylesheet"); 1408 if ($stylesheet_dir) { 1409 while(($file = $stylesheet_dir->read()) !== false) { 1410 if ( !preg_match('|^\.+$|', $file) && preg_match('|\.css$|', $file) ) 1411 $stylesheet_files[] = "$theme_loc/$stylesheet/$file"; 1412 } 1367 $stylesheet_dir = @ dir("$theme_root/$stylesheet"); 1368 if ($stylesheet_dir) { 1369 while(($file = $stylesheet_dir->read()) !== false) { 1370 if ( !preg_match('|^\.+$|', $file) && preg_match('|\.css$|', $file) ) 1371 $stylesheet_files[] = "$theme_loc/$stylesheet/$file"; 1413 1372 } 1414 } else {1415 $stylesheet_files = $default_stylesheet_files;1416 1373 } 1417 1374 1418 1375 $template_files = array(); 1419 if ($template != 'default') { 1420 $template_dir = @ dir("$theme_root/$template"); 1421 if ($template_dir) { 1422 while(($file = $template_dir->read()) !== false) { 1423 if ( !preg_match('|^\.+$|', $file) && preg_match('|\.php$|', $file) ) 1424 $template_files[] = "$theme_loc/$template/$file"; 1425 } 1376 $template_dir = @ dir("$theme_root/$template"); 1377 if ($template_dir) { 1378 while(($file = $template_dir->read()) !== false) { 1379 if ( !preg_match('|^\.+$|', $file) && preg_match('|\.php$|', $file) ) 1380 $template_files[] = "$theme_loc/$template/$file"; 1426 1381 } 1427 } else {1428 $template_files = $default_template_files;1429 1382 } 1430 1383 -
trunk/wp-includes/template-functions-general.php
r2023 r2032 7 7 load_template( TEMPLATEPATH . '/header.php'); 8 8 else 9 load_template( ABSPATH . 'wp- includes/wp-header.php');9 load_template( ABSPATH . 'wp-content/themes/default/header.php'); 10 10 } 11 11 … … 14 14 load_template( TEMPLATEPATH . '/footer.php'); 15 15 else 16 load_template( ABSPATH . 'wp- includes/wp-footer.php');16 load_template( ABSPATH . 'wp-content/themes/default/footer.php'); 17 17 } 18 18 … … 21 21 load_template( TEMPLATEPATH . '/sidebar.php'); 22 22 else 23 load_template( ABSPATH . 'wp- includes/wp-sidebar.php');23 load_template( ABSPATH . 'wp-content/themes/default/sidebar.php'); 24 24 } 25 25 … … 106 106 case 'stylesheet_url': 107 107 $output = get_stylesheet(); 108 if (empty($output) || $output == 'default') { 109 $output = get_settings('siteurl') . "/wp-includes/wp-layout.css"; 110 } else { 111 $output = get_settings('siteurl') . "/wp-content/themes/$output/style.css"; 112 } 108 $output = get_settings('siteurl') . "/wp-content/themes/$output/style.css"; 113 109 break; 114 110 case 'stylesheet_directory': 115 111 $output = get_stylesheet(); 116 if (empty($output) || $output == 'default') { 117 $output = get_settings('siteurl'); 118 } else { 119 $output = get_settings('siteurl') . "/wp-content/themes/$output"; 120 } 112 $output = get_settings('siteurl') . "/wp-content/themes/$output"; 121 113 break; 122 114 case 'template_directory': 123 115 case 'template_url': 124 116 $output = get_template(); 125 if (empty($output) || $output == 'default') { 126 $output = get_settings('siteurl'); 127 } else { 128 $output = get_settings('siteurl') . "/wp-content/themes/$output"; 129 } 117 $output = get_settings('siteurl') . "/wp-content/themes/$output"; 130 118 break; 131 119 case 'admin_email':
Note: See TracChangeset
for help on using the changeset viewer.