Plugin Directory

Changeset 2480311


Ignore:
Timestamp:
02/24/2021 03:50:08 AM (5 years ago)
Author:
conoha
Message:

update version 2.0.1

Location:
ts-webfonts-for-conoha
Files:
29 added
3 edited

Legend:

Unmodified
Added
Removed
  • ts-webfonts-for-conoha/trunk/inc/admin-root.php

    r2468448 r2480311  
    473473        $fonts = TypeSquare_ST_Fonts::get_instance();
    474474        $value = $fonts->get_site_font_setting();
    475         $html = "<form method='post' action='' id='siteFontForm'>";
    476         $html .= '<p>タイトルなど、ウェブサイト共通部分のフォント設定です</p>';
    477         $html .= '<table class="widefat form-table">';
    478         $html .= '<tbody>';
    479         $html .= $this->_get_site_font_form_tr("サイトタイトル", $value['title_fontname'], "title_fontname");
    480         $html .= $this->_get_site_font_form_tr("サイトキャッチコピー", $value['catchcopy_fontname'], "catchcopy_fontname");
    481         $html .= $this->_get_site_font_form_tr("ウィジェットタイトル", $value['widget_title_fontname'], "widget_title_fontname");
    482         $html .= $this->_get_site_font_form_tr("ウィジェット", $value['widget_fontname'], "widget_fontname");
     475        $title_fontname = '';
     476        $catchcopy_fontname = '';
     477        $widget_title_fontname = '';
     478        $widget_fontname = '';
     479        if ($value) {
     480            $title_fontname = $value['title_fontname'];
     481            $catchcopy_fontname = $value['catchcopy_fontname'];
     482            $widget_title_fontname = $value['widget_title_fontname'];
     483            $widget_fontname = $value['widget_fontname'];
     484        }
     485        $html = "<form method='post' action='' id='siteFontForm'>";
     486        $html .= '<p>タイトルなど、ウェブサイト共通部分のフォント設定です</p>';
     487        $html .= '<table class="widefat form-table">';
     488        $html .= '<tbody>';
     489        $html .= $this->_get_site_font_form_tr("サイトタイトル", $title_fontname, "title_fontname");
     490        $html .= $this->_get_site_font_form_tr("サイトキャッチコピー", $catchcopy_fontname, "catchcopy_fontname");
     491        $html .= $this->_get_site_font_form_tr("ウィジェットタイトル", $widget_title_fontname, "widget_title_fontname");
     492        $html .= $this->_get_site_font_form_tr("ウィジェット", $widget_fontname, "widget_fontname");
    483493        $html .= '</tbody>';
    484494        $html .= "</table>";
     
    587597            $i = 0;
    588598            foreach($array_input as $key => $value){
     599                $fontlist_fontname = '';
     600                $fontlist_cls= '';
     601                if ($value) {
     602                    $fontlist_fontname = $value['fontlist_fontname'];
     603                    $fontlist_cls = $value['fontlist_cls'];
     604                }
    589605                $i++;
    590606                $html .= "<tr id='font_setting'><td>";
    591607                $html .= "<div class='cls_delete_btn cls_delete_btn_selected'>×</div>";
    592                 $html .= "<input id='fontlist_input' class='fontlist_input' autocomplete='off' value='{$value['fontlist_fontname']}' style='font-family: {$value['fontlist_fontname']}'/>";
     608                $html .= "<input id='fontlist_input' class='fontlist_input' autocomplete='off' value='{$fontlist_fontname}' style='font-family: {$fontlist_fontname}'/>";
    593609                $html .= "<div class='w_fontlist b_def_fontlist'></div>";
    594610                $html .= "</td>";
    595611                $html .= "<td class='add_class_td'><input type='text' class='class_input' value=''/><button type='button' id='add_box' class='add_box'>追加</button>";
    596612
    597                 $cls_name = $value['fontlist_cls'];
     613                $cls_name = $fontlist_cls;
    598614                foreach($cls_name as $cls_value){
    599615                    $html .= "<p class='add_class_label'>{$cls_value} ×";
     
    603619
    604620                $html .= "</td>";
    605                 $html .= "<input value='{$value['fontlist_fontname']}' type='hidden' name='fontlist_fontname{$i}' id='fontlist_select' class='fontlist_select'/>";
     621                $html .= "<input value='{$fontlist_fontname}' type='hidden' name='fontlist_fontname{$i}' id='fontlist_select' class='fontlist_select'/>";
    606622                $html .= "</tr>";
    607623            };
  • ts-webfonts-for-conoha/trunk/readme.txt

    r2468448 r2480311  
    44Requires at least: 4.3.1
    55Tested up to: 4.7.3
    6 Stable tag: 2.0.0
     6Stable tag: 2.0.1
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    6767= 2.0.0 =
    6868* UI改善対応
     69
     70= 2.0.1 =
     71* PHP8対応
  • ts-webfonts-for-conoha/trunk/ts-webfonts-for-conoha.php

    r2468448 r2480311  
    22/*
    33Plugin Name: TypeSquare Webfonts for ConoHa
    4 Version: 2.0.0
     4Version: 2.0.1
    55Description: ConoHa WINGで株式会社モリサワが提供するWebフォントサービス「TypeSquare」を利用できるプラグインです。
    66Author: GMO Internet, Inc.
     
    296296    private function _get_site_font_styles () {
    297297        $fonts = TypeSquare_ST_Fonts::get_instance();
     298
    298299        $site_font_settings = $fonts->get_site_font_setting();
    299         $title_fontname = $site_font_settings['title_fontname'];
    300         $catchcopy_fontname = $site_font_settings['catchcopy_fontname'];
    301         $widget_title_fontname = $site_font_settings['widget_title_fontname'];
    302         $widget_fontname = $site_font_settings['widget_fontname'];
     300        $title_fontname = '';
     301        $catchcopy_fontname = '';
     302        $widget_title_fontname = '';
     303        $widget_fontname = '';
     304        if ($site_font_settings) {
     305            $title_fontname = $site_font_settings['title_fontname'];
     306            $catchcopy_fontname = $site_font_settings['catchcopy_fontname'];
     307            $widget_title_fontname = $site_font_settings['widget_title_fontname'];
     308            $widget_fontname = $site_font_settings['widget_fontname'];
     309        }
    303310        $style = '';
    304311        if ( $title_fontname ) {
Note: See TracChangeset for help on using the changeset viewer.