Plugin Directory

Changeset 2908782


Ignore:
Timestamp:
05/06/2023 07:03:11 AM (3 years ago)
Author:
cnfang
Message:

2.7.23

Location:
wxsync/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wxsync/trunk/readme.txt

    r2895411 r2908782  
    33Donate link: http://std.cloud
    44Tags: 微信公众号,免费,公众号文章采集,数据采集,微信公众号采集
    5 Stable tag: 2.7.22
     5Stable tag: 2.7.23
    66Tested up to: 5.8.3
    77License: GPLv2 or later
  • wxsync/trunk/wxsync.php

    r2895411 r2908782  
    44Plugin URI: http://std.cloud
    55Description: 标准云微信公众号文章免费采集、<strong>任意公众号自动采集付费购买</strong>
    6 Version: 2.7.22
     6Version: 2.7.23
    77Author: 标准云(std.cloud)
    88Author URI: http://std.cloud
     
    2424$GLOBALS['wxsync_tab'] = '';
    2525$GLOBALS['wxsync_error'] = array();
    26 $GLOBALS['wxsync_ver'] = '2.7.22';
     26$GLOBALS['wxsync_ver'] = '2.7.23';
    2727$GLOBALS['wxsync_code'] = 0;
    2828
    2929$GLOBALS['wxsync_pageurl_open'] = 0;
     30$GLOBALS['wxsync_article_att_ids'] = [];
    3031
    3132function wxsync_admin_menu() {
     
    437438    $zone = get_option('timezone_string');
    438439    date_default_timezone_set($zone);
     440
     441    $GLOBALS['wxsync_article_att_ids'] = [];
    439442
    440443    $override = isset($req['override']) && $req['override'];
     
    855858            array_push($GLOBALS['wxsync_error'],'创建文章失败'.esc_url_raw($url));
    856859        }else{
     860
     861            foreach ($GLOBALS['wxsync_article_att_ids'] as $att_id) {
     862                $attachment = get_post( $att_id );
     863                if ( $attachment ) {
     864                    $attachment->post_parent = $pid;
     865                    wp_update_post( $attachment );
     866                }
     867            }
     868           
    857869            if('keep' == $article_thumbnail && !empty($vardict['thumbnail'])){
    858870                set_post_thumbnail($pid, $vardict['thumbnail']);
     
    9961008
    9971009    }
     1010
     1011    $GLOBALS['wxsync_article_att_ids'][] = $att_id;
     1012   
    9981013    return array($ret[0],$att_id);
    9991014}
Note: See TracChangeset for help on using the changeset viewer.