diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-03-22 13:20:00 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-03-22 13:20:00 +0000 |
commit | b48e6bc8762854b59515c18a3358700d2d07c2b1 (patch) | |
tree | 5a7c36900961c7fe5a6a80344d79041df5936e6b /wp-includes | |
parent | 87ac457a9eb1e74bd7d45852e719e83b1b76cebc (diff) | |
download | wordpress-mu-b48e6bc8762854b59515c18a3358700d2d07c2b1.tar.gz wordpress-mu-b48e6bc8762854b59515c18a3358700d2d07c2b1.tar.xz wordpress-mu-b48e6bc8762854b59515c18a3358700d2d07c2b1.zip |
WP Merge to rev 5081
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@931 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes')
-rw-r--r-- | wp-includes/l10n.php | 15 | ||||
-rw-r--r-- | wp-includes/link-template.php | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 4a0a640..0847ea3 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -37,6 +37,21 @@ function _e($text, $domain = 'default') { echo $text; } +function _c($text, $domain = 'default') { + global $l10n; + + if ( isset($l10n[$domain]) ) + $whole = apply_filters('gettext', $l10n[$domain]->translate($text), $text); + else + $whole = $text; + + $trans = explode('|', $whole, 2); + if ( isset( $trans[1] ) ) + return $trans[1]; + else + return $trans[0]; +} + // Return the plural form. function __ngettext($single, $plural, $number, $domain = 'default') { global $l10n; diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 7905311..873bca5 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -117,6 +117,7 @@ function post_permalink($post_id = 0, $mode = '') { // $mode legacy function get_page_link($id = false) { global $post; + $id = (int) $id; if ( !$id ) $id = $post->ID; |