function baidu_check($url, $post_id){ $baidu_record = get_post_meta($post_id,'baidu_record',true); if( $baidu_record != 1){ $url='http://www.baidu.com/s?wd='.$url; $curl=curl_init(); curl_setopt($curl,CURLOPT_URL,$url); curl_setopt($curl,CURLOPT_RETURNTRANSFER,1); $rs=curl_exec($curl); curl_close($curl); if(!strpos($rs,'没有找到该URL。您可以直接访问') && !strpos($rs,'很抱歉,没有找到与') ){ update_post_meta($post_id, 'baidu_record', 1) || add_post_meta($post_id, 'baidu_record', 1, true); return 1; } else { return 0; } } else { return 1; } } function baidu_record() { global $wpdb; $post_id = ( null === $post_id ) ? get_the_ID() : $post_id; if(baidu_check(get_permalink($post_id), $post_id ) == 1) { echo '百度已收录'; } else { echo '百度未收录'; } } /* 百度收录查询 结束*/ /**企业微信商城订单,评论通知 开始**/ function push_weixin($comment_id) { $comment = get_comment($comment_id); // 配置开关:如果文章作者就是评论作者,那么不发送评论 if (get_post($comment->comment_post_ID)->post_author == $comment->user_id) { return false; } $times=current_time('mysql'); $siteurl = get_bloginfo('url'); $title = $times."\n\n".'您的文章 《' . get_the_title($comment->comment_post_ID) . '》 有新评论了'; $desp = "作者: $comment->comment_author \n\n IP地址: $comment->comment_author_IP \n\n 电子邮箱: $comment->comment_author_email \n\n 评论: $comment->comment_content \n\n"; $url = "$siteurl/?p=$comment->comment_post_ID#comments"; $postdata = http_build_query( array( 'title' => $title,'description' => $desp,'url' => $url ) ); // 一个 POST 请求 $opts = array('https' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('wx.php', false, $context); } add_action('comment_post', 'push_weixin', 19, 2); /**B2订单微信通知开始**/ add_filter( 'b2_order_notify_return', function($data){ if(empty($data)) return $data; // 读取配置 $setting = get_option('ftqq_serverchan_settings'); $times=current_time('mysql'); global $current_user; get_currentuserinfo(); $url =get_permalink($data['post_id']); $site_name = get_bloginfo('name'); $title = $times."\n\n".'亲爱的小主您有新的订单'; if($data['order_type']=='x' && $data['pay_type']=='credit' || $data['order_type']=='w' && $data['pay_type']=='credit' || $data['order_type']=='v' && $data['pay_type']=='credit'){ $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'商品名称:【'.get_the_title($data['post_id']).'】'."\n\n".'商品链接:'.get_permalink($data['post_id'])."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'积分'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='x' && $data['pay_type']<>'credit' || $data['order_type']=='w' && $data['pay_type']<>'credit' || $data['order_type']=='v' && $data['pay_type']<>'credit'){ $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'商品名称:【'.get_the_title($data['post_id']).'】'."\n\n".'商品链接:'.get_permalink($data['post_id'])."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='ds'){ $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'商品名称:打赏【'.get_the_title($data['post_id']).'】作者'."\n\n".'商品链接:'.get_permalink($data['post_id'])."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='d'){ $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'用户地址邮箱::'.$data['order_address']."\n\n".'商城兑换商品名称:【'.get_the_title($data['post_id']).'】'."\n\n".'商城商品链接:'.get_permalink($data['post_id'])."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'数量:'.$data['order_count'].'件'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='gx'){ $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'用户地址邮箱::'.$data['order_address']."\n\n".'商城商品名称:【'.get_the_title($data['post_id']).'】'."\n\n".'订单号:'.$data['order_id']."\n\n".'商城商品链接:'.get_permalink($data['post_id'])."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'数量:'.$data['order_count'].'件'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='c'){ $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'用户地址邮箱::'.$data['order_address']."\n\n".'商城抽中商品名称:【'.get_the_title($data['post_id']).'】'."\n\n".'商城商品链接:'.get_permalink($data['post_id'])."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'数量:'.$data['order_count'].'件'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='vip'){ $url ='lmtd.cn/vips'; $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'商品名称:VIP会员'."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='verify'){ $url ='lmtd.cn/verify'; $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'商品名称:高级认证'."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='cz'){ $url ='lmtd.cn'; $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'商品名称:用户充值'."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'------'.$site_name.'!'."\n\n"; } else if($data['order_type']=='cg'){ $url ='lmtd.cn'; $desp = '用户昵称:'.get_userdata($data['user_id'])->display_name."\n\n".'商品名称:购买积分'."\n\n".'订单号:'.$data['order_id']."\n\n".'订单金额:'.$data['order_total'].'元RMB'."\n\n".'------'.$site_name.'!'."\n\n"; } else { $text=""; $desp=""; $url=""; } $postdata = http_build_query(array('title' => $title,'description' => $desp,'url' => $url)); $opts = array('https' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('wx.php', false, $context); return $data; },4,1); /**B2订单微信通知结束**/ /**纯代码永久免费微信通知结束**/
Warning: Cannot modify header information - headers already sent by (output started at /home/wwwroot/ycb.hk/wp-content/themes/b2child/functions.php:404) in /home/wwwroot/ycb.hk/wp-content/plugins/wpjam-basic/public/wpjam-hooks.php on line 375
字体传奇 - 逆念 | 人生逆溯,执之信念,终成无畏

字体,logo,品牌,创意设计师学习交流,设计教程公开课互动为主的一个平台,在这里有一群志同道合的朋友他们为了设计不抛弃,不放弃旨在共同提高大家的设计水平,为设计而坚持!

ead693c0a3e827723756b6ec0087d94d

相关文章

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索