WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Excerpt
Bug Fix! Posts Page was hanging (2 posts)

  1. tyler93023
    Member
    Posted 3 years ago #

    We were having a problem where the assigned "Posts" page (where the main blog is set up on a page of our choosing, via Settings > Reading) was hanging. We traced it this plugin. Here's the fix, which hopefully can be included in a future version.


    Locate the code:
    
    $in_tag = true;
    if(($pos = strpos($text, '>', $i)) !== false)
    {
    $i = $pos - 1;
    continue;
    }
    
    Replace the code with:
    
    $in_tag = true;
    $pos = $this->strpos($text, '>', $i);
    if($pos !== false)
    {
    $i = $pos - 1;
    continue;
    }
    
    Locate the code:
    
    function strlen($str)
    {
    if($this->mb)
    return mb_strlen($str, $this->charset);
    else
    return strlen($str);
    }
    
    Insert the following code immediately after:
    
    function strpos($haystack, $needle, $offset)
    {
    if($this->mb)
    return mb_strpos($haystack, $needle, $offset);
    else
    return strpos($haystack, $needle, $offset);
    }

    http://wordpress.org/extend/plugins/advanced-excerpt/

  2. Li-An
    Member
    Posted 2 years ago #

    You just saved my life ! Thank you !

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic