1: <?php
2: /**
3: * WxRobot Admin
4: *
5: * WP微信机器人后台菜单 - 扩展功能
6: *
7: * @author midoks
8: * @category Admin
9: * @package WxRobot/Admin
10: * @since 5.3.0
11: */
12:
13: if ( ! defined( 'ABSPATH' ) ) {
14: exit;
15: }
16:
17: /**
18: * 消息提示
19: *
20: * @param string $msg 消息内容
21: * @param string $type 消息类型,默认更新
22: * @return void
23: */
24: function wx_notice_msg($msg, $type='updated'){
25: if(!empty($msg)){
26: ?><div class="<?php echo($type);?>"><p><?php echo($msg); ?></p></div><?php
27: }
28: }
29:
30: /**
31: * 日志测试
32: *
33: * @param string $text 日志内容
34: * @return bool
35: */
36: function wx_admin_log($text = 'test'){
37: $file = WEIXIN_ROBOT.'log-'.date('Y-m-d').'.log';
38: return file_put_contents($file, $text);
39: }
40: ?>
41: