Changeset 2585312
- Timestamp:
- 08/19/2021 09:02:40 AM (4 years ago)
- Location:
- rss-make-antenna
- Files:
-
- 4 edited
- 1 copied
-
tags/1.7.2 (copied) (copied from rss-make-antenna/trunk)
-
tags/1.7.2/readme.txt (modified) (2 diffs)
-
tags/1.7.2/rss-make-antenna.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/rss-make-antenna.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rss-make-antenna/tags/1.7.2/readme.txt
r2583332 r2585312 4 4 Requires at least: 4.7 5 5 Tested up to: 5.8 6 Stable tag: 1.7. 16 Stable tag: 1.7.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 27 27 28 28 == Changelog == 29 30 = 1.7.2 = 31 「このサイトの記事を見る」を追加する・しないする様に修正しました。 29 32 30 33 = 1.7.1 = -
rss-make-antenna/tags/1.7.2/rss-make-antenna.php
r2583332 r2585312 4 4 Plugin URI: https://raizzenet.com/work/plugin-rss-make-antenna 5 5 Description: RSSからサイトの更新情報を取得して投稿するプラグインです。 6 Version: 1.7. 16 Version: 1.7.2 7 7 Author: Kazunari Matsumoto 8 8 Author URI: https://raizzenet.com … … 45 45 'limit_date' => '', 46 46 'cat_tag' => '', 47 'gosite' => '', 47 48 ); 48 49 update_option(self::OPTION_NAME, $setting); … … 86 87 update_option(self::OPTION_NAME, $this->options); 87 88 } 89 if ($this->options['gosite'] == '') { 90 $this->options['gosite'] = ''; 91 update_option(self::OPTION_NAME, $this->options); 92 } 88 93 } 89 94 public function activation() { … … 141 146 add_settings_field('limit_date', '設定日時以前の記事を作成しない', array($this, 'set_limit_date'), self::OPTION_NAME, self::OPTION_SECTION); 142 147 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); 143 149 } 144 150 … … 203 209 echo '<label for="show_img">カテゴリーをサイト名にする</label>'; 204 210 } 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 } 205 216 206 217 public function rss_sanitize($input) { … … 257 268 } else { 258 269 $new_input['cat_tag'] = '0'; 270 } 271 if ($input['gosite']) { 272 $new_input['gosite'] = $input['gosite']; 273 } else { 274 $new_input['gosite'] = '0'; 259 275 } 260 276 return $new_input; … … 434 450 } 435 451 $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 } 437 456 $post = array( 438 'post_content' => $contents . '<br/><a href="' . $link . '" target="_blank" >このサイトの記事を見る</a>',457 'post_content' => $contents, 439 458 'post_title' => $title, 440 459 'post_status' => 'publish', … … 450 469 if ($thumbnail) { 451 470 add_post_meta($id, 'img-url', $thumbnail, true); 452 $options = get_option(self::OPTION_NAME);453 471 if ($options['thumbnail_id']) { 454 472 update_post_meta($id, '_thumbnail_id', $options['thumbnail_id']); 455 473 } 456 474 } 457 $options = get_option(self::OPTION_NAME);458 475 if ($options['cat_tag'] != '1') { 459 476 if ($category) { -
rss-make-antenna/trunk/readme.txt
r2583332 r2585312 4 4 Requires at least: 4.7 5 5 Tested up to: 5.8 6 Stable tag: 1.7. 16 Stable tag: 1.7.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 27 27 28 28 == Changelog == 29 30 = 1.7.2 = 31 「このサイトの記事を見る」を追加する・しないする様に修正しました。 29 32 30 33 = 1.7.1 = -
rss-make-antenna/trunk/rss-make-antenna.php
r2583332 r2585312 4 4 Plugin URI: https://raizzenet.com/work/plugin-rss-make-antenna 5 5 Description: RSSからサイトの更新情報を取得して投稿するプラグインです。 6 Version: 1.7. 16 Version: 1.7.2 7 7 Author: Kazunari Matsumoto 8 8 Author URI: https://raizzenet.com … … 45 45 'limit_date' => '', 46 46 'cat_tag' => '', 47 'gosite' => '', 47 48 ); 48 49 update_option(self::OPTION_NAME, $setting); … … 86 87 update_option(self::OPTION_NAME, $this->options); 87 88 } 89 if ($this->options['gosite'] == '') { 90 $this->options['gosite'] = ''; 91 update_option(self::OPTION_NAME, $this->options); 92 } 88 93 } 89 94 public function activation() { … … 141 146 add_settings_field('limit_date', '設定日時以前の記事を作成しない', array($this, 'set_limit_date'), self::OPTION_NAME, self::OPTION_SECTION); 142 147 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); 143 149 } 144 150 … … 203 209 echo '<label for="show_img">カテゴリーをサイト名にする</label>'; 204 210 } 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 } 205 216 206 217 public function rss_sanitize($input) { … … 257 268 } else { 258 269 $new_input['cat_tag'] = '0'; 270 } 271 if ($input['gosite']) { 272 $new_input['gosite'] = $input['gosite']; 273 } else { 274 $new_input['gosite'] = '0'; 259 275 } 260 276 return $new_input; … … 434 450 } 435 451 $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 } 437 456 $post = array( 438 'post_content' => $contents . '<br/><a href="' . $link . '" target="_blank" >このサイトの記事を見る</a>',457 'post_content' => $contents, 439 458 'post_title' => $title, 440 459 'post_status' => 'publish', … … 450 469 if ($thumbnail) { 451 470 add_post_meta($id, 'img-url', $thumbnail, true); 452 $options = get_option(self::OPTION_NAME);453 471 if ($options['thumbnail_id']) { 454 472 update_post_meta($id, '_thumbnail_id', $options['thumbnail_id']); 455 473 } 456 474 } 457 $options = get_option(self::OPTION_NAME);458 475 if ($options['cat_tag'] != '1') { 459 476 if ($category) {
Note: See TracChangeset
for help on using the changeset viewer.