Plugin Directory

Changeset 3051538


Ignore:
Timestamp:
03/15/2024 08:34:10 AM (2 years ago)
Author:
poporon
Message:

2.5.2

  • 一次的に管理画面を使用できないようにしました。
Location:
pz-linkcard/trunk
Files:
3 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • pz-linkcard/trunk/lib/pz-linkcard-settings.php

    r3018386 r3051538  
    11<?php defined('ABSPATH' ) || wp_die; ?>
    2 <?php /* 開発者モード */ if ($this->options['develop-mode'] ) { echo '<div class="pz-lkc-develop-message">'.__('Currently working in a development environment.', $this->text_domain ).'</div>'; } ?>
    32<div class="pz-lkc-dashboard wrap">
    4     <h1 class="pz-lkc-header-settings"><span class="pz-lkc-header-settings-icon"><?php echo __('&#x2699;&#xfe0f;', $this->text_domain ); ?></span>&nbsp;<?php _e('LinkCard Settings', $this->text_domain ); ?>&ensp;<a href="<?php echo $this->options['author-url']; ?>/pz-linkcard-manager" rel="external noopener help" target="_blank"><img src="<?php echo $this->plugin_dir_url.'img/help.png'; ?>" width="16" height="16" title="<?php _e('Help', $this->text_domain ); ?>" alt="help"></a></h1>
    5     <div class="pz-lkc-header-goto"><a href="<?php echo $this->cacheman_url; ?>"><span class="pz-lkc-header-goto-icon"><?php echo __('&#x1f5c3;&#xfe0f;', $this->text_domain ); ?></span><span class="pz-lkc-header-goto-text"><?php echo __('Cache Manager', $this->text_domain ); ?></span></a></div>
     3
     4    <?php
     5    echo    '<h1 class="pz-lkc-header-settings">';
     6    /* 開発者モード */
     7    if  (!$this->options['develop-mode'] ) {
     8        echo '<div class="pz-lkc-develop-message">'.__('Currently working in a development environment.', $this->text_domain ).'</div>';
     9    }
     10
     11    echo    '<span class="pz-lkc-header-settings-icon">';
     12    echo    __('&#x2699;&#xfe0f;', $this->text_domain );
     13    echo    '</span>';
     14    echo    '&nbsp;';
     15    echo    __('LinkCard Settings', $this->text_domain );
     16    echo    '&ensp;';
     17    echo    '<a href="'.$this->options['author-url'].'/pz-linkcard-manager" rel="external noopener help" target="_blank"><img src="'.$this->plugin_dir_url.'img/help.png" width="16" height="16" title="'.__('Help', $this->text_domain ).'" alt="help">';
     18    echo    '</a>';
     19    echo    '</h1>';
     20?>
     21
     22
    623    <div class="pz-lkc-clear-both">&nbsp;</div>
    724<?php
     25/*  <div class="pz-lkc-header-goto"><a href="<?php echo $this->cacheman_url; ?>"><span class="pz-lkc-header-goto-icon"><?php echo __('&#x1f5c3;&#xfe0f;', $this->text_domain ); ?></span><span class="pz-lkc-header-goto-text"><?php echo __('Cache Manager', $this->text_domain ); ?></span></a></div> */
     26
    827    // 変数の設定
    928    $action                 =   isset($_POST['action'])          ? $_POST['action']         : null ;
  • pz-linkcard/trunk/pz-linkcard.php

    r3018386 r3051538  
    55Plugin URI:     http://poporon.poponet.jp/pz-linkcard
    66Description:    リンクをカード形式で表示します。
    7 Version:        2.5.1
     7Version:        2.5.2
    88Author:         Poporon
    99Author URI:     http://poporon.poponet.jp
     
    1717    protected   $defaults           =
    1818        array(
    19             'plugin-version'        =>  '2.5.1',
     19            'plugin-version'        =>  '2.5.2',
    2020            'plugin-name'           =>  'Pz-LinkCard',
    2121            'plugin-abbreviation'   =>  'Pz-LkC',
     
    21332133        $header     =   curl_getinfo($ch );
    21342134        curl_close($ch );
    2135         if  ($header['http_code']   >=  400 ) {                     // 指定されたURLの画像が存在しない
    2136             touch($file_path_jpeg );                                // 空ファイル作成
     2135        if  ($header['http_code']   >=  400 ) {                 // 指定されたURLの画像が存在しない
     2136            touch($file_path_jpeg );                            // 空ファイル作成
    21372137            return  null;
    21382138        }
    21392139
    21402140        // 画像生成
    2141         $image          =   imagecreatefromstring($body );          // 画像読み込み
    2142         $image_width    =   imagesx($image );
    2143         $image_height   =   imagesy($image );
    2144         if  ($image_width < 8 || $image_height < 8 ) {              // 8x8未満は画像ではないと見なす
    2145             touch($file_path_jpeg );                                // 空ファイル作成
     2141        $image          =   @imagecreatefromstring($body );     // 画像読み込み
     2142        if  ($image     === false ) {
     2143            touch($file_path_jpeg );                            // 空ファイル作成
     2144            return  null;
     2145        }
     2146
     2147        $image_width    =   @imagesx($image );                  // 画像の横
     2148        $image_height   =   @imagesy($image );                  // 画像の縦
     2149        if  ($image_width === false || $image_height === false || $image_width < 8 || $image_height < 8 ) {     // 8x8未満は画像ではないと見なす
     2150            touch($file_path_jpeg );                            // 空ファイル作成
    21462151            return  null;
    21472152        }
     
    23852390    // 管理画面のサブメニュー追加
    23862391    public function add_menu() {
    2387         $menu_manager   =   __('Pz LkC Cache',  $this->text_domain );
     2392//      $menu_manager   =   __('Pz LkC Cache',  $this->text_domain );
    23882393        $menu_settings  =   __('Pz LinkCard',   $this->text_domain );
    2389         if  ($this->options['flg-alive'] && $this->options['flg-alive-count'] ) {
    2390             global  $wpdb;
    2391             $result     =   $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name WHERE alive_result < 100 OR alive_result >= 400");
    2392             if  (isset($result ) && isset($result->count ) ) {
    2393                 $menu_manager   .=  '&nbsp;<span class="update-plugins"><span class="update-count lkc-menu-count">'.$result->count.'</span></span>';
    2394             }
    2395         }
    2396         add_management_page (__('LinkCard Cache Manager',   $this->text_domain ), $menu_manager,    'manage_options', 'pz-linkcard-cacheman',   array($this, 'page_cacheman' ) );
     2394//      if  ($this->options['flg-alive'] && $this->options['flg-alive-count'] ) {
     2395//          global  $wpdb;
     2396//          $result     =   $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name WHERE alive_result < 100 OR alive_result >= 400");
     2397//          if  (isset($result ) && isset($result->count ) ) {
     2398//              $menu_manager   .=  '&nbsp;<span class="update-plugins"><span class="update-count lkc-menu-count">'.$result->count.'</span></span>';
     2399//          }
     2400//      }
     2401//      add_management_page (__('LinkCard Cache Manager',   $this->text_domain ), $menu_manager,    'manage_options', 'pz-linkcard-cacheman',   array($this, 'page_cacheman' ) );
    23972402        add_options_page    (__('LinkCard Settings',        $this->text_domain ), $menu_settings,   'manage_options', 'pz-linkcard-settings',   array($this, 'page_settings' ) );
    23982403    }
     
    24142419            array(
    24152420                'settings'  =>  '<a href="'.$this->settings_url.'">'.__('Settings', $this->text_domain ).'</a>',
    2416                 'manager'   =>  '<a href="'.$this->cacheman_url.'">'.__('Manager' , $this->text_domain ).'</a>',
    24172421            )
    24182422        );
    24192423    }
     2424
     2425//              'manager'   =>  '<a href="'.$this->cacheman_url.'">'.__('Manager' , $this->text_domain ).'</a>',
    24202426
    24212427    // プラグインを有効化
  • pz-linkcard/trunk/readme.txt

    r3018386 r3051538  
    151151
    152152== Changelog ==
     153
     154= 2.5.2 =
     155* 一次的に管理画面を使用できないようにしました。
    153156
    154157= 2.5.1 =
Note: See TracChangeset for help on using the changeset viewer.