Changeset 3051538
- Timestamp:
- 03/15/2024 08:34:10 AM (2 years ago)
- Location:
- pz-linkcard/trunk
- Files:
-
- 3 deleted
- 3 edited
-
lib/pz-linkcard-cacheman-edit.php (deleted)
-
lib/pz-linkcard-cacheman-list.php (deleted)
-
lib/pz-linkcard-cacheman.php (deleted)
-
lib/pz-linkcard-settings.php (modified) (1 diff)
-
pz-linkcard.php (modified) (5 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pz-linkcard/trunk/lib/pz-linkcard-settings.php
r3018386 r3051538 1 1 <?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>'; } ?>3 2 <div class="pz-lkc-dashboard wrap"> 4 <h1 class="pz-lkc-header-settings"><span class="pz-lkc-header-settings-icon"><?php echo __('⚙️', $this->text_domain ); ?></span> <?php _e('LinkCard Settings', $this->text_domain ); ?> <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 __('🗃️', $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 __('⚙️', $this->text_domain ); 13 echo '</span>'; 14 echo ' '; 15 echo __('LinkCard Settings', $this->text_domain ); 16 echo ' '; 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 6 23 <div class="pz-lkc-clear-both"> </div> 7 24 <?php 25 /* <div class="pz-lkc-header-goto"><a href="<?php echo $this->cacheman_url; ?>"><span class="pz-lkc-header-goto-icon"><?php echo __('🗃️', $this->text_domain ); ?></span><span class="pz-lkc-header-goto-text"><?php echo __('Cache Manager', $this->text_domain ); ?></span></a></div> */ 26 8 27 // 変数の設定 9 28 $action = isset($_POST['action']) ? $_POST['action'] : null ; -
pz-linkcard/trunk/pz-linkcard.php
r3018386 r3051538 5 5 Plugin URI: http://poporon.poponet.jp/pz-linkcard 6 6 Description: リンクをカード形式で表示します。 7 Version: 2.5. 17 Version: 2.5.2 8 8 Author: Poporon 9 9 Author URI: http://poporon.poponet.jp … … 17 17 protected $defaults = 18 18 array( 19 'plugin-version' => '2.5. 1',19 'plugin-version' => '2.5.2', 20 20 'plugin-name' => 'Pz-LinkCard', 21 21 'plugin-abbreviation' => 'Pz-LkC', … … 2133 2133 $header = curl_getinfo($ch ); 2134 2134 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 ); // 空ファイル作成 2137 2137 return null; 2138 2138 } 2139 2139 2140 2140 // 画像生成 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 ); // 空ファイル作成 2146 2151 return null; 2147 2152 } … … 2385 2390 // 管理画面のサブメニュー追加 2386 2391 public function add_menu() { 2387 $menu_manager = __('Pz LkC Cache', $this->text_domain );2392 // $menu_manager = __('Pz LkC Cache', $this->text_domain ); 2388 2393 $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 .= ' <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 .= ' <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' ) ); 2397 2402 add_options_page (__('LinkCard Settings', $this->text_domain ), $menu_settings, 'manage_options', 'pz-linkcard-settings', array($this, 'page_settings' ) ); 2398 2403 } … … 2414 2419 array( 2415 2420 'settings' => '<a href="'.$this->settings_url.'">'.__('Settings', $this->text_domain ).'</a>', 2416 'manager' => '<a href="'.$this->cacheman_url.'">'.__('Manager' , $this->text_domain ).'</a>',2417 2421 ) 2418 2422 ); 2419 2423 } 2424 2425 // 'manager' => '<a href="'.$this->cacheman_url.'">'.__('Manager' , $this->text_domain ).'</a>', 2420 2426 2421 2427 // プラグインを有効化 -
pz-linkcard/trunk/readme.txt
r3018386 r3051538 151 151 152 152 == Changelog == 153 154 = 2.5.2 = 155 * 一次的に管理画面を使用できないようにしました。 153 156 154 157 = 2.5.1 =
Note: See TracChangeset
for help on using the changeset viewer.