<?php
if (!defined('ABSPATH')) {
die;
} // Cannot access directly.
//**切换暗黑风格
function tap_dark()
{
$is_ripro_dark = !empty($_POST['is_ripro_dark']) ? intval($_POST['is_ripro_dark']) : 0;
$_SESSION['is_ripro_dark'] = $is_ripro_dark;
echo $_SESSION['is_ripro_dark'];
exit();
}
add_action('wp_ajax_tap_dark', 'tap_dark');
add_action('wp_ajax_nopriv_tap_dark', 'tap_dark');
//**切换博客模式
function blog_style()
{
$is_blog_style = ($_POST['is_blog_style'] == '0') ? 1 : 0;
$_SESSION['is_blog_style'] = $is_blog_style;
echo $_SESSION['is_blog_style'];
exit();
}
add_action('wp_ajax_blog_style', 'blog_style');
add_action('wp_ajax_nopriv_blog_style', 'blog_style');
function get_bigger_img()
{
//新版本海报抛弃传统的php后端生产模式,使用js前段绘图,不占用服务器资源 性能出众 参考灵感来自wpcom.cn和b2的html2canvasjs技术
header('Content-type:application/html; Charset=utf-8');
global $current_user;
$post_id = !empty($_POST['id']) ? (int)$_POST['id'] : 0;
$post = get_post($post_id);
if ($current_user->ID>0) {
// 生出带参数的推广文章链接
$afflink = add_query_arg(array('ref' => $current_user->ID), get_the_permalink($post_id));
} else {
$afflink = get_the_permalink($post_id);
}
if (!$post) {
exit('参数错误');
}
$img_u = _get_post_thumbnail_url($post_id);
$img_t = get_template_directory_uri() . '/timthumb.php?src=' . $img_u . '&h=300&w=400&zc=1&a=c&q=80&s=1';
// $imageInfo = getimagesize($img_t);
// $b64 = base64_encode(file_get_contents($img_t));
// switch ($imageInfo[2]) { //判读图片类型
// case 1: $img_type = "gif";
// break;
// case 2: $img_type = "jpg";
// break;
// case 3: $img_type = "png";
// break;
// }
// $img_base64 = 'data:image/' . $img_type . ';base64,' . $b64;
echo '<div id="poster-html" class="poster-html">';
echo '<div class="poster-header">';
echo '<img src="'.$img_t.'">';
echo '<h2 class="poster-title">'.get_the_title($post_id).'</h2>';
echo '</div>';
echo '<div class="poster-body">';
echo '<div class="poster-meta">';
echo '<div class="poster-author">'.get_avatar($post->post_author).get_the_author_meta('display_name', $post->post_author).'</div>';
echo '<div class="poster-data">'.$post->post_date.'</div>';
echo '</div>';
echo '<div class="poster-text">'.wp_trim_words(strip_shortcodes($post->post_content), 120, '...').'</div>';
echo '</div>';
echo '<div class="poster-footer">';
echo '<div class="poster-logo">';
echo '<img src="'._cao('poster_logo').'">';
echo '<p>'._cao('poster_desc').'</p>';
echo '</div>';
echo '<div class="poster-qrcode">';
echo '<img src="'.getQrcode($afflink).'">';
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="poster-canvas"></div>';
echo '<a class="poster-down btn" href="" download="'.get_the_title($post_id).'.png"><i class="fa fa-spinner fa-spin"></i> '.esc_html__('海报生成中', 'rizhuti-v2').'</a>';
exit;
}
add_action('wp_ajax_nopriv_get_bigger_img', 'get_bigger_img');
add_action('wp_ajax_get_bigger_img', 'get_bigger_img');
/**
* [ajax_getcat_post 分类文章获取]
* @Author Dadong2g
* @DateTime 2020-03-05T19:56:17+0800
* @return [type] [html str]
*/
function ajax_getcat_post()
{
global $wp_query;
header('Content-type:application/html; Charset=utf-8');
// $paged = !empty($_POST['paged']) ? esc_sql($_POST['paged']) : 1;
$cat = !empty($_POST['cat']) ? (int)$_POST['cat'] : '';
/////////////
$is_cao_site_list_blog = is_cao_site_list_blog();
if ($is_cao_site_list_blog) {
$latest_layout = 'bloglist';
} else {
$latest_layout = _cao('latest_layout', 'grid');
}
/////////////
$args = array(
'cat' => $cat,
'post_status' => 'publish',
);
$data = new WP_Query($args);
if ($data->have_posts()) {
while ($data->have_posts()) : $data->the_post();
get_template_part('parts/template-parts/content', $latest_layout);
endwhile;
} else {
get_template_part('parts/template-parts/content', 'none');
}
wp_reset_postdata();
exit();
}
add_action('wp_ajax_ajax_getcat_post', 'ajax_getcat_post');
add_action('wp_ajax_nopriv_ajax_getcat_post', 'ajax_getcat_post');
/**
* [ajax_search AJAX搜索]
* @Author Dadong2g
* @DateTime 2019-08-21T23:35:34+0800
* @return [type] [JSON Arr]
*/
function ajax_search()
{
global $wp_query;
header('Content-type:application/json; Charset=utf-8');
$text = !empty($_POST['text']) ? esc_sql($_POST['text']) : null;
$args = array('s' => $text,'posts_per_page' => 5);
$array_posts = array();
$data = new WP_Query($args);
while ($data->have_posts()) : $data->the_post();
array_push($array_posts, array("title"=>get_the_title(),"url"=>get_permalink(),"img"=>_get_post_timthumb_src() ));
endwhile;
echo json_encode($array_posts);
exit();
}
add_action('wp_ajax_ajax_search', 'ajax_search');
add_action('wp_ajax_nopriv_ajax_search', 'ajax_search');
function get_mpweixin_qr()
{
header('Content-type:application/json; Charset=utf-8');
$wxConfig = _cao('oauth_mpweixin');
$CaoMpWeixin = new CaoMpWeixin($wxConfig);
echo json_encode($CaoMpWeixin->getLoginQr());
exit;
}
add_action('wp_ajax_get_mpweixin_qr', 'get_mpweixin_qr');
add_action('wp_ajax_nopriv_get_mpweixin_qr', 'get_mpweixin_qr');
function check_mpweixin_qr()
{
header('Content-type:application/json; Charset=utf-8');
$scene_id = !empty($_POST['scene_id']) ? sanitize_text_field(wp_unslash($_POST[ 'scene_id' ])) : null;
global $current_user;
$current_user_id =$current_user->ID;
// 查询数据库
global $wpdb, $mpwx_log_table_name;
$res = $wpdb->get_row($wpdb->prepare("SELECT * FROM $mpwx_log_table_name WHERE scene_id = %s ", esc_sql($scene_id)));
if (($res->create_time+180)<time()) {
echo json_encode(array('status' => 0));
exit;
//180秒内有效
}
// 查询openid
$_prefix = 'mpweixin';
$_openid_meta_key = 'open_' . $_prefix . '_openid';
$user_exist = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key=%s AND meta_value=%s", $_openid_meta_key, $res->openid));
if (!$current_user_id && !empty($res) && $res->scene_id == $scene_id && !empty($res->openid)) {
if (!empty($user_exist)) {
wp_set_auth_cookie($user_exist, true, false);
$user = get_user_by('id', $user_exist);
do_action('wp_login', $user->user_login, $user); // 保证挂载的action执行
}
$status = 1;
} else {
$status = 0;
}
echo json_encode(array('status' => $status));
exit;
}
add_action('wp_ajax_check_mpweixin_qr', 'check_mpweixin_qr');
add_action('wp_ajax_nopriv_check_mpweixin_qr', 'check_mpweixin_qr');
/**
* [user_login 用户登录]
* @Author Dadong2g
* @DateTime 2019-06-02T15:34:38+0800
* @return [type] [description]
*/
function user_login()
{
header('Content-type:application/json; Charset=utf-8');
$username = !empty($_POST['username']) ? esc_sql($_POST['username']) : null;
$password = !empty($_POST['password']) ? esc_sql($_POST['password']) : null;
$rememberme = !empty($_POST['rememberme']) ? esc_sql($_POST['rememberme']) : null;
if (_cao('is_close_wplogin')) {
echo json_encode(array('status' => '0', 'msg' => '仅开放社交账号登录'));
exit;
}
$login_data = array();
$login_data['user_login'] = $username;
$login_data['user_password'] = $password;
$login_data['remember'] = false;
if (isset($rememberme) && $rememberme == '1') {
没有合适的资源?快使用搜索试试~ 我知道了~
Ripro9.0免扩展二开版WordPress博客主题Ripro全解密无后门.zip
共1335个文件
php:860个
png:119个
js:75个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 144 浏览量
2024-03-28
10:17:46
上传
评论
收藏 15.65MB ZIP 举报
温馨提示
Ripro9.0免扩展二开版,Ripro主题全解密无后门,这次分享的源码包内的东西不少 不仅含有ripro主题、子主题,还有几款插件,都是非常实用的东西!下面我将逐一介绍一下。 1、ripro主题:本套ripro主题说的版本是ripro9.0,测试时看了下 应该是使用ripro8.9二开出来的9.0版本,就如破解者说的那样“RiPro9.0二开版本 完全解密修正版,无后门更放心!免扩展、虚拟主机就能用!且修正了原版的多处BUG,更好用! 2、ripro子主题:子主题有huzao-child主题和sheji-child子主题美化包,共两款。 3、WordPress插件:插件有DX-Watermark、图片自动加水印插件、WordPress轻水印插件、 WPCopyRights网站防复制插件和riprodl插件,共四款。 测试报告:本次分享的源码包内的东西,测试了的有ripro9.0主题和源码包里附带的4款插件 在测试过程中无论是ripro主题还是自带的插件都未发现问题,均正常运行! 至于两款ripro子主题我就没继续体验了,至于它们兼不兼容9.0版的ripro大家下载
资源推荐
资源详情
资源评论
收起资源包目录
Ripro9.0免扩展二开版WordPress博客主题Ripro全解密无后门.zip (1335个子文件)
app111.css 213KB
app.css 209KB
app.css 169KB
app.min.css 158KB
external.css 121KB
external.css 121KB
diy.css 82KB
style.css 80KB
csf.css 79KB
diy.css 77KB
layui.css 72KB
layui.css 72KB
style.min.css 64KB
csf.min.css 63KB
riprodl.css 57KB
riprodl.css 57KB
riprodl.css 57KB
admin.css 51KB
DPlayer.min.css 44KB
DPlayer.min.css 44KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
sweetalert2.min.css 21KB
sweetalert2.min.css 21KB
style.css 20KB
wangEditor.min.css 15KB
wangEditor.min.css 15KB
admin.css 14KB
shortcodes.css 14KB
shortcodes.css 14KB
layer.css 14KB
layer.css 14KB
jquery.fancybox.min.css 14KB
jquery.fancybox.min.css 14KB
editor-style.css 13KB
editor-style.css 13KB
editor-style.css 13KB
swiper.min.css 11KB
layui.mobile.css 10KB
layui.mobile.css 10KB
style-rtl.css 9KB
laobuluo.css 8KB
laobuluo.css 8KB
csf-rtl.css 8KB
laydate.css 7KB
laydate.css 7KB
notice.css 6KB
style-rtl.min.css 5KB
uibanner.css 5KB
install.min.css 5KB
csf-rtl.min.css 5KB
prism.css 4KB
prism.css 4KB
prism.css 4KB
code.css 1KB
code.css 1KB
style.css 946B
style.css 912B
style.min.css 808B
diy.css 621B
style.css 554B
style.css 554B
diy.css 447B
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
materialdesignicons-webfont.eot 296KB
materialdesignicons-webfont.eot 296KB
fontawesome-webfont.eot 75KB
fontawesome-webfont.eot 75KB
iconfont.eot 46KB
iconfont.eot 46KB
loading-0.gif 6KB
loading-0.gif 6KB
slider.gif 2KB
loading-2.gif 2KB
loading-2.gif 2KB
preloader.gif 866B
preloader.gif 866B
loading.gif 771B
loading-1.gif 701B
loading-1.gif 701B
sel.gif 284B
transp0.gif 262B
transp.gif 69B
loginAgent.html 4KB
loginAgent.html 4KB
loginAgent.html 4KB
loginAgent.html 4KB
loginAgent.html 4KB
loginAgent.html 4KB
vip.jpg 406KB
bingImage.jpg 335KB
bingImage.jpg 335KB
user_bg.jpg 335KB
user_bg.jpg 335KB
preview.jpg 205KB
banner_bg.jpg 201KB
zfb_hb.jpg 187KB
共 1335 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论
智慧浩海
- 粉丝: 1w+
- 资源: 5175
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功