Changeset 1710074
- Timestamp:
- 08/08/2017 10:42:23 AM (9 years ago)
- Location:
- whats-new-genarator/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
whats-new-generator.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
whats-new-genarator/trunk/readme.txt
r1707013 r1710074 4 4 Tags: what's new, update Post page 5 5 Requires at least: 4.0 6 Tested up to: 4.8 7 Stable tag: 2.0. 06 Tested up to: 4.8.1 7 Stable tag: 2.0.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 39 39 40 40 == Changelog == 41 42 = 2.0.1 = 43 * プラグインの更新に関する不具合を修正しました 41 44 42 45 = 2.0.0 = -
whats-new-genarator/trunk/whats-new-generator.php
r1707013 r1710074 4 4 Plugin URI: http://residentbird.main.jp/bizplugin/ 5 5 Description: What's New(新着情報)を指定した固定ページや投稿に自動的に表示するプラグインです。 6 Version: 2.0. 06 Version: 2.0.1 7 7 Author:Hideki Tanaka 8 8 Author URI: http://residentbird.main.jp/bizplugin/ … … 15 15 class WNG 16 16 { 17 const VERSION = "2.0. 0";17 const VERSION = "2.0.1"; 18 18 const SHORTCODE = "showwhatsnew"; 19 19 const OPTIONS = "whats_new_options"; … … 24 24 25 25 public static function update_option( $options ){ 26 if ( empty($options)){26 if (empty($options)){ 27 27 return; 28 28 } … … 53 53 54 54 function on_activation() { 55 $option = WNG::get_option();56 if ($option){57 return;55 $options = WNG::get_option(); 56 if (empty($options)){ 57 $options = array(); 58 58 } 59 $arr = array( 60 "wng_title" => "what's new", 61 "wng_content_type" => "投稿", 62 "wng_orderby" => "公開日順", 63 "wng_category_name" => "", 64 "wng_title_tag" => "h1", 65 "wng_newmark" => "7", 66 "wng_postlist_url" => "", 67 "wng_number" => "10", 68 "wng_latest_new" => false 69 ); 70 WNG::update_option( $arr ); 59 $options['wng_title'] = isset($options['wng_title']) ? $options['wng_title'] : "新着情報"; 60 $options['wng_content_type'] = isset($options['wng_content_type']) ? $options['wng_content_type'] : "投稿"; 61 $options['wng_orderby'] = isset($options['wng_orderby']) ? $options['wng_orderby'] : "公開日順"; 62 $options['wng_category_name'] = isset($options['wng_category_name']) ? $options['wng_category_name'] : ""; 63 $options['wng_title_tag'] = isset($options['wng_title_tag']) ? $options['wng_title_tag'] : "h1"; 64 $options['wng_newmark'] = isset($options['wng_newmark']) ? $options['wng_newmark'] : "7"; 65 $options['wng_number'] = isset($options['wng_number']) ? $options['wng_number'] : "10"; 66 $options['wng_latest_new'] = isset($options['wng_latest_new']) ? $options['wng_latest_new'] : false; 67 WNG::update_option( $options ); 71 68 } 72 69 … … 103 100 class WhatsNewInfo{ 104 101 var $title; 105 var $background_color;106 var $postlist_url;107 102 var $items = array(); 108 103 … … 110 105 $options = WNG::get_option(); 111 106 $this->title = esc_html( $options['wng_title'] ); 112 $this->background_color = isset($options['wng_background_color']) ? $options['wng_background_color'] : "#f5f5f5"; 113 $this->font_color = isset($options['wng_font_color']) ? $options['wng_font_color'] : "#000000"; 114 $this->postlist_url = esc_url( $options['wng_postlist_url'] ); 115 $this->title_tag = $options['wng_title_tag'] ? $options['wng_title_tag'] : "h1"; 107 $this->title_tag = $options['wng_title_tag']; 116 108 117 109 $condition = array();
Note: See TracChangeset
for help on using the changeset viewer.