summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-22 14:47:14 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-22 14:47:14 +0000
commit8749a43a5419fd0e55034a23afb3fc63158ccd5f (patch)
tree1e13e3a8b5ec70fb99a29bc6cda5bc304125cf25 /includes
parenta71fd090aeefd818d80c6163c690694ea6259859 (diff)
downloadbrdo-8749a43a5419fd0e55034a23afb3fc63158ccd5f.tar.gz
brdo-8749a43a5419fd0e55034a23afb3fc63158ccd5f.tar.bz2
- Patch #601548 by Damien Tournoud, moshe weitzman: loosen the dependency between t() and the theming layer.
Diffstat (limited to 'includes')
-rw-r--r--includes/bootstrap.inc15
-rw-r--r--includes/common.inc2
-rw-r--r--includes/theme.inc15
3 files changed, 16 insertions, 16 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 2cefd27cd..59bc27e3e 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -2247,3 +2247,18 @@ function drupal_static_reset($name = NULL) {
function drupal_is_cli() {
return (!isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || (is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0)));
}
+
+/**
+ * Formats text for emphasized display in a placeholder inside a sentence.
+ * Used automatically by t().
+ *
+ * @param $variables
+ * An associative array containing:
+ * - text: The text to format (plain-text).
+ *
+ * @return
+ * The formatted text (html).
+ */
+function drupal_placeholder($variables) {
+ return '<em class="placeholder">' . check_plain($variables['text']) . '</em>';
+}
diff --git a/includes/common.inc b/includes/common.inc
index 3fe80c6f8..9c0ec95b9 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1546,7 +1546,7 @@ function t($string, array $args = array(), array $options = array()) {
case '%':
default:
// Escaped and placeholder.
- $args[$key] = theme('placeholder', array('text' => $value));
+ $args[$key] = drupal_placeholder(array('text' => $value));
break;
case '!':
diff --git a/includes/theme.inc b/includes/theme.inc
index 635b2b0bb..a4cb7fef9 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1375,21 +1375,6 @@ function theme_disable($theme_list) {
*/
/**
- * Formats text for emphasized display in a placeholder inside a sentence.
- * Used automatically by t().
- *
- * @param $variables
- * An associative array containing:
- * - text: The text to format (plain-text).
- *
- * @return
- * The formatted text (html).
- */
-function theme_placeholder($variables) {
- return '<em>' . check_plain($variables['text']) . '</em>';
-}
-
-/**
* Return a themed set of status and/or error messages. The messages are grouped
* by type.
*