Plugin Directory

Changeset 1185514


Ignore:
Timestamp:
06/22/2015 12:50:14 PM (11 years ago)
Author:
xhhjin
Message:

V1.3. 支持wordpress的定时发布文章

Location:
wp2csdnblog/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp2csdnblog/trunk/readme.txt

    r1180548 r1185514  
    66Requires at least: 2.7
    77Tested up to: 4.2.2
    8 Stable tag: 1.2
     8Stable tag: 1.3
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2323* 支持将Wordpress中文章链接发布到对应博客
    2424* 支持发布文章的自动归类
     25* 支持wordpress的定时发布文章
    2526
    2627== Installation ==
     
    4243== Changelog ==
    4344
     45= 1.3 =
     46
     47* 支持发布wordpress的定时发布文章到设置的博客
     48
    4449= 1.2 =
    4550
  • wp2csdnblog/trunk/wp2csdnblog.php

    r1180550 r1185514  
    33Plugin Name: WP2CSDNBlog
    44Plugin URI:  http://xuhehuan.com/2027.html
    5 Version:     1.2
     5Version:     1.3
    66Author:      xhhjin
    77Author URI:  http://xuhehuan.com
     
    2727add_action('admin_menu', 'menu_add_wp2csdnblog_setting');
    2828add_action('publish_post', 'publish_article_to_csdnblog');
     29add_action('publish_future_post', 'publish_article_to_csdnblog');
     30//add_action('future_to_publish', 'publish_article_to_csdnblog');
     31//add_action('save_post', 'publish_article_to_csdnblog');
    2932add_action('xmlrpc_public_post', 'publish_article_to_csdnblog');
    3033
     
    147150    $post = get_post($post_ID);
    148151    //new article
    149     if($post->post_type == "post" && ($post->post_date == $post->post_modified))
     152    if($post->post_type == "post" && (('publish_post' === current_filter() && $post->post_date == $post->post_modified) ||
     153        'publish_post' !== current_filter()))
    150154    {
    151155        //get title
Note: See TracChangeset for help on using the changeset viewer.