Plugin Directory

Changeset 1192188


Ignore:
Timestamp:
07/04/2015 01:57:47 AM (11 years ago)
Author:
hidaka.bizplugin
Message:

1.9.0

Location:
rss-antenna/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rss-antenna/trunk/readme.txt

    r1129465 r1192188  
    44Tags: rss
    55Requires at least: 3.5
    6 Tested up to: 4.1
    7 Stable tag: 1.8.0
     6Tested up to: 4.2
     7Stable tag: 1.9.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535
    3636== Changelog ==
     37
     38= 1.9.0 =
     39* 記事の表示件数に1件、3件を選択することができるようになりました
     40* 記事の抜粋の表示文字数を変更しました。
    3741
    3842= 1.8.0 =
  • rss-antenna/trunk/rss-antenna.php

    r1129465 r1192188  
    44Plugin URI: http://residentbird.main.jp/bizplugin/
    55Description: Webサイトの更新情報をRSSから取得し更新日時の新しい順に一覧表示するプラグインです。
    6 Version: 1.8.0
     6Version: 1.9.0
    77Author:Hideki Tanaka
    88Author URI: http://residentbird.main.jp/bizplugin/
     
    162162    function  setting_number() {
    163163        $options = get_option(self::OPTION_NAME);
    164         $items = array("5", "10", "15", "20","25", "30");
     164        $items = array("1", "3", "5", "10", "15", "20","25", "30");
    165165        echo "<select id='rss_number' name='rss_antenna_options[feed_count]'>";
    166166        foreach($items as $item) {
     
    336336    var $description;
    337337    var $img_src;
    338     const DESCRIPTION_SIZE = 400;
     338    const DESCRIPTION_SIZE = 150;
    339339
    340340    public function __construct( $feed ){
     
    349349            return;
    350350        }
    351         $text = strip_tags ($feed->get_content());
     351        $text = $this->remove_tag($feed->get_content());
    352352        $this->description = mb_strimwidth( $text, 0, self::DESCRIPTION_SIZE,"…");
    353353        if ( !isset( $options["image"])  ){
     
    355355        }
    356356        $this->img_src = $this->get_image_src($feed->get_content());
     357    }
     358
     359    private function remove_tag($content) {
     360        $pattern = '{<p class="wp-caption-text".*?</p>}s';
     361        $content = preg_replace($pattern, "", $content);
     362        $pattern = '{\[caption.*?/caption\]}s';
     363        $content = preg_replace($pattern, "", $content);
     364        $pattern = '{<figcaption.*?</figcaption>}s';
     365        $content = preg_replace($pattern, "", $content);
     366        $content = strip_tags($content);
     367        return $content;
    357368    }
    358369
Note: See TracChangeset for help on using the changeset viewer.