⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hello.php

📁 在综合英文版XOOPS 2.09, 2.091, 2.092 的基础上正式发布XOOPS 2.09中文版 XOOPS 2.09x 版主要是PHP5升级、bug修正和安全补正: 1 全面兼容PHP 5.
💻 PHP
字号:
<?php/*Plugin Name: Hello DollyPlugin URI: http://wordpress.org/#Description:_LANG_PG_HELLO_DOLLYAuthor: Matt MullenwegAuthor URI: http://photomatt.net/*/// These are the lyrics to Hello Dolly$lyrics = "Hello, DollyWell, hello, DollyIt's so nice to have you back where you belongYou're lookin' swell, DollyI can tell, DollyYou're still glowin', you're still crowin'You're still goin' strongWe feel the room swayin'While the band's playin'One of your old favourite songs from way back whenSo, take her wrap, fellasFind her an empty lap, fellasDolly'll never go away againHello, DollyWell, hello, DollyIt's so nice to have you back where you belongYou're lookin' swell, DollyI can tell, DollyYou're still glowin', you're still crowin'You're still goin' strongWe feel the room swayin'While the band's playin'One of your old favourite songs from way back whenGolly, gee, fellasFind her a vacant knee, fellasDolly'll never go awayDolly'll never go awayDolly'll never go away again";// Here we split it into lines$lyrics = explode("\n", $lyrics);// And then randomly choose a lineglobal $chosen;$chosen = wptexturize( $lyrics[ mt_rand(0, count($lyrics) ) ] );// Now we set that function up to execute when the admin_footer action is calledadd_action('admin_footer', 'hello_dolly');if (!defined('WP_PLUGIN_HELLO')) {define('WP_PLUGIN_HELLO',1);// This just echoes the chosen line, we'll position it laterfunction hello_dolly() {	global $chosen;	echo "<p id='dolly'>$chosen</p>";}// We need some CSS to position the paragraphfunction dolly_css() {	echo "	<style type='text/css'>	#dolly {		position: absolute;		top: 5px;margin: 0; padding: 0;		right: 3em;		font-size: 20px;		color: #666;	}	</style>	";}}add_action('admin_head', 'dolly_css');?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -