Plugin Directory

Changeset 626442


Ignore:
Timestamp:
11/17/2012 02:34:00 PM (13 years ago)
Author:
joychao.cc
Message:

v4.2.2

Location:
cn-excerpt/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cn-excerpt/trunk/readme.txt

    r624004 r626442  
    55Requires at least: 3.2
    66Tested up to: 3.4.2
    7 Stable tag: 4.2.1
     7Stable tag: 4.2.2
    88
    99
  • cn-excerpt/trunk/wp-cn-excerpt.php

    r624004 r626442  
    44Plugin URI: http://www.joychao.cc/692.html
    55Description: WordPress高级摘要插件。支持在后台设置摘要长度,摘要最后的显示字符,以及允许哪些html标记在摘要中显示
    6 Version: 4.2.1
     6Version: 4.2.2
    77Author: Joychao
    88Author URI: http://www.joychao.cc
     
    132132        // (<[^>]+>|[^<>\s]+\s*)
    133133        preg_match_all('/(<[^>]+>|[^<>\s]+)\s*/u', $text, $tokens);
    134         foreach ($tokens[0] as $t)
     134        var_dump($tokens);
     135        foreach ($tokens[1] as $t)
    135136        { // Parse each token
    136137          if ($t[0] != '<')
    137138          { // Token is not a tag
    138             if (preg_match('/[\?\.\!!。"“’\']\s*$/uS', $t) == 1)//以句子结束
    139             { // Limit reached, continue until ? . or ! occur at the end
     139            if (preg_match('/[\?\.\!!。"“’\']\s*$/uS', $t))//以句子结束
     140            {
    140141              $out .= trim($t);
    141142              break;
Note: See TracChangeset for help on using the changeset viewer.