Changeset 370950
- Timestamp:
- 04/09/2011 04:36:39 PM (15 years ago)
- Location:
- wordpress-wiki/trunk
- Files:
-
- 2 edited
-
controllers/wiki_pages.php (modified) (1 diff)
-
wordpress-wiki.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-wiki/trunk/controllers/wiki_pages.php
r370945 r370950 76 76 $last_h2_pos = explode('</h2>', $content); 77 77 $last_h2_pos = array_pop($last_h2_pos); 78 $last_h2_pos[1] = $last_h2_pos; 79 $h3s_contents[1][] = $last_h2_pos; 80 if (!is_array($h3s_contents[1])) { 78 if(!empty($last_h2_pos)){ 79 $last_h2_pos[1] = $last_h2_pos; 80 $h3s_contents[1][] = $last_h2_pos; 81 } 82 if (empty($h3s_contents[1])) { 81 83 $h3s_contents[1] = array(); 82 84 } 83 85 array_push($h3s_contents[1], $last_h2_pos); 84 <<<<<<< HEAD85 foreach ($h3s_contents[1] as $key => $h3s_content) {86 preg_match_all("|<h3>(.*)</h3>|U", $h3s_content, $h3s[$key], PREG_PATTERN_ORDER);87 }88 =======89 86 foreach ($h3s_contents[1] as $key => $h3s_content) { 90 87 preg_match_all("|<h3.*>(.*)</h3>|U", $h3s_content, $h3s[$key], PREG_PATTERN_ORDER); 91 88 } 92 >>>>>>> fixed TOC regex93 89 $table = "<ol class='content_list'>"; 94 90 foreach($h2s as $key => $h2) { -
wordpress-wiki/trunk/wordpress-wiki.php
r370949 r370950 17 17 global $wp_version; 18 18 /** 19 * Guess the wp-content and plugin urls/paths19 * Todo: There is no need to guess the wp-content folder any more... 20 20 */ 21 21 22 if ( !defined('WP_CONTENT_URL') ) 22 23 define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
Note: See TracChangeset
for help on using the changeset viewer.