2022年1月份版本修改记录:
1.css版本新增记录备份
展开收缩
.body {font: 4px 宋体,阿里巴巴普惠体;} /** 标题前图标 **/ #post-75 h2 a:before { content: "e68b"; font-family: be; font-size: 16px; color: #c40000; padding: 0 5px 0 0; } /** 标题后图标 **/ #post-75 h2 a:after { content: "e667"; font-family: be; font-size: 14px; color: #c40000; padding: 0 0 0 5px; } /** 标题后加文字 **/ #post-75 h2 a:after { content: "推荐"; font-size: 14px; background: #c40000; color: #fff; margin: 0 0 0 5px; padding: 1px 3px; border-radius: 2px; } .bars:after, .nav-mobile:after { content: "导航"; background: #c40000; color: #fff; padding: 1px 3px; border-radius: 2px; } .bars .be, .nav-mobile .be { display: none; } .hidden-content, .weixin-form { padding: 0 0.5rem; border: 1px dashed #ff4400; } .weixin-n { color: #ff4400; } .weixin-form img { width: 150px; height: auto; } .mytips { background-image: -webkit-linear-gradient(left, #444, #3690cf 25%, #444 50%, #ff4400 75%, #444); -webkit-text-fill-color: transparent; -webkit-background-clip: text; -webkit-background-size: 200% 100%; -webkit-animation: masked-animation 0.5s infinite linear; } .main-nav .down-menu a:hover .mytips { -webkit-text-fill-color: #fff; } @-webkit-keyframes masked-animation { 0% { background-position: 0 0; } 100% { background-position: -100% 0; } } .single-content p img{margin: 0 auto;} /**苹果风格 #cms-widget-two h3, #sidebar h3, #sidebar-l h3, .cat-w-icon, .cat-container .cat-title, .cat-grid-title, .cat-square-title { height: 38px; line-height: 38px; background: linear-gradient(0deg, #ffffff, #ececec); border-top: 1px solid white; border-bottom: 1px solid #b3b3b3; border-top-left-radius: 5px; border-top-right-radius: 5px; } .widget, .cat-container { border-radius: 5px; } .more-i span:nth-child(1) { background: #e95d5c; } .more-i span:nth-child(2) { background: #f1c04a; } .more-i span:nth-child(3) { background: #3fce52; } .more-i span { width: 8px; height: 8px; border-radius: 50%; border: none; } .cat-title .more-i, .cat-square-title .more-i, .widget-title .more-i, .cat-square-title .more-i, .cat-grid-title .more-i, .child-title .more-i, .cat-w-icon .more-i { margin: 4px 14px 0 0; }**/ /**头像文字**/ @media screen and (min-width: 1025px) { .mys { position: relative; } .mysup { position: absolute; top: 20px; right: -5px; font-size: 12px; color: #fff !important; line-height: 13px !important; margin: 0; padding: 3px; border-radius: 50%; background: #c40000; animation: flash 3s linear infinite; } } /**公告边框 .bread { width: 1122px; height: 35px; margin: 10px auto; border: 1px solid #ddd; border-radius: 0px; background-color: #fff; margin-top: 12px; padding-top: 6px; padding-left: 10px; white-space: nowrap; word-wrap: normal; text-overflow: ellipsis; overflow: hidden; }**/ /*板凳美化*/ .pinglunqs{ color:#fff; padding:0px 8px; border-radius:8px} .plshafa{ background:#fd5d3c; } .plbandeng{ background:#d270fb; } .pldiban{ background:#9cf; } /** 论坛插件 **/ #af-wrapper a { } #af-wrapper .main-title { padding: 16px 10px; font-weight: bold; } #af-wrapper small { font-size: 14px; font-size: 1.4rem; } #af-wrapper a:hover { text-decoration: none; } .asgaros-forum .breadcrumb { display: none; } #forum-breadcrumbs { position: absolute; top: -34px; left: 0; } #af-wrapper #forum-breadcrumbs a { font-size: 14px; font-size: 1.4rem; color: #444 !important; } #af-wrapper .history-topic, #af-wrapper .history-time, #af-wrapper #profile-content .profile-row div:nth-child(2), #af-wrapper .last-post-headline, #af-wrapper .forum-stats, #af-wrapper .topic-stats, #af-wrapper .post-reactions .reaction-number, #af-wrapper #bottom-navigation a, #af-wrapper .forum-post-date, #af-wrapper .forum-post-date a, #af-wrapper input::placeholder { font-style: normal !important; } #af-wrapper .button-red { border-radius: 5px !important; } #af-wrapper .button-normal span:before { } #af-wrapper .button-normal{ border-radius: 5px !important; border: none !important; } .forum-editor-button, #af-wrapper .editor-row .button { border-radius: 5px; } #af-wrapper .pages-and-menu { position: relative; display: block; min-height: 0; } .pages-and-menu .forum-menu { position: absolute; top: 0; right: 10px; } #af-wrapper .forum-menu .button-red { background: transparent !important; border: none !important; } /** 论坛插件 **/ /**普通指针样式**/ body{cursor:url(/wp-content/themes/begin/img/normal.cur),default; } /**链接指针样式**/ a:hover{cursor:url(/wp-content/themes/begin/img/link.cur),pointer;} /*哀悼全主题置灰 https://www.playezu.com/wp-content/uploads/2018/03/logo_meitu_1.png https://www.playezu.com/wp-content/uploads/2021/12/16393643291.png html {filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); }*/ /**作者头像**/ .about-img { position: inherit; width: 100px; z-index: 1; margin: 35px auto 10px; } /**erphp样式**/ .erphpdown { margin: 30px 0 !important; border: 1px solid #ddd !important; padding: 30px 15px 20px 15px!important; font-size: 16px !important; /**text-align: center;**/ overflow: visible !important; border-radius: 2px; } .erphpdown .erphp-login-must, .erphpdown .erphpdown-down, .erphpdown .erphpdown-vip, .erphpdown .erphpdown-buy { padding: 5px 15px !important; font-size: 16px !important; } .erphpdown .login-respond { border: none; } .erphpdown:after { background: #fff; position: absolute; top: -20px; left: 15px; content: "资源下载"; color: #555 !important; font-weight: bold; padding: 5px 10px !important; } /**四栏导航**/ .qz-box a { background: #08c; float: left; width: 25%; color: #fff!important; text-align: center; padding: 15px 10px 10px 10px } .g-col .qz-box a,#cms-widget-one .qz-box a { width: 25%; padding: 25px 10px 20px 10px } @media screen and (max-width:900px) { .qz-box a { width: 50% } #cms-widget-one .qz-box a { width: 50% } } @media screen and (max-width:700px) { #group-widget-one .qz-box a { width: 50% } } .qz-box a:hover { background: #777 } a.qza { background: #699 } a.qzb { background: #c96 } a.qzc { background: #969 } a.qzd { background: #9c9 } .qz-icon { padding: 5px 0 10px 0; display: block } .qz-icon .be { font-size: 40px!important } .g-col .qz-icon .be { font-size: 60px!important } /**杂志首页三栏新闻标题样式**/ .cat-container .cat-title a { float: left; width: 100%; height: 38px; line-height: 38px; text-align: center; font-size: 1.5rem; color: #5584a5; } /*自定义头部导航边框 .top-menu a { border: 1px solid #9f9d9d; padding: 0 2px; color: #7d7c7c; border-radius: 3px; }*/ /*微信方式自动跳转*/ .btnyc888 { background: #3690cf; font-size: 15px; font-size: 1.5rem; color: #fff !important; text-align: center; margin: 8px 0 15px 25px; padding: 8px 15px; border: 1px solid #3690cf; border-radius: 5px; box-shadow: 0 1px 1px rgba(0,0,0,0.1); }
文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
2.function文件修改记录
展开收缩
文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
<?php if ( ! defined( 'ABSPATH' ) ) exit; require get_template_directory() . '/inc/theme-setup.php'; // 自定义代码加到此行下面 // 添加用户归属地和ip地址 require get_template_directory() . '/show-useragent/show-useragent.php'; // global $wpdb; // $wpdb->query("DELETE FROM wp_options WHERE option_name = 'core_updater.lock'"); // 更新 WordPress 中国镜像 //add_filter('site_transient_update_core', function($value){ foreach ($value->updates as &$update) { // if($update->locale == 'zh_CN'){ // $update->download = 'https://cn.wp.xz.cn/latest-zh_CN.zip'; // $update->packages->full = 'https://cn.wp.xz.cn/latest-zh_CN.zip'; // } // } //return $value; // // add_action('media_buttons', 'add_my_media_button'); // function add_my_media_button() { // echo '<a href="https://pan.playezu.com" id="insert-my-media" class="button">远程图片</a>'; // } // 添加图床上传按钮 add_action('media_buttons', 'add_my_media_button'); function add_my_media_button() { $currentUser = wp_get_current_user(); if(!empty($currentUser->roles) && in_array('administrator', $currentUser->roles)){ $DOMAIN="img.playezu.com"; $APIkey="4a7a01"; // 是管理员 } elseif (!empty($currentUser->roles) && in_array('subscriber', $currentUser->roles)){ $DOMAIN="img.playezu.com"; $APIkey="7a01"; // 是管理员 } else return 0; // 非管理员 echo ' <input id="up_to_chevereto" type="file" accept="image/*" multiple="multiple"/> <label for="up_to_chevereto" id="up_img_label"><i class="fa fa-picture-o" aria-hidden="true"></i> 上传图片</label> '; ?> <style type="text/css"> #up_to_chevereto { display: none; } #up_img_label { color: #2271b1; display: inline-block; text-decoration: none; font-size: 13px; line-height: 2.15384615; min-height: 30px; margin: 0; padding: 0 10px; cursor: pointer; border-width: 1px; border-style: solid; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; box-sizing: border-box; } </style> <script type="text/javascript"> jQuery('#up_to_chevereto').change(function() { window.wpActiveEditor = null; for (var i = 0; i < this.files.length; i++) { var f=this.files[i]; var formData=new FormData(); formData.append('source',f); jQuery.ajax({ async:true, crossDomain:true, url:'https://<?php echo $DOMAIN; ?>/api/1/upload/?key=<?php echo $APIkey; ?>&format=json', type : 'POST', processData : false, contentType : false, data:formData, beforeSend: function (xhr) { jQuery('#up_img_label').html('<i class="fa fa-spinner rotating" aria-hidden="true"></i> Uploading...'); }, success:function(res){ wp.media.editor.insert('<a href="'+res.image.url+'"><img src="'+res.image.url+'" alt="'+res.image.title+'"></img></a>'); jQuery("#up_img_label").html('<i class="fa fa-check" aria-hidden="true"></i> 继续上传'); }, error: function (){ jQuery("#up_img_label").html('<i class="fa fa-times" aria-hidden="true"></i> 上传失败,重新上传'); } } </script> <?php } //IP归属地和运营商查询功能include("show-useragent/show-useragent.php"); //显示国籍、系统、浏览器信息 // function wpjam_parse_query_useronly( $wp_query ) { // if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/edit.php' ) !== false ) { // if ( !current_user_can( 'add_user' ) ) { // global $current_user; // $wp_query->set( 'author', $current_user->id ); // } // } // } // add_filter('parse_query', 'wpjam_parse_query_useronly' ); // 屏蔽搜索分类下显示结果 function Bing_search_filter_category( $query) { if ( !$query->is_admin && $query->is_search) { $query->set('cat','-2338'); //注意前面要加一个减号 } return $query; } add_filter('pre_get_posts','Bing_search_filter_category'); //禁止用户直接访问分类路径 add_action( 'template_redirect', 'show_only_login', 0 ); function show_only_login(){ if(is_category(array(2338)) && !is_user_logged_in()){ wp_redirect(home_url()); exit; } } //禁止用户直接访问作者页面 add_action( 'template_redirect', 'show_only_author', 0 ); function show_only_author(){ if(is_author(array(1138,1136)) && !is_user_logged_in()){ wp_redirect(home_url()); exit; } } //禁止访客直接访问标签 add_action( 'template_redirect', 'show_only_tag', 0 ); function show_only_tag(){ if(is_tag(array('生肖')) && !is_user_logged_in()){ wp_redirect(home_url()); exit; } } // 人生倒计时 require get_template_directory() . '/inc/countdown-widget.php'; //添加知更鸟m3u8播放器 if ( ! function_exists( 'bedplayer_scripts' ) ) { require get_template_directory() . '/bedplayer/be-dplayer.php'; } // 修复控制台提示$错误 add_action("admin_head", function () { echo "<script> var $ = jQuery; </script>"; // 修复控制台提示$错误 add_action("wp_head", function () { echo "<script> var $ = jQuery; </script>"; /** * 修改表单数据插件名称 * 这种方法适用于使用了本地化翻译功能的插件或主题 * 不只是可以修改后台菜单标题,还可以修改其他使用本地化的字符串 */ add_filter( 'gettext', function( $translated_text, $text, $domain ) { if ( ! is_admin() ) { return $translated_text;//不是后台的话,不做修改。 } switch ( $translated_text ) { case '个人资料' ://要修改的菜单标题名称 $translated_text = __( '资料', 'profile' ); break; case 'ErphpDown' ://还可以修改其他使用本地化的字符串 $translated_text = __( '账户', 'erphp-add-money-online' ); break; } return $translated_text; }, 20, 3 ); //屏蔽恶意关键词搜索 add_action('admin_init', 'ytkah_search_ban_key'); function ytkah_search_ban_key() { add_settings_field('ytkah_search_key', '搜索关键词屏蔽', 'ytkah_search_key_callback_function', 'reading'); register_setting('reading','ytkah_search_key'); } function ytkah_search_key_callback_function() { echo '<textarea name="ytkah_search_key" rows="10" cols="50" id="ytkah_search_key" class="large-text code">' . get_option('ytkah_search_key') . '</textarea>'; } add_action('template_redirect', 'ytkah_search_ban'); function ytkah_search_ban() { if (is_search()) { global $wp_query; $ytkah_search_key = get_option('ytkah_search_key'); if($ytkah_search_key) { $ytkah_search_key = str_replace("\r\n", "|", $ytkah_search_key); $BanKey = explode('|', $ytkah_search_key); $S_Key = $wp_query->query_vars; foreach($BanKey as $Key) { if( stristr($S_Key['s'],$Key) != false ) { wp_die('玩技温馨提示:您搜索的内容不存在'); } } } } } /**百度时间因子**/ // add_action( 'wp_head', 'baidu_search_time_factor' ); // function baidu_search_time_factor() { // if ( is_single() || is_page() ) { // echo '<meta property="Pubdate" content="',get_the_time('Y-m-d\TH:i:s+08:00'),'" />',"\r\n"; // echo '<meta property="Update" content="" content="',get_the_modified_time('Y-m-d\TH:i:s+08:00'),'" />',"\r\n"; // } // }
文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
3.footer文件备份
展开收缩
文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?> </div> <div class="clear"></div> <?php if (zm_get_option('footer_link')) { ?> <?php get_template_part( 'template/footer-links' ); ?> <?php } ?> <?php get_template_part( 'template/footer-widget' ); ?> <footer id="colophon" class="site-footer bgt" role="contentinfo"> <div class="site-info"> <div class="site-copyright"> <?php echo zm_get_option('footer_inf_t'); ?> </div> <div class="add-info"> <?php echo zm_get_option('tongji_f'); ?> 站点已稳定运行:<SPAN id=span_dt_dt style="color: #2F889A;"></SPAN> <SCRIPT language=javascript>function show_date_time(){ window.setTimeout("show_date_time()", 1000); BirthDay=new Date("1/17/2018 00:00:13"); today=new Date(); timeold=(today.getTime()-BirthDay.getTime()); sectimeold=timeold/1000 secondsold=Math.floor(sectimeold); msPerDay=24*60*60*1000 e_daysold=timeold/msPerDay daysold=Math.floor(e_daysold); e_hrsold=(e_daysold-daysold)*24; hrsold=Math.floor(e_hrsold); e_minsold=(e_hrsold-hrsold)*60; minsold=Math.floor((e_hrsold-hrsold)*60); seconds=Math.floor((e_minsold-minsold)*60); span_dt_dt.innerHTML='<font style=color:#C40000>'+daysold+'</font> 天 <font style=color:#C40000>'+hrsold+'</font> 时 <font style=color:#C40000>'+minsold+'</font> 分 <font style=color:#C40000>'+seconds+'</font> 秒'; } show_date_time();</script> <?php printf(' | 耗时 %.3f 秒 | 查询 %d 次 | 内存 %.2f MB',timer_stop( 0, 3 ),get_num_queries(),memory_get_peak_usage() / 1024 / 1024);?> <div class="clear"></div> <?php if ( ! zm_get_option('wb_info') == '' ) { ?> <span class="wb-info"> <a href="<?php echo zm_get_option('wb_url'); ?>" rel="external nofollow" target="_blank"><?php if ( ! zm_get_option('wb_img') == '' ) { ?><img src="<?php echo zm_get_option('wb_img'); ?>"><?php } ?><?php echo zm_get_option('wb_info'); ?></a> </span> <?php } ?> <?php if ( ! zm_get_option('yb_info') == '' ) { ?> <span class="yb-info"> <a href="<?php echo zm_get_option('yb_url'); ?>" rel="external nofollow" target="_blank"><?php if ( ! zm_get_option('yb_img') == '' ) { ?><img src="<?php echo zm_get_option('yb_img'); ?>"><?php } ?><?php echo zm_get_option('yb_info'); ?></a> </span> <?php } ?> </div> <?php if (zm_get_option('web_queries') && current_user_can('manage_options')) { ?><?php if(function_exists('queries')) queries(true) ;?><?php } ?> </div> <?php if (zm_get_option('footer_menu') && wp_is_mobile()) { ?> <div class="footer-clear"></div> <nav class="footer-nav-hold<?php if (zm_get_option('nav_weixin_on')) { ?> footer-nav-weixin<?php } ?><?php if (zm_get_option('footer_menu_no')) { ?> footer-nav<?php } ?>"> <?php if (zm_get_option('nav_weixin_on')) { ?><?php nav_weixin(); ?><?php } ?> <?php wp_nav_menu( array( 'theme_location'=> 'footer', 'menu_class' => 'footer-menu', 'fallback_cb' => 'mobile_menu' ) ); ?> </nav> <?php } ?> </footer> <?php if (zm_get_option('profile') || zm_get_option('menu_login') || zm_get_option('mobile_login')) { ?><?php get_template_part( 'template/login' ); ?><?php } ?> <?php get_template_part( 'template/scroll' ); ?> <?php get_template_part( 'template/placard' ); ?> <?php get_template_part( 'template/the-blank' ); ?> <?php get_template_part( 'template/contact' ); ?> <?php if (zm_get_option('weibo_t')) { ?> <script src="https://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script> <html xmlns:wb="https://open.weibo.com/wb"> <?php } ?> </div> <script type='text/javascript' id='superfish-js-after'>var fallwidth = {fall_width: <?php echo zm_get_option( 'fall_width' ); ?>}</script> <?php wp_footer(); ?> <!--百度站长推送--> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> <!--神马搜索开始--> <script> (function(){ var el = document.createElement("script"); el.src = "https://sf1-scmcdn-tos.pstatp.com/goofy/ttzz/push.js?8567c1afc0aef5cf2cb1092767e3c0a1fdce13a67841ba8e07f2d1eaabe231be4966c2a2573074c15f27b26ad10f4d2350328f98c5f3d19c504bc790b27661eb"; el.id = "ttzz"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(el, s); })(window) </script> <script type="text/javascript" language="javascript"> if(window.console&&window.console.log){ console.log('不好!被你发现了!'); console.log('既然你发现了这个隐藏的秘密,就留个言吧!'); console.log("%c现在求饶还来得及,留言谢罪吧:https://www.playezu.com/dwqa-questions","color:red"); } </script> <!--自动添加微信好友--> <!--<script src="https://libs.baidu.com/jquery/1.9.0/jquery.js"></script> --> <!--<script src="https://cdn.jsdelivr.net/clipboard.js/1.5.12/clipboard.min.js"></script>--> <script src="https://upyun.playezu.com/playezu/clipboard.min.js"></script> <script> $(document).ready(function(){ var clipboard = new Clipboard('#copy_btn'); clipboard.on('success', function(e) { alert("您已成功复制微信号,是否立即跳转到微信搜索该微信号,确认?",1500); window.location.href='weixin://'; e.clearSelection(); console.log(e.clearSelection); </script> <!--国内加速--> <!--<script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.2/js/instantclick-1.2.2.js" type="module"></script>--> <!--<script src="/wp-content/themes/begin/js/instantclick-1.2.2.js" type="module"></script>--> <!-- 小人 --> <!--<script src="https://l2dwidget.js.org/lib/L2Dwidget.min.js"></script>--> <!--<script type="text/javascript">--> <!-- L2Dwidget--> <!-- .on('*', (name) => {--> <!-- console.log('%c EVENT ' + '%c -> ' + name, 'background: #222; color: yellow', 'background: #fff; color: #000')--> <!-- })--> <!-- .init({--> <!-- display: {--> <!--// 居左--> <!-- "position": "right",--> <!--// 宽度--> <!-- "width": 200,--> <!--// 高度--> <!-- "height": 400,--> <!--// 距左右--> <!-- "hOffset": 200,--> <!--// 距下--> <!-- "vOffset": -20--> <!-- },--> <!-- mobile: {--> <!--// 移动端,false为关闭--> <!-- "show": true,--> <!-- "scale": 0.5--> <!-- },--> <!-- dialog: {--> <!--// 开启对话框,false为关闭--> <!-- enable: false,--> <!-- script: {--> <!--// 每空闲 10 秒钟,显示一条一言--> <!-- 'every idle 10s': '$hitokoto$',--> <!--// 当触摸到角色身体--> <!-- 'tap body': '哎呀!专心阅读吧!',--> <!--// 当触摸到角色头部--> <!-- 'tap face': '没事常来玩技博客看看哦!'--> <!-- }--> <!-- }--> <!-- --> <!--</script>--> </body> </html> </body> </html>
文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
4.header文件备份
展开收缩
文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
(1)时间因子备份文件文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
<?php if ( is_single() || is_page() ) { ?> <meta property="pubDate" content="<?php echo get_the_time('Y-m-d\TH:i:s+08:00'); ?>" /> <meta property="upDate" content=<?php echo get_the_modified_time('Y-m-d\TH:i:s+08:00'); ?>" /> <?php } ?>
(2)文章分类为2338的直接百度禁止快照文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
<?php if (in_category('2338')) { ?> <meta name="Baiduspider" content="noarchive"> <?php } ?>
文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
5.inc/comments-template.php添加评论者归属地信息
展开收缩
文章源自玩技e族-https://www.playezu.com/bulletin/20220601/
<span class="flags"> <?php CID_print_comment_flag();// 国家 echo ' '; CID_print_comment_browser();// 浏览器和操作系统 echo convertip(get_comment_author_ip());// 运营商 ?> </span> <span class="comment-meta commentmetadata">
6.新建目录/begin/show-useragent
https://qiniu.playezu.com/%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0/show-useragent.zip
7.erphpdown下载模板位置在/begin/pages
https://qiniu.playezu.com/%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0/erphpdown-user.php
8.js3.6.0
<script src="https://code.jquery.com/jquery-3.6.0.js"></script> <script src="https://code.jquery.com/jquery-migrate-3.4.0.js"></script>
9.新浪微博组件
<iframe width="100%" height="550" class="share_self" frameborder="0" scrolling="no" src="https://widget.weibo.com/weiboshow/index.php?language=&width=0&height=550&fansRow=2&ptype=1&speed=0&skin=1&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=5249814523&verifier=27b5ee52&dpc=1"></iframe>
10.实时访客组件
<script type="text/javascript" src="//rf.revolvermaps.com/0/0/4.js?i=5q28z8fhbdz&m=0&h=160&c=ff0000&r=10" async="async"></script>
11.自定义图床
// 添加图床上传按钮 add_action('media_buttons', 'add_my_media_button'); function add_my_media_button() { $currentUser = wp_get_current_user(); if(!empty($currentUser->roles) && in_array('administrator', $currentUser->roles)){ $DOMAIN="img.playezu.com"; $APIkey="3afc8e9904717d95437af98d1e4a7a01"; // 是管理员 } elseif (!empty($currentUser->roles) && in_array('subscriber', $currentUser->roles)){ $DOMAIN="img.playezu.com"; $APIkey="3afc8e9904717d95437af98d1e4a7a01"; // 是管理员 } else return 0; // 非管理员 echo ' <input id="up_to_chevereto" type="file" accept="image/*" multiple="multiple"/> <label for="up_to_chevereto" id="up_img_label"><i class="fa fa-picture-o" aria-hidden="true"></i> 上传图片</label> '; ?> <style type="text/css"> #up_to_chevereto { display: none; } #up_img_label { color: #2271b1; display: inline-block; text-decoration: none; font-size: 13px; line-height: 2.15384615; min-height: 30px; margin: 0; padding: 0 10px; cursor: pointer; border-width: 1px; border-style: solid; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; box-sizing: border-box; } </style> <script type="text/javascript"> jQuery('#up_to_chevereto').change(function() { window.wpActiveEditor = null; for (var i = 0; i < this.files.length; i++) { var f=this.files[i]; var formData=new FormData(); formData.append('source',f); jQuery.ajax({ async:true, crossDomain:true, url:'https://<?php echo $DOMAIN; ?>/api/1/upload/?key=<?php echo $APIkey; ?>&format=json', type : 'POST', processData : false, contentType : false, data:formData, beforeSend: function (xhr) { jQuery('#up_img_label').html('<i class="fa fa-spinner rotating" aria-hidden="true"></i> Uploading...'); }, success:function(res){ wp.media.editor.insert('<a href="'+res.image.url+'"><img src="'+res.image.url+'" alt="'+res.image.title+'"></img></a>'); jQuery("#up_img_label").html('<i class="fa fa-check" aria-hidden="true"></i> 继续上传'); }, error: function (){ jQuery("#up_img_label").html('<i class="fa fa-times" aria-hidden="true"></i> 上传失败,重新上传'); } } </script> <?php }
玩技站长微信
添加好友自动发送入群邀请
rainbow-shownow
玩技官方公众号
官方微信公众号
PLAYEZU
评论