WP-AutoPostPro 汉化版: WordPress自动采集发布插件 WordPress文章采集

发布于:2024-04-19 ⋅ 阅读:(23) ⋅ 点赞:(0)


一、详细介绍

WP-AutoPostPro 是目前最好用的WordPress自动采集发布插件,最大的特点是可以采集来自于任何网站的内容并自动发布到你的WordPress站点。真正做到可以采集任何网站的内容并自动发布,采集过程完全自动进行无需人工干预,并提供内容过滤、HTML标签过滤、关键词替换、自动链接、自动标签、自动下载远程图片到本地服务器、自动添加文章前缀后缀、并且可以使用微软翻译引擎将采集的文章自动翻译为各种语言进行发布。

规则教程网上有一堆,很简单,也不需要付费,比付费包月插件好太多了

二、效果展示

1.部分代码

代码如下(示例):

function pro_update_cron_url()
{
    if ($_REQUEST["update_autopost"] == 1) {
        ap_pro_checkupdate(1);
        exit;
    }
}
function pro_update_after_page_load()
{
    ap_pro_checkupdate(0);
}
if (get_option("wp_autopost_updateMethod") == 1)
    add_action("init", "pro_update_cron_url");
else
    add_action("shutdown", "pro_update_after_page_load");
function ap_pro_checkupdate($print = 1)
{
    global $wpdb, $t_ap_config;
    if ($wpdb->get_var("SHOW TABLES LIKE '$t_ap_config'") != $t_ap_config)
        return;
    $tasks = $wpdb->get_results("SELECT id,last_update_time,update_interval,is_running FROM " . $t_ap_config . " WHERE activation=1 ORDER BY id");
    $i    = 0;
    foreach ($tasks as $task) {
        if (($task->is_running) == 1 && current_time("timestamp") > (($task->last_update_time) + (60) * 15)) {
            $wpdb->query("update " . $t_ap_config . " set is_running = 0 where id=" . $task->id);
        }
        if (current_time("timestamp") > (($task->last_update_time) + ($task->update_interval) * 60) && ($task->is_running) == 0) {
            $canUpdate                                   = true;
            $ids[$i++] = $task->id;
            $wpdb->query("update " . $t_ap_config . " set last_update_time = " . current_time("timestamp") . " where id=" . $task->id);
        }
    }
    $isTaskRunning = $wpdb->get_var("select max(is_running) from " . $t_ap_config . " where activation = 1");
    if ($isTaskRunning == null || $isTaskRunning == 0) {
        update_option("wp_autopost_runOnlyOneTaskIsRunning", 0);
    }
    if ($canUpdate) {
        ignore_user_abort(true);
        set_time_limit((int) get_option("wp_autopost_timeLimit"));
        foreach ($ids as $id) {
            fetch($id, $print, 0);
            if ($print) {
                ob_flush();
                flush();
            }
        }
    }
}

2.效果图展示

请添加图片描述


三、学习资料下载

蓝奏云:https://qumaw.lanzoul.com/iB4J21vjy3qf