<?php
/***
* 仅供学习与研究,版权归软件方所有
* 请于下载后24小时删除
* 请勿用于商业用途
**/
function wp_autopost_pro_head()
{
global $wp_autopost_root;
echo '<link rel="stylesheet" type="text/css" href="' . $wp_autopost_root . 'css/wp-autopost.css" />';
echo '<script type="text/javascript" src="' . $wp_autopost_root . 'js/wp-autopost.js" /></script>';
}
add_action("admin_head", "wp_autopost_pro_head");
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();
}
}
}
}
function wp_autopostlink_content_filter($content)
{
global $wpdb, $t_autolink;
$autolinks = $wpdb->get_results("SELECT * FROM " . $t_autolink);
return wp_autopostlink_replace($content, $autolinks);
}
add_filter("content_save_pre", "wp_autopostlink_content_filter");
function wp_autopostlink_replace($content, $autolinks)
{
$ignore_pre = 1;
global $wp_autolink_replaced;
$wp_autolink_replaced = false;
foreach ($autolinks as $autolink) {
$keyword = $autolink->keyword;
list($link, $desc, $nofollow, $newwindow, $firstonly, $ignorecase, $WholeWord) = explode("|", $autolink->details);
if ($ignorecase == 1) {
if (stripos($content, $keyword) === false)
continue;
} else {
if (strpos($content, $keyword) === false)
continue;
}
$wp_autolink_replaced = true;
$cleankeyword = stripslashes($keyword);
if (!$desc) {
$desc = $cleankeyword;
}
$desc = addcslashes($desc, '$');
$url = '<a href="' . $link . '" title="' . $desc . '"';
if ($nofollow)
$url .= ' rel="nofollow"';
if ($newwindow)
$url .= ' target="_blank"';
$zpbxrxfe = "ex_word";
$url .= ">" . addcslashes($cleankeyword, '$') . "</a>";
$sarbhgjofs = "content";
if ($firstonly)
$limit = 1;
else
$limit = -1;
if ($ignorecase)
$case = "i";
else
$case = "";
$ex_word = preg_quote($cleankeyword, "'");
if ($ignore_pre) {
if ($num_1 = preg_match_all("/<pre.*?>.*?<\/pre>/is", $content, $ignore_pre)) {
for ($i = 1; $i <= $num_1; $i++)
$content = preg_replace("/<pre.*?>.*?<\/pre>/is", "%ignore_pre_$i%", $content, 1);
}
}
$content = preg_replace("|(<img)(.*?)(" . $ex_word . ")(.*?)(>)|U", '$1$2%&&&&&%$4$5', $content);
$cleankeyword = preg_quote($cleankeyword, "'");
if ($WholeWord == 1) {
$regEx = '\'(?!((<.*?)|(<a.*?)))(\b' . $cleankeyword . '\b)(?!(([^<>]*?)>)|([^>]*?</a>))\'s' . $case;
} else {
$regEx = '\'(?!((<.*?)|(<a.*?)))(' . $cleankeyword . ')(?!(([^<>]*?)>)|([^>]*?</a>))\'s' . $case;
}
$content = preg_replace($regEx, $url, $content, $limit);
$content = str_replace("%&&&&&%", stripslashes($ex_word), $content);
if ($ignore_pre) {
for ($i = 1; $i <= $num_1; $i++) {
$content = str_replace("%ignore_pre_$i%", $ignore_pre[0][$i - 1], $content);
}
}
}
unset($autolinks);
$autoLinkTag = get_option("wp-autopost-link-tag");
if ($autoLinkTag[0] == 1) {
$nofollow = $autoLinkTag[1];
$newwindow = $autoLinkTag[2];
$firstonly = $autoLinkTag[3];
$ignorecase = $autoLinkTag[4];
$WholeWord = $autoLinkTag[5];
global $wpdb;
$terms = $wpdb->get_results("SELECT $wpdb->terms.term_id, $wpdb->terms.name FROM $wpdb->terms,$wpdb->term_taxonomy WHERE $wpdb->terms.term_id=$wpdb->term_taxonomy.term_id AND $wpdb->term_taxonomy.taxonomy = 'post_tag'", OBJECT);
foreach ($terms as $term) {
$keyword = $term->name;
if ($ignorecase == 1) {
if (stripos($content, $keyword) === false)
continue;
} else {
if (strpos($content, $keyword) === false)
continue;
}
$wp_autolink_replaced = true;
$cleankeyword = stripslashes($keyword);
$desc = $cleankeyword;
$desc = addcslashes($desc, '$');
$url = '<a href="' . get_tag_link($term->term_id) . "\" title=\"" . $desc . "flickr.photos.notes.edit";
if ($nofollow)
$url .= " rel=\"nofollow\"";
if ($newwindow)
$url .= " target=\"_blank\"";
$url .= ">" . addcslashes($cleankeyword, '$') . "</a>";
if ($firstonly)
$limit = 1;
else
$limit = -1;
if ($ignorecase)
$case = "i";
else
$case = "";
$ex_word = preg_quote($cleankeyword, "'");
if ($ignore_pre) {
if ($num_1 = preg_match_all("/<pre.*?>.*?<\/pre>/is", $content, $ignore_pre)) {
for ($i = 1; $i <= $num_1; $i++)
$content = preg_replace("/<pre.*?>.*?<\/pre>/is", "%ignore_pre_$i%", $content, 1);
}
}
$content = preg_replace('|(<img)(.*?)(' . $ex_word . ')(.*?)(>)|U', '$1$2%&&&&&%$4$5', $content);
$cleankeyword = preg_quote($cleankeyword, "'");
if ($WholeWord == 1) {
$regEx = '\'(?!((<.*?)|(<a.*?)))(\b' . $cleankeyword . '\b)(?!(([^<>]*?)>)|([^>]*?</a>))\'s' . $case;
} else {
$regEx = '\'(?!((<.*?)|(<a.*?)))(' . $cleankeyword . ')(?!(([^<>]*?)>)|([^>]*?</a>))\'s' . $case;
}
$content = preg_replace($regEx, $url, $content, $limit);
$content = str_replace("%&&&&&%", stripslashes($ex_word), $content);
if ($ignore_pre) {
for ($i = 1; $i <= $num_1; $i++) {
$content = str_replace("%ignore_pre_$i%", $ignore_pre[0][$i - 1], $content);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
wp-autopost-pro采集插件,支持最新的WordPress,各个功能正常
共41个文件
php:18个
ttf:6个
png:5个
需积分: 0 4 下载量 10 浏览量
2024-01-05
19:54:08
上传
评论
收藏 1.44MB ZIP 举报
温馨提示
wp-autopost-pro采集插件,支持最新的WordPress,各个功能正常 写好规则即可采集数据 用来采集壁纸、头像等资源都很好用,基本上免费,可以定时,分组任务,自动任务,自动更新功能应有尽有,还有基于翻译的伪原创。 1、刚建的wordpress站点内容比较少,希望尽快有比较丰富的内容; 2、热点内容自动采集并自动发布; 3、定时采集,手动采集发布或保存到草稿; 4、css样式规则,能更精确的采集需要的内容。 5、伪原创与翻译、代理IP进行采集、保存Cookie记录; 6、可采集内容到自定义栏目 7、解决部分用户使用3.6.1版本导致整站后台与前台卡顿的问题! —-此版本与官方的功能没有任何区别; WP AutoPost Pro 是目前最好用的WordPress自动采集发布插件,最大的特点是可以采集来自于任何网站的内容并自动发布到你的WordPress站点。不像其他大部分WordPress采集插件,只能根据Feed进行采集,使用Feed采集有很大的弊端,首先必须找到全文Feed,而现在网上全文Feed很少,大部分只能采集到文章摘要,就算使用Feed采集到文章摘要也需要点击链接
资源推荐
资源详情
资源评论
收起资源包目录
wp-autopost-pro.zip (41个子文件)
wp-autopost-pro
wp-autopost-documentation.php 468B
wp-autopost-proxy.php 4KB
wp-autopost-options.php 13KB
languages
wp-autopost-zh_CN.po 36KB
wp-autopost-zh_TW.po 36KB
wp-autopost-zh_TW.mo 36KB
wp-autopost-zh_CN.mo 36KB
js
wp-autopost.js 1KB
masonry.pkgd.min.js 24KB
wp-autopost.php 16KB
wp-autopost-js.php 22KB
wp-autopost-logs.php 4KB
wp-autopost-watermark.php 10KB
wp-autopost-flickr.php 18KB
wp-autopost-translator.php 7KB
pic.php 1KB
wp-autopost-function.php 439KB
wp-autopost-page.php 33KB
css
wp-autopost.css 2KB
wp-autopost-updatedpost.php 22KB
wp-autopost-link.php 16KB
wp-autopost-saction.php 77KB
wp-autopost-qiniu.php 15KB
images
blank.gif 43B
running.gif 2KB
watermark.png 3KB
wp-autopost-icon.png 3KB
menu_icon.png 1002B
wp-autopost-function.php-bak 1.02MB
wp-autopost-tasklist.php 111KB
watermark
preview_img.jpg 46KB
preview.jpg 61KB
uploads
watermark.png 3KB
watermark1.png 3KB
fonts
trebuc.ttf 131KB
georgia.ttf 151KB
times.ttf 400KB
verdana.ttf 168KB
arial.ttf 359KB
tahoma.ttf 375KB
wp-autopost-upyun.php 12KB
共 41 条
- 1
资源评论
孤岛上的小旅馆
- 粉丝: 11
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功