Plugin Directory

Changeset 1710074


Ignore:
Timestamp:
08/08/2017 10:42:23 AM (9 years ago)
Author:
hidaka.bizplugin
Message:

2.0.1

Location:
whats-new-genarator/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • whats-new-genarator/trunk/readme.txt

    r1707013 r1710074  
    44Tags: what's new, update Post page
    55Requires at least: 4.0
    6 Tested up to: 4.8
    7 Stable tag: 2.0.0
     6Tested up to: 4.8.1
     7Stable tag: 2.0.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3939
    4040== Changelog ==
     41
     42= 2.0.1 =
     43* プラグインの更新に関する不具合を修正しました
    4144
    4245= 2.0.0 =
  • whats-new-genarator/trunk/whats-new-generator.php

    r1707013 r1710074  
    44Plugin URI: http://residentbird.main.jp/bizplugin/
    55Description: What's New(新着情報)を指定した固定ページや投稿に自動的に表示するプラグインです。
    6 Version: 2.0.0
     6Version: 2.0.1
    77Author:Hideki Tanaka
    88Author URI: http://residentbird.main.jp/bizplugin/
     
    1515class WNG
    1616{
    17     const VERSION = "2.0.0";
     17    const VERSION = "2.0.1";
    1818    const SHORTCODE = "showwhatsnew";
    1919    const OPTIONS = "whats_new_options";
     
    2424
    2525    public static function update_option( $options ){
    26         if ( empty($options)){
     26        if (empty($options)){
    2727            return;
    2828        }
     
    5353
    5454    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();
    5858        }
    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 );
    7168    }
    7269
     
    103100class WhatsNewInfo{
    104101    var $title;
    105     var $background_color;
    106     var $postlist_url;
    107102    var $items = array();
    108103
     
    110105        $options = WNG::get_option();
    111106        $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'];
    116108
    117109        $condition = array();
Note: See TracChangeset for help on using the changeset viewer.