Changeset 766815
- Timestamp:
- 09/04/2013 10:13:24 AM (13 years ago)
- Location:
- deutschdate/trunk
- Files:
-
- 2 edited
-
mp_deutschdate.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
deutschdate/trunk/mp_deutschdate.php
r752280 r766815 2 2 /* 3 3 Plugin Name: DeutschDate 4 Plugin URI: http:// multipop.org/deutschdate4 Plugin URI: http://wordpress.org/plugins/deutschdate/ 5 5 Description: Automagically converts english months and days (except for the initials) to their German equivalent. 6 Version: 1.1 6 Version: 1.2 7 Tested up to: 3.6 7 8 Author: Barry Ceelen 8 9 Author URI: http://multipop.org … … 25 26 */ 26 27 27 function multipop_de_date_replace($text) { 28 $days_english = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ,'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Mar', 'May', 'Oct', 'January', 'February', 'March', 'May', 'June', 'July', 'August', 'October', '1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '0th'); 29 $days_dutch = array('Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So', 'Mrz', 'Mai', 'Okt', 'Januar', 'Februar', 'März', 'Mai', 'Juni', 'Juli', 'August', 'Oktober', '1.', '2.', '3.', '4.', '5.', '6.', '7.', '8.', '9.', '0.'); 30 $text = str_replace($days_english, $days_dutch, $text); 28 function deutschdate_str_replace( $text ) { 29 $days_english = array( 30 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 31 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 32 'Mar', 'May', 'Oct', 'Dec', 33 'January', 'February', 'March', 'May', 'June', 'July', 'August', 'October', 'December', 34 '1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '0th' 35 ); 36 $days_german = array( 37 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag', 38 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So', 39 'Mrz', 'Mai', 'Okt', 'Dez', 40 'Januar', 'Februar', 'März', 'Mai', 'Juni', 'Juli', 'August', 'Oktober', 'Dezember', 41 '1.', '2.', '3.', '4.', '5.', '6.', '7.', '8.', '9.', '0.' 42 ); 43 $text = str_replace( $days_english, $days_german, $text ); 31 44 return $text; 32 45 } 33 46 34 add_filter( 'the_time', 'multipop_de_date_replace');35 add_filter( 'the_date', 'multipop_de_date_replace');36 add_filter( 'get_the_time', 'multipop_de_date_replace');37 add_filter( 'get_the_date', 'multipop_de_date_replace');38 add_filter( 'the_modified_time', 'multipop_de_date_replace');39 add_filter( 'the_modified_date', 'multipop_de_date_replace');40 add_filter( 'get_the_modified_time', 'multipop_de_date_replace');41 add_filter( 'get_the_modified_date', 'multipop_de_date_replace');47 add_filter( 'the_time', 'deutschdate_str_replace' ); 48 add_filter( 'the_date', 'deutschdate_str_replace' ); 49 add_filter( 'get_the_time', 'deutschdate_str_replace' ); 50 add_filter( 'get_the_date', 'deutschdate_str_replace' ); 51 add_filter( 'the_modified_time', 'deutschdate_str_replace' ); 52 add_filter( 'the_modified_date', 'deutschdate_str_replace' ); 53 add_filter( 'get_the_modified_time', 'deutschdate_str_replace' ); 54 add_filter( 'get_the_modified_date', 'deutschdate_str_replace' ); -
deutschdate/trunk/readme.txt
r752292 r766815 3 3 Tags: german, deutsch, english, date, translate 4 4 Requires at least: 1.5 5 Tested up to: 2.55 Tested up to: 3.6 6 6 Stable tag: trunk 7 7 … … 37 37 == Changelog == 38 38 39 * 1.2 Added missing translation for december, thanks [netigate](http://wordpress.org/support/topic/december-missing-translation) 39 40 * 1.1 Added more filters as [suggested](http://wordpress.org/support/topic/plugin-broken-due-to-non-use-of-relevant-filters) by [Marco Steinbrecher](http://wordpress.org/support/profile/macsteini)
Note: See TracChangeset
for help on using the changeset viewer.