Plugin Directory

Changeset 2585312


Ignore:
Timestamp:
08/19/2021 09:02:40 AM (4 years ago)
Author:
issey7
Message:

version 1.7.2

Location:
rss-make-antenna
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • rss-make-antenna/tags/1.7.2/readme.txt

    r2583332 r2585312  
    44Requires at least: 4.7
    55Tested up to: 5.8
    6 Stable tag: 1.7.1
     6Stable tag: 1.7.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727
    2828== Changelog ==
     29
     30= 1.7.2 =
     31「このサイトの記事を見る」を追加する・しないする様に修正しました。
    2932
    3033= 1.7.1 =
  • rss-make-antenna/tags/1.7.2/rss-make-antenna.php

    r2583332 r2585312  
    44Plugin URI: https://raizzenet.com/work/plugin-rss-make-antenna
    55Description: RSSからサイトの更新情報を取得して投稿するプラグインです。
    6 Version: 1.7.1
     6Version: 1.7.2
    77Author: Kazunari Matsumoto
    88Author URI: https://raizzenet.com
     
    4545                'limit_date' => '',
    4646                'cat_tag' => '',
     47                'gosite' => '',
    4748            );
    4849            update_option(self::OPTION_NAME, $setting);
     
    8687            update_option(self::OPTION_NAME, $this->options);
    8788        }
     89        if ($this->options['gosite'] == '') {
     90            $this->options['gosite'] = '';
     91            update_option(self::OPTION_NAME, $this->options);
     92        }
    8893    }
    8994    public function activation() {
     
    141146        add_settings_field('limit_date', '設定日時以前の記事を作成しない', array($this, 'set_limit_date'), self::OPTION_NAME, self::OPTION_SECTION);
    142147        add_settings_field('cat_tag', 'サイト名をタグからカテゴリーに変更する', array($this, 'set_cat_tag'), self::OPTION_NAME, self::OPTION_SECTION);
     148        add_settings_field('gosite', '記事に「このサイトの記事を見る」を追加しない', array($this, 'set_go_site'), self::OPTION_NAME, self::OPTION_SECTION);
    143149    }
    144150
     
    203209        echo '<label for="show_img">カテゴリーをサイト名にする</label>';
    204210    }
     211    public function set_go_site() {
     212        $selected = isset($this->options['gosite']) ? $this->options['gosite'] : '';
     213        echo '<input type="checkbox" id="gosite" name="make_antenna[gosite]" value="1" ' . checked(1, $selected, false) . '/>';
     214        echo '<label for="show_img">記事に「このサイトの記事を見る」を追加しない</label>';
     215    }
    205216
    206217    public function rss_sanitize($input) {
     
    257268        } else {
    258269            $new_input['cat_tag'] = '0';
     270        }
     271        if ($input['gosite']) {
     272            $new_input['gosite'] = $input['gosite'];
     273        } else {
     274            $new_input['gosite'] = '0';
    259275        }
    260276        return $new_input;
     
    434450        }
    435451        $contents .= '<br /><!--more-->';
    436 
     452        $options = get_option(self::OPTION_NAME);
     453        if ($options['gosite'] != '1') {
     454            $contents .= '<br/><a href="' . $link . '" target="_blank" >このサイトの記事を見る</a>';
     455        }
    437456        $post = array(
    438             'post_content'   => $contents . '<br/><a href="' . $link . '" target="_blank" >このサイトの記事を見る</a>',
     457            'post_content'   => $contents,
    439458            'post_title'     => $title,
    440459            'post_status'    => 'publish',
     
    450469                if ($thumbnail) {
    451470                    add_post_meta($id, 'img-url', $thumbnail, true);
    452                     $options = get_option(self::OPTION_NAME);
    453471                    if ($options['thumbnail_id']) {
    454472                        update_post_meta($id, '_thumbnail_id', $options['thumbnail_id']);
    455473                    }
    456474                }
    457                 $options = get_option(self::OPTION_NAME);
    458475                if ($options['cat_tag'] != '1') {
    459476                    if ($category) {
  • rss-make-antenna/trunk/readme.txt

    r2583332 r2585312  
    44Requires at least: 4.7
    55Tested up to: 5.8
    6 Stable tag: 1.7.1
     6Stable tag: 1.7.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727
    2828== Changelog ==
     29
     30= 1.7.2 =
     31「このサイトの記事を見る」を追加する・しないする様に修正しました。
    2932
    3033= 1.7.1 =
  • rss-make-antenna/trunk/rss-make-antenna.php

    r2583332 r2585312  
    44Plugin URI: https://raizzenet.com/work/plugin-rss-make-antenna
    55Description: RSSからサイトの更新情報を取得して投稿するプラグインです。
    6 Version: 1.7.1
     6Version: 1.7.2
    77Author: Kazunari Matsumoto
    88Author URI: https://raizzenet.com
     
    4545                'limit_date' => '',
    4646                'cat_tag' => '',
     47                'gosite' => '',
    4748            );
    4849            update_option(self::OPTION_NAME, $setting);
     
    8687            update_option(self::OPTION_NAME, $this->options);
    8788        }
     89        if ($this->options['gosite'] == '') {
     90            $this->options['gosite'] = '';
     91            update_option(self::OPTION_NAME, $this->options);
     92        }
    8893    }
    8994    public function activation() {
     
    141146        add_settings_field('limit_date', '設定日時以前の記事を作成しない', array($this, 'set_limit_date'), self::OPTION_NAME, self::OPTION_SECTION);
    142147        add_settings_field('cat_tag', 'サイト名をタグからカテゴリーに変更する', array($this, 'set_cat_tag'), self::OPTION_NAME, self::OPTION_SECTION);
     148        add_settings_field('gosite', '記事に「このサイトの記事を見る」を追加しない', array($this, 'set_go_site'), self::OPTION_NAME, self::OPTION_SECTION);
    143149    }
    144150
     
    203209        echo '<label for="show_img">カテゴリーをサイト名にする</label>';
    204210    }
     211    public function set_go_site() {
     212        $selected = isset($this->options['gosite']) ? $this->options['gosite'] : '';
     213        echo '<input type="checkbox" id="gosite" name="make_antenna[gosite]" value="1" ' . checked(1, $selected, false) . '/>';
     214        echo '<label for="show_img">記事に「このサイトの記事を見る」を追加しない</label>';
     215    }
    205216
    206217    public function rss_sanitize($input) {
     
    257268        } else {
    258269            $new_input['cat_tag'] = '0';
     270        }
     271        if ($input['gosite']) {
     272            $new_input['gosite'] = $input['gosite'];
     273        } else {
     274            $new_input['gosite'] = '0';
    259275        }
    260276        return $new_input;
     
    434450        }
    435451        $contents .= '<br /><!--more-->';
    436 
     452        $options = get_option(self::OPTION_NAME);
     453        if ($options['gosite'] != '1') {
     454            $contents .= '<br/><a href="' . $link . '" target="_blank" >このサイトの記事を見る</a>';
     455        }
    437456        $post = array(
    438             'post_content'   => $contents . '<br/><a href="' . $link . '" target="_blank" >このサイトの記事を見る</a>',
     457            'post_content'   => $contents,
    439458            'post_title'     => $title,
    440459            'post_status'    => 'publish',
     
    450469                if ($thumbnail) {
    451470                    add_post_meta($id, 'img-url', $thumbnail, true);
    452                     $options = get_option(self::OPTION_NAME);
    453471                    if ($options['thumbnail_id']) {
    454472                        update_post_meta($id, '_thumbnail_id', $options['thumbnail_id']);
    455473                    }
    456474                }
    457                 $options = get_option(self::OPTION_NAME);
    458475                if ($options['cat_tag'] != '1') {
    459476                    if ($category) {
Note: See TracChangeset for help on using the changeset viewer.