Changeset 3053854
- Timestamp:
- 03/18/2024 07:13:29 PM (22 months ago)
- Location:
- pz-linkcard/trunk
- Files:
-
- 3 added
- 6 edited
-
css/admin.css (modified) (1 diff)
-
js/admin-settings.js (modified) (2 diffs)
-
lib/pz-linkcard-cacheman-edit.php (added)
-
lib/pz-linkcard-cacheman-list.php (added)
-
lib/pz-linkcard-cacheman.php (added)
-
lib/pz-linkcard-settings.php (modified) (8 diffs)
-
lib/pz-linkcard-style.php (modified) (3 diffs)
-
pz-linkcard.php (modified) (18 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pz-linkcard/trunk/css/admin.css
r3000517 r3053854 619 619 } 620 620 .pz-lkc-develop-message { 621 margin: 0 0 0 -16px; 622 padding: 8px; 621 position: sticky; 622 z-index: 3; 623 top: 32px; 624 margin: 0 0 0 -20px; 625 padding: 16px 0 0 0; 626 height: 32px; 623 627 background-color: #00aa88 !important; 624 628 color: #ffffff !important; -
pz-linkcard/trunk/js/admin-settings.js
r3000517 r3053854 21 21 } 22 22 23 // submitをクリックしたら 24 $('form' ).submit( function() { 25 $('.pz-lkc-dashboard' ).hide(); 26 $('.pz-lkc-develop-message' ).hide(); 27 } ); 28 23 29 // イベント:ReadOnlyになったチェックボックスを動作させなくする 24 30 $('input:checkbox' ).on('click', checkbox_readonly ); … … 54 60 55 61 $('.pz-lkc-dashboard' ).show(); 56 57 62 } ); 58 63 -
pz-linkcard/trunk/lib/pz-linkcard-settings.php
r3051538 r3053854 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>'; } ?> 2 3 <div class="pz-lkc-dashboard wrap"> 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 23 <div class="pz-lkc-clear-both"> </div> 4 <h1 class="pz-lkc-header-settings"> 5 <span class="pz-lkc-header-settings-icon"><?php _e('⚙️', $this->text_domain ); ?></span> 6 7 <?php _e('LinkCard Settings', $this->text_domain ); ?> 8   9 <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> 10 <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><span class="pz-lkc-clear-both"></span></div> 11 </h1> 12 24 13 <?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 27 14 // 変数の設定 28 $action = isset($_POST['action']) ? $_POST['action'] : null ; 29 $properties = isset($_POST['properties']) ? $_POST['properties'] : null ; 30 $tab_now = isset($_POST['pz-lkc-tab-now'] ) ? $_POST['pz-lkc-tab-now'] : null ; 31 32 if ($properties ) { 15 $action = isset($_REQUEST['action'] ) ? esc_attr($_REQUEST['action'] ) : null; 16 $tab_now = isset($_REQUEST['pz-lkc-tab-now'] ) ? esc_attr($_REQUEST['pz-lkc-tab-now'] ) : null; 17 18 if (isset($_REQUEST['properties'] ) ) { 33 19 check_admin_referer('pz-lkc-settings' ); 34 switch ($action) { 20 21 $properties = $_REQUEST['properties']; 22 switch ($action ) { 35 23 case 'init-settings': 36 24 $result = $this->pz_InitializeOption(); // オプションの初期化 … … 53 41 default: 54 42 // 「変更を保存」もしくは「プラグインの再起動」をクリックしたとき 43 foreach($properties as $key => $value ) { 44 $properties[$key] = stripslashes($value ); 45 } 55 46 foreach($this->defaults as $key => $value ) { // 無いキーを生成 56 47 if (!array_key_exists($key, $properties ) ) { … … 58 49 } 59 50 } 51 60 52 $this->options = $properties; 61 53 … … 138 130 139 131 <?php wp_nonce_field('pz-lkc-settings' ); ?> 140 <input type="text" class="pz-lkc-tab-now pz-lkc-hide" name="pz-lkc-tab-now" value="<?php echo $tab_now; ?>" />141 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-error" value="<?php echo $this->options['error-mode']; ?>" />142 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-debug" value="<?php echo $this->options['debug-mode']; ?>" />143 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-admin" value="<?php echo $this->options['admin-mode']; ?>" />144 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-develop" value="<?php echo $this->options['develop-mode']; ?>" />145 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-multisite" value="<?php echo $is_multisite; ?>" />146 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-initialize" value="<?php echo $this->options['flg-initialize']; ?>" />132 <input type="text" class="pz-lkc-tab-now pz-lkc-hide" name="pz-lkc-tab-now" value="<?php echo esc_attr($tab_now ); ?>" /> 133 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-error" value="<?php echo esc_attr($this->options['error-mode'] ); ?>" /> 134 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-debug" value="<?php echo esc_attr($this->options['debug-mode'] ); ?>" /> 135 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-admin" value="<?php echo esc_attr($this->options['admin-mode'] ); ?>" /> 136 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-develop" value="<?php echo esc_attr($this->options['develop-mode'] ); ?>" /> 137 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-multisite" value="<?php echo esc_attr($is_multisite ); ?>" /> 138 <input type="text" class="pz-lkc-display pz-lkc-hide" name="pz-lkc-initialize" value="<?php echo esc_attr($this->options['flg-initialize'] ); ?>" /> 147 139 148 140 <div class="pz-lkc-tabs"> … … 193 185 <th scope="row"><?php _e('Occurrence Time', $this->text_domain ); ?></th> 194 186 <td> 195 <span class="pz-lkc-admin-only"><input name="properties[error-time]" type="text" value="<?php echo $this->options['error-time']; ?>" readonly="readonly" /></span>187 <span class="pz-lkc-admin-only"><input name="properties[error-time]" type="text" value="<?php echo esc_attr($this->options['error-time'] ); ?>" readonly="readonly" /></span> 196 188 <?php echo ($this->options['error-time'] ) ? date($this->datetime_format, $this->options['error-time'] ) : null ; ?> 197 189 </td> … … 262 254 <th scope="row"><?php echo __('How to', $this->text_domain ).' '.__('(', $this->text_domain ).__('Japanese Only', $this->text_domain ).__(')', $this->text_domain ); ?></th> 263 255 <td> 264 <p><?php echo esc_attr($this->options['plugin-name'] ).' Ver.'.esc_attr($this->options['plugin-version'] ); ?></p>256 <p><?php echo esc_attr($this->options['plugin-name'] ).' Ver.'.esc_attr($this->options['plugin-version'] ); ?></p> 265 257 <p><a href="<?php echo esc_attr($plugin_url ); ?>" rel="external noopener" target="_blank"><?php echo esc_attr($plugin_url ); ?></a></p> 266 258 </td> … … 1103 1095 <tr> 1104 1096 <th scope="row"><?php _e('Class ID to be Added (for PC)', $this->text_domain ); ?></th> 1105 <td><input name="properties[class-pc]" type="text" size="40" value="<?php echo (isset($this->options['class-pc'] ) ? esc_attr($this->options['class-pc']) : '' ); ?>" /></td>1097 <td><input name="properties[class-pc]" type="text" size="40" value="<?php echo (isset($this->options['class-pc'] ) ? esc_attr($this->options['class-pc'] ) : '' ); ?>" /></td> 1106 1098 </tr> 1107 1099 <tr> 1108 1100 <th scope="row"><?php _e('Class ID to be Added (for Mobile)', $this->text_domain ); ?></th> 1109 <td><input name="properties[class-mobile]" type="text" size="40" value="<?php echo (isset($this->options['class-mobile'] ) ? esc_attr($this->options['class-mobile']) : '' ); ?>" /><br>1101 <td><input name="properties[class-mobile]" type="text" size="40" value="<?php echo (isset($this->options['class-mobile'] ) ? esc_attr($this->options['class-mobile'] ) : '' ); ?>" /><br> 1110 1102 </tr> 1111 1103 … … 1145 1137 <tr class="pz-lkc-debug-only"> 1146 1138 <th scope="row"><span class="pz-lkc-admin-text"><?php _e('Administrator Mode', $this->text_domain ); ?></span></th> 1147 <td><label class="pz-lkc-admin-text"><input name="properties[admin-mode]" type="checkbox" value="1" class="pz-lkc-tab-show" <?php checked($this->options['admin-mode'] ); if (!$this->options['admin-mode'] ) {echo 'readonly="readonly"'; }; if (!$this->options['admin-mode'] ) { echo 'ondblclick="this.readOnly=false;"'; } ?> /><?php _e('Display information that is not normally needed or open special settings.', $this->text_domain ); _e('(Deprecated)', $this->text_domain ); ?></label></td>1139 <td><label class="pz-lkc-admin-text"><input name="properties[admin-mode]" type="checkbox" value="1" class="pz-lkc-tab-show" <?php checked($this->options['admin-mode'] ); if (!$this->options['admin-mode'] ) {echo 'readonly="readonly"'; }; if (!$this->options['admin-mode'] ) { echo 'ondblclick="this.readOnly=false;"'; } ?> /><?php _e('Display information that is not normally needed or open special settings.', $this->text_domain ); _e('(Deprecated)', $this->text_domain ); ?></label></td> 1148 1140 </tr> 1149 1141 -
pz-linkcard/trunk/lib/pz-linkcard-style.php
r3000517 r3053854 368 368 $file_text = str_replace('/*EX-BGCOLOR*/', 'background-color: '.$this->options['ex-bgcolor'].';', $file_text ); 369 369 } 370 if ($this->options['ex-image']) { 371 if (preg_match('/https?(:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/', $this->options['ex-image'])) { 372 $file_text = str_replace('/*EX-IMAGE*/', 'background-image: url("'.$this->options['ex-image'].'");', $file_text ); 370 $bg_image = esc_url($this->options['ex-image'] ); 371 if ($bg_image ) { 372 if (preg_match('/https?(:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/', $bg_image ) ) { 373 $file_text = str_replace('/*EX-IMAGE*/', 'background-image: url("'.$bg_image.'");', $file_text ); 373 374 } else { 374 $file_text = str_replace('/*EX-IMAGE*/', 'background-image: '.$ this->options['ex-image'].';', $file_text );375 $file_text = str_replace('/*EX-IMAGE*/', 'background-image: '.$bg_image.';', $file_text ); 375 376 } 376 377 } … … 380 381 $file_text = str_replace('/*IN-BGCOLOR*/', 'background-color: '.$this->options['in-bgcolor'].';', $file_text ); 381 382 } 382 if ($this->options['in-image']) { 383 if (preg_match('/https?(:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/', $this->options['in-image'])) { 384 $file_text = str_replace('/*IN-IMAGE*/', 'background-image: url("'.$this->options['in-image'].'");', $file_text ); 383 $bg_image = esc_url($this->options['in-image'] ); 384 if ($bg_image ) { 385 if (preg_match('/https?(:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/', $bg_image)) { 386 $file_text = str_replace('/*IN-IMAGE*/', 'background-image: url("'.$bg_image.'");', $file_text ); 385 387 } else { 386 $file_text = str_replace('/*IN-IMAGE*/', 'background-image: '.$ this->options['in-image'].';', $file_text );388 $file_text = str_replace('/*IN-IMAGE*/', 'background-image: '.$bg_image.';', $file_text ); 387 389 } 388 390 } … … 392 394 $file_text = str_replace('/*TH-BGCOLOR*/', 'background-color: '.$this->options['th-bgcolor'].';', $file_text ); 393 395 } 394 if ($this->options['th-image']) { 395 if (preg_match('/https?(:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/', $this->options['th-image'])) { 396 $file_text = str_replace('/*TH-IMAGE*/', 'background-image: url("'.$this->options['th-image'].'");', $file_text ); 396 $bg_image = esc_url($this->options['th-image'] ); 397 if ($bg_image ) { 398 if (preg_match('/https?(:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/', $bg_image)) { 399 $file_text = str_replace('/*TH-IMAGE*/', 'background-image: url("'.$bg_image.'");', $file_text ); 397 400 } else { 398 $file_text = str_replace('/*TH-IMAGE*/', 'background-image: '.$ this->options['th-image'].';', $file_text );401 $file_text = str_replace('/*TH-IMAGE*/', 'background-image: '.$bg_image.';', $file_text ); 399 402 } 400 403 } -
pz-linkcard/trunk/pz-linkcard.php
r3051538 r3053854 3 3 /* 4 4 Plugin Name: Pz-LinkCard 5 Plugin URI: http://popo ron.poponet.jp/pz-linkcard5 Plugin URI: http://popozure.info/pz-linkcard 6 6 Description: リンクをカード形式で表示します。 7 Version: 2.5. 27 Version: 2.5.3 8 8 Author: Poporon 9 Author URI: http://popo ron.poponet.jp9 Author URI: http://popozure.info 10 10 Text Domain: pz-linkcard 11 11 Domain Path: /language … … 17 17 protected $defaults = 18 18 array( 19 'plugin-version' => '2.5. 2',19 'plugin-version' => '2.5.3', 20 20 'plugin-name' => 'Pz-LinkCard', 21 21 'plugin-abbreviation' => 'Pz-LkC', … … 561 561 $class_id = 'linkcard'; 562 562 if ($is_mobile && $this->options['class-mobile'] ) { 563 $class_id .= ' '. $this->options['class-mobile'];563 $class_id .= ' '.esc_attr($this->options['class-mobile'] ); 564 564 } elseif ($this->options['class-pc'] ) { 565 $class_id .= ' '. $this->options['class-pc'];565 $class_id .= ' '.esc_attr($this->options['class-pc'] ); 566 566 } 567 567 … … 672 672 $thumbnail_alt = null; 673 673 $favicon_alt = null; 674 $info = isset($this->options['th-info'] ) ? $this->options['th-info'] : null ;674 $info_text = isset($this->options['th-info'] ) ? $this->options['th-info'] : null ; 675 675 $sw_thumbnail = isset($this->options['in-thumbnail'] ) ? $this->options['in-thumbnail'] : 0 ; 676 676 $sw_favicon = isset($this->options['in-favicon'] ) ? $this->options['in-favicon'] : 0 ; … … 684 684 $thumbnail_alt = isset($this->options['in-thumbnail-alt'] ) ? $this->options['in-thumbnail-alt'] : null ; 685 685 $favicon_alt = isset($this->options['in-favicon-alt'] ) ? $this->options['in-favicon-alt'] : null ; 686 $info = isset($this->options['in-info'] ) ? $this->options['in-info'] : null ;686 $info_text = isset($this->options['in-info'] ) ? $this->options['in-info'] : null ; 687 687 $sw_thumbnail = isset($this->options['in-thumbnail'] ) ? $this->options['in-thumbnail'] : 0 ; 688 688 $sw_favicon = isset($this->options['in-favicon'] ) ? $this->options['in-favicon'] : 0 ; … … 708 708 $thumbnail_alt = isset($this->options['ex-thumbnail-alt'] ) ? $this->options['ex-thumbnail-alt'] : null ; 709 709 $favicon_alt = isset($this->options['ex-favicon-alt'] ) ? $this->options['ex-favicon-alt'] : null ; 710 $info = isset($this->options['ex-info'] ) ? $this->options['ex-info'] : null ;710 $info_text = isset($this->options['ex-info'] ) ? $this->options['ex-info'] : null ; 711 711 $sw_thumbnail = isset($this->options['ex-thumbnail'] ) ? $this->options['ex-thumbnail'] : 0 ; 712 712 $sw_favicon = isset($this->options['ex-favicon'] ) ? $this->options['ex-favicon'] : 0 ; 713 713 } 714 715 // XSS対策 716 $more_text = esc_attr($more_text ); 717 $info_text = esc_attr($info_text ); 718 $thumbnail_alt = esc_attr($thumbnail_alt ); 719 $favicon_alt = esc_attr($favicon_alt ); 714 720 715 721 // ドメイン名の準備 … … 969 975 970 976 // サイト情報 971 if ($info ) {972 $added_info = $html_added_op.$info .$html_added_cl;977 if ($info_text ) { 978 $added_info = $html_added_op.$info_text.$html_added_cl; 973 979 } else { 974 980 $added_info = null; … … 981 987 $info_date = null; 982 988 } 983 $domain_info = 984 '<div class="lkc-info">'. 985 $html_a_op. 986 $html_favicon. 987 '<div class="lkc-domain"'. 988 $title_sitename.'>'. 989 $disp_sitename. 990 '</div>'. 991 $added_info. 992 $html_a_cl. 993 $html_sns_info. 994 $html_url2. 995 $info_date. 996 '</div>'; 989 $domain_info = '<div class="lkc-info">'.$html_a_op.$html_favicon.'<div class="lkc-domain"'.$title_sitename.'>'.$disp_sitename.'</div>'.$added_info.$html_a_cl.$html_sns_info.$html_url2.$info_date.'</div>'; 997 990 998 991 // Google AMP用 簡易タグ作成 … … 1051 1044 // URL指定なし 1052 1045 if (!$url ) { 1046 return null; 1047 } 1048 1049 // URLの安全性チェック 1050 if (!wp_http_validate_url( $url ) ) { 1053 1051 return null; 1054 1052 } … … 1324 1322 // $count_before = isset($data['sns_twitter'] ) ? $data['sns_twitter'] : -1; 1325 1323 // if ($sns_renew || $count_before < 0 ) { 1326 // $result = wp_ remote_get('https://jsoon.digitiminimi.com/twitter/count.json?url=' .$url_raw, $opt );1324 // $result = wp_safe_remote_get('https://jsoon.digitiminimi.com/twitter/count.json?url=' .$url_raw, $opt ); 1327 1325 // if (isset($result ) && !is_wp_error($result ) && $result['response']['code'] == 200 ) { 1328 1326 // $json = json_decode($result['body'] ); … … 1340 1338 // $count_before = intval(isset($data['sns_facebook'] ) ? $data['sns_facebook'] : -1 ); 1341 1339 // if ($sns_renew || $count_before < 0 ) { 1342 // $result = wp_ remote_get('https://graph.facebook.com?fields=og_object{engagement}&id=' .$url_raw, $opt );1340 // $result = wp_safe_remote_get('https://graph.facebook.com?fields=og_object{engagement}&id=' .$url_raw, $opt ); 1343 1341 // if (isset($result ) && !is_wp_error($result ) && $result['response']['code'] == 200 ) { 1344 1342 // $json = json_decode($result['body'] ); … … 1356 1354 $count_before = isset($data['sns_hatena'] ) ? $data['sns_hatena'] : -1; 1357 1355 if ($sns_renew || $count_before < 0 ) { 1358 $result = wp_ remote_get('http://api.b.st-hatena.com/entry.count?url=' .$url_raw, $opt );1356 $result = wp_safe_remote_get('http://api.b.st-hatena.com/entry.count?url=' .$url_raw, $opt ); 1359 1357 if (isset($result ) && !is_wp_error($result ) && $result['response']['code'] == 200 ) { 1360 1358 $count = intval($result['body'] ); … … 1371 1369 $count_before = isset($data['sns_pocket'] ) ? $data['sns_pocket'] : -1; 1372 1370 if ($sns_renew || $count_before < 0 ) { 1373 $result = wp_ remote_get('https://widgets.getpocket.com/api/saves?url=' .$url_raw, $opt );1371 $result = wp_safe_remote_get('https://widgets.getpocket.com/api/saves?url=' .$url_raw, $opt ); 1374 1372 if (isset($result ) && !is_wp_error($result ) && $result['response']['code'] == 200 ) { 1375 1373 $json = json_decode($result['body'] ); … … 1810 1808 } 1811 1809 1810 // URLの安全性チェック 1811 if (!wp_http_validate_url( $url ) ) { 1812 return null; 1813 } 1814 1812 1815 // URLエンコード 1813 1816 $url = $this->pz_EncodeURL($url ,true ); … … 1880 1883 } else { // cURLが使用できない場合 1881 1884 // wp_remote_get 実行 1882 $rget_data = wp_ remote_get($url ); // wp_remote_get実行1885 $rget_data = wp_safe_remote_get($url ); // wp_remote_get実行 1883 1886 $err_no = is_wp_error($rget_data ); // wp_remote_getエラー有無 1884 1887 $err_message = null; // wp_remote_getエラーメッセージ … … 2390 2393 // 管理画面のサブメニュー追加 2391 2394 public function add_menu() { 2392 //$menu_manager = __('Pz LkC Cache', $this->text_domain );2395 $menu_manager = __('Pz LkC Cache', $this->text_domain ); 2393 2396 $menu_settings = __('Pz LinkCard', $this->text_domain ); 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 if ($this->options['flg-alive'] && $this->options['flg-alive-count'] ) { 2398 global $wpdb; 2399 $result = $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name WHERE alive_result < 100 OR alive_result >= 400"); 2400 if (isset($result ) && isset($result->count ) ) { 2401 $menu_manager .= ' <span class="update-plugins"><span class="update-count lkc-menu-count">'.$result->count.'</span></span>'; 2402 } 2403 } 2404 add_management_page (__('LinkCard Cache Manager', $this->text_domain ), $menu_manager, 'manage_options', 'pz-linkcard-cacheman', array($this, 'page_cacheman' ) ); 2402 2405 add_options_page (__('LinkCard Settings', $this->text_domain ), $menu_settings, 'manage_options', 'pz-linkcard-settings', array($this, 'page_settings' ) ); 2403 2406 } … … 2418 2421 $links, 2419 2422 array( 2423 'manager' => '<a href="'.$this->cacheman_url.'">'.__('Manager' , $this->text_domain ).'</a>', 2420 2424 'settings' => '<a href="'.$this->settings_url.'">'.__('Settings', $this->text_domain ).'</a>', 2421 2425 ) … … 2423 2427 } 2424 2428 2425 // 'manager' => '<a href="'.$this->cacheman_url.'">'.__('Manager' , $this->text_domain ).'</a>',2426 2429 2427 2430 // プラグインを有効化 -
pz-linkcard/trunk/readme.txt
r3051538 r3053854 152 152 == Changelog == 153 153 154 = 2.5.3 = 155 * WordPress 6.4.3 での動作確認。 156 Compatible with WordPress 6.4.3. 157 * 「SSRF(サーバーサイドリクエストフォージェリ)」に対する脆弱性があったため、対策を行いました。 158 Fixed: SSRF vulnerability was discovered and countermeasures were taken. 159 * 「XSS(クロスサイトスクリプティング)」に対する脆弱性があったため、対策を行いました。 160 Fixed: XSS vulnerability was discovered and countermeasures were taken. 161 * 「Reflected-XSS(反射型クロスサイトスクリプティング)」に対する脆弱性があったため、対策を行いました。 162 Fixed: Reflected-XSS vulnerability was discovered and countermeasures were taken. 163 * ソーシャルカウントの取得方法を修正しました。 164 Fixed: Modified "How to access the External Links" to be even more secure. 165 * URLの安全性チェックを追加しました。 166 Fixed: Modified "URL Checks" to be even more secure. 167 154 168 = 2.5.2 = 155 * 一次的に管理画面を使用できないようにしました。169 * 欠番。 156 170 157 171 = 2.5.1 =
Note: See TracChangeset
for help on using the changeset viewer.