Changeset 3398661
- Timestamp:
- 11/19/2025 08:59:29 AM (4 months ago)
- Location:
- infility-global/trunk
- Files:
-
- 2 edited
-
infility_global.php (modified) (2 diffs)
-
widgets/infility-import-data/include/infility-import-seo.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
infility-global/trunk/infility_global.php
r3398651 r3398661 4 4 Plugin URI: https://www.infility.cn/ 5 5 Description: Infility公共插件 6 Version: 2.14.3 26 Version: 2.14.33 7 7 Author: Infility 8 8 Author URI: https://www.infility.cn/ … … 138 138 function __construct() 139 139 { 140 define( 'INFILITY_GLOBAL_VERSION', '2.14.3 2' );140 define( 'INFILITY_GLOBAL_VERSION', '2.14.33' ); 141 141 define( 'INFILITY_GLOBAL_PATH', plugin_dir_path( __FILE__ ) ); // fullpath/wp-content/plugins/infility-global/ // 有斜杠 142 142 define( 'INFILITY_GLOBAL_URL', plugins_url( '/', __FILE__ ) ); // https://the_domain/wp-content/plugins/infility-global/ // 斜杠是自己加的 -
infility-global/trunk/widgets/infility-import-data/include/infility-import-seo.php
r3398651 r3398661 485 485 } 486 486 487 $post_id = self::get_post_id_by_url($address);488 if ($post_id) {489 $updated_keys = self::update_seo_meta($post_id, $title, $desc);490 if (!empty($updated_keys)) {491 $summary['updated']++;492 $updated_posts++;493 if (count($summary['samples']) < 10) {494 $summary['samples'][] = [495 'type' => 'post',496 'post_id' => $post_id,497 'address' => $address,498 'title' => $title,499 'description' => $desc,500 'keys' => $updated_keys,501 ];502 }503 } else {504 $summary['skipped_blank']++;505 }506 continue;507 }508 509 487 list($term_id, $taxonomy) = self::get_term_by_url($address); 510 488 if ($term_id) { … … 513 491 $summary['updated']++; 514 492 $updated_terms++; 515 if (count($summary['samples']) < 10) {493 // if (count($summary['samples']) < 10) { 516 494 $summary['samples'][] = [ 517 495 'type' => 'term', … … 523 501 'keys' => $updated_keys, 524 502 ]; 525 } 503 // } 504 } else { 505 $summary['skipped_blank']++; 506 } 507 continue; 508 } 509 510 $post_id = self::get_post_id_by_url($address); 511 if ($post_id) { 512 $updated_keys = self::update_seo_meta($post_id, $title, $desc); 513 if (!empty($updated_keys)) { 514 $summary['updated']++; 515 $updated_posts++; 516 // if (count($summary['samples']) < 10) { 517 $summary['samples'][] = [ 518 'type' => 'post', 519 'post_id' => $post_id, 520 'address' => $address, 521 'title' => $title, 522 'description' => $desc, 523 'keys' => $updated_keys, 524 ]; 525 // } 526 526 } else { 527 527 $summary['skipped_blank']++; … … 547 547 } 548 548 if (!empty($summary['samples'])) { 549 $message[] = '<p> 示例(最多10条):</p>';549 $message[] = '<p>成功更新的链接:</p>'; 550 550 foreach ($summary['samples'] as $s) { 551 551 if (!empty($s['type']) && $s['type'] === 'term') {
Note: See TracChangeset
for help on using the changeset viewer.