Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @package Hello_Zemin
- * @version 1.0
- */
- /*
- Plugin Name: Hello Zemin
- Plugin URI: http://wordpress.org/plugins/hello-zemin/
- Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two poems sung most famously by Zexu Lin: 苟利国家生死以,岂因祸福避趋之. When activated you will randomly see a quote from <cite>Zemin</cite> in the upper right of your admin screen on every page.
- Author: Ciel
- Version: 1.0
- */
- function hello_zemin_get_quote() {
- /** These are the quotes of Zemin */
- $quotes = "吼呀!
- 不要「见着风,是得雨」。
- 你等于...你也有责任吧?
- 我可以回答你说「无可奉告」!
- 我是滋磁的!
- 我感觉你们新闻界还要学习一个。
- 你们非常熟悉西方的这一套理论。
- 你们毕竟还图样。
- 我是身经百战了,见得多了。
- 西方的哪一个国家我没去过?
- 那比你们不知道高到哪里去了!
- 我跟他谈笑风生!
- 还是要提高自己的知识水平!
- 识得唔识得噶?
- 图样图森破,上台拿衣服!
- 我今天是作为一个长者给你们讲的。
- 告诉你们一点,人生的经验。
- 中国有一句话叫「闷声发大财」
- 我就什么话也不说,这是坠吼的!
- 如果你们报道上有偏差,你们要负责!
- 没有任何这个意思!
- 连任也要按照香港的法律啊!
- 当然我们的决定权也是很重要的。
- 到那个时候我们会表态的!
- 你们啊,不要想喜欢弄个大新闻。
- 说现在已经钦定了,把我批判一番。
- 你们啊,拿衣服!
- I'm angry! 你们这样子是不行的!
- 我今天算是得罪了你们一下!
- 人呐就不知道,自己就不可以预料。
- 一个人的命运啊,当然要靠自我奋斗,但是也要考虑到历史的行程。
- 我说另请高明吧。我实在我也不是谦虚。
- 我一个上海市委书记怎么到北京来了呢?
- 「苟利国家生死以,岂因祸福避趋之?」
- 就是军队一律不得经商!
- 很惭愧,就做了一点微小的工作。
- 你们给我搞的这本东西啊,Excited!";
- // Here we split it into lines
- $quotes = explode( "\n", $quotes );
- // And then randomly choose a line
- return wptexturize( $quotes[ mt_rand( 0, count( $quotes ) - 1 ) ] );
- }
- // This just echoes the chosen line, we'll position it later
- function hello_zemin() {
- $chosen = hello_zemin_get_quote();
- echo "<p id='zemin'>$chosen</p>";
- }
- // We need some CSS to position the paragraph
- function zemin_css() {
- // This makes sure that the positioning is also good for right-to-left languages
- $x = is_rtl() ? 'left' : 'right';
- echo "
- <style type='text/css'>
- #zemin {
- float: $x;
- padding-$x: 15px;
- padding-top: 5px;
- margin: 0;
- font-size: 11px;
- }
- </style>
- ";
- }
- // Now we set that function up to execute when the admin_notices action is called
- //if(current_user_can('true_fans')===true)
- //{
- // require_once( 'pluggable.php' );
- add_action( 'admin_notices', 'hello_zemin' );
- add_action( 'admin_head', 'zemin_css' );
- //}
- ?>
Add Comment
Please, Sign In to add comment