后端开发|php教程
WordPress,提示框,后台
后端开发-php教程
WordPress 3.5 新添加了一个提示框功能,可以创建一个提示框,然后指向任何元素,比如下边的例子:
整站源码 帝国内核,vscode与jquery,ubuntu沙箱,tomcat分析源码,易语言如何创建sqlite,wordpress 分享微信 插件,支持多列排序的前端框架,爬虫爬取淘宝的数据,php 不能运行,清徐seo优化收费,统计获取网站访客,反网页限制工具 v1.0,ecshop修改模板好烦lzw
本文就来教你怎么创建一个这样的提示框。
小程序源码采集,如何让ubuntu联网,爬虫如何下载年报,php pdf源码,网页seo标题lzw
首先需要添加提示框的脚本,这样才能使用提示框的 JS 方法。
短信会员管理源码,ubuntu的gpg使用,tomcat启动程序闪退,爬虫科普基地,php循环遍历,巴音郭楞seo网络营销策略lzw
//挂载提示框脚本function Bing_admin_pointer_enqueue_scripts(){ wp_enqueue_style( wp-pointer ); wp_enqueue_script( wp-pointer );}add_action( admin_enqueue_scripts, Bing_admin_pointer_enqueue_scripts );
然后使用 pointer() 方法创建一个简单的提示框:
/** *WordPress 后台添加提示框 */admin-help-box/*/function Bing_add_pointer_scripts(){ $content =
请设置主题
; $content .=请为新主题进行简单的配置!;?>//<![CDATA[ jQuery(document).ready(function($){ $(#menu-appearance).pointer({//可以指向任何元素content: \,position: { edge: left, align: center},close: function(){ //提示框打开之后做的事情} }).pointer(open); }); //]]> <?php}add_action( admin_print_footer_scripts, Bing_add_pointer_scripts );
综合代码:
/** *WordPress 后台添加提示框 */admin-help-box/*/function Bing_add_pointer_scripts(){ $content =
请设置主题
; $content .=请为新主题进行简单的配置!;?>//<![CDATA[ jQuery(document).ready(function($){ $(#menu-appearance).pointer({//可以指向任何元素content: \,position: { edge: left, align: center},close: function(){ //提示框打开之后做的事情} }).pointer(open); }); //]]> <?php}add_action( admin_print_footer_scripts, Bing_add_pointer_scripts ); //挂载提示框脚本function Bing_admin_pointer_enqueue_scripts(){ wp_enqueue_style( wp-pointer ); wp_enqueue_script( wp-pointer );}add_action( admin_enqueue_scripts, Bing_admin_pointer_enqueue_scripts );