1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Time Translation Test Case |
---|
4 | Plugin URI: http://mattifesto.com/ |
---|
5 | Description: Test case for mysql2date time translation bug in WordPress 2.9.1 |
---|
6 | Author: Matt Calkins - Mattifesto Design |
---|
7 | Version: 1.0.0 |
---|
8 | Author URI: http://mattifesto.com/ |
---|
9 | */ |
---|
10 | |
---|
11 | add_filter('the_content', 'TimeTranslationTestCase::FilterTheContent'); |
---|
12 | |
---|
13 | class TimeTranslationTestCase |
---|
14 | { |
---|
15 | public static function FilterTheContent($theContent) |
---|
16 | { |
---|
17 | $gmtMysqlString = current_time('mysql', 1); |
---|
18 | |
---|
19 | $output = '<p>Current MySQL GMT date/time: ' . $gmtMysqlString . '</p>' |
---|
20 | . '<p>mysql2date translate=false: ' . mysql2date('H:i:s', $gmtMysqlString, false) . '</p>' |
---|
21 | . '<p>mysql2date translate=true: ' . mysql2date('H:i:s', $gmtMysqlString, true) . '</p>'; |
---|
22 | |
---|
23 | return $output . $theContent; |
---|
24 | } |
---|
25 | } |
---|
26 | |
---|
27 | ?> |
---|