Plugin Directory

Changeset 370944


Ignore:
Timestamp:
04/09/2011 04:34:37 PM (15 years ago)
Author:
beatpanda
Message:

Revert "Added patch to fix TOC"

This reverts commit 7a74e84c41d3ddd3223c66ca2cf4d19126ea523b.

Location:
wordpress-wiki/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wordpress-wiki/trunk/controllers/wiki_pages.php

    r370924 r370944  
    7676        $last_h2_pos = explode('</h2>', $content);
    7777        $last_h2_pos = array_pop($last_h2_pos);
    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])) {
     78        $last_h2_pos[1] = $last_h2_pos;
     79        $h3s_contents[1][] = $last_h2_pos;
     80        if (!is_array($h3s_contents[1])) {
    8381            $h3s_contents[1] = array();
    8482        }
    8583        array_push($h3s_contents[1], $last_h2_pos);
    86             foreach ($h3s_contents[1] as $key => $h3s_content) {
    87                 preg_match_all("|<h3>(.*)</h3>|U", $h3s_content, $h3s[$key], PREG_PATTERN_ORDER);
    88             }
     84        foreach ($h3s_contents[1] as $key => $h3s_content) {
     85            preg_match_all("|<h3>(.*)</h3>|U", $h3s_content, $h3s[$key], PREG_PATTERN_ORDER);
     86        }
    8987        $table = "<ol class='content_list'>";
    9088        foreach($h2s as $key => $h2) {
  • wordpress-wiki/trunk/wordpress-wiki.php

    r370924 r370944  
    1717        global $wp_version;
    1818        /**
    19         * Todo: There is no need to guess the wp-content folder any more...
     19        * Guess the wp-content and plugin urls/paths
    2020        */
    21        
    2221        if ( !defined('WP_CONTENT_URL') )
    2322            define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
Note: See TracChangeset for help on using the changeset viewer.