From 0e35d4d818c986f5933a8feccdc96246a88c5758 Mon Sep 17 00:00:00 2001
From: Angie Byron <webchick@24967.no-reply.drupal.org>
Date: Mon, 22 Nov 2010 04:33:02 +0000
Subject: [PATCH] #601548 follow-up by David_Rothstein: Remaining clean-ups
 from drupal_placeholder() patch.

---
 includes/bootstrap.inc | 4 ++--
 includes/common.inc    | 5 +----
 misc/drupal.js         | 7 ++++---
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 61f473a43c9b..3c550b759d9d 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1254,7 +1254,7 @@ function drupal_unpack($obj, $field = 'data') {
  *     drupal_set_title($title = t("@name's blog", array('@name' => format_username($account))), PASS_THROUGH);
  *   @endcode
  * - %variable: Indicates that the string should be HTML-escaped and highlighted
- *   with theme_placeholder(), which shows up by default as <em>emphasized</em>.
+ *   with drupal_placeholder(), which shows up as <em>emphasized</em>.
  *   @code
  *     $message = t('%name-from sent %name-to an e-mail.', array('%name-from' => format_username($user), '%name-to' => format_username($account)));
  *   @endcode
@@ -1390,7 +1390,7 @@ function drupal_unpack($obj, $field = 'data') {
  *    - !variable: inserted as is
  *    - @variable: escape plain text to HTML (using check_plain())
  *    - %variable: escape text and theme as a placeholder for user-submitted
- *      content (using check_plain() + theme_placeholder())
+ *      content (using check_plain() + drupal_placeholder())
  * @param $options
  *   An associative array of additional options, with the following keys:
  *     - 'langcode' (defaults to the current language) The language code to
diff --git a/includes/common.inc b/includes/common.inc
index f7a6ce3a4199..acc65af5f163 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1677,7 +1677,7 @@ function format_xml_elements($array) {
  *    - !variable: inserted as is
  *    - @variable: escape plain text to HTML (check_plain)
  *    - %variable: escape text and theme as a placeholder for user-submitted
- *      content (check_plain + theme_placeholder)
+ *      content (check_plain + drupal_placeholder)
  *   Note that you do not need to include @count in this array.
  *   This replacement is done automatically for the plural case.
  * @param $options
@@ -6247,9 +6247,6 @@ function drupal_array_nested_key_exists(array $array, array $parents) {
 function drupal_common_theme() {
   return array(
     // theme.inc
-    'placeholder' => array(
-      'variables' => array('text' => NULL)
-    ),
     'html' => array(
       'render element' => 'page',
       'template' => 'html',
diff --git a/misc/drupal.js b/misc/drupal.js
index 279e6ec5ac1e..98b5a541890f 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -231,8 +231,9 @@ Drupal.formatPlural = function (count, singular, plural, args) {
  * theme does not provide an override function, the generic theme function is
  * called.
  *
- * For example, to retrieve the HTML that is output by theme_placeholder(text),
- * call Drupal.theme('placeholder', text).
+ * For example, to retrieve the HTML for text that should be emphasized and
+ * displayed as a placeholder inside a sentence, call
+ * Drupal.theme('placeholder', text).
  *
  * @param func
  *   The name of the theme function to call.
@@ -365,7 +366,7 @@ Drupal.theme.prototype = {
    *   The formatted text (html).
    */
   placeholder: function (str) {
-    return '<em>' + Drupal.checkPlain(str) + '</em>';
+    return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>';
   }
 };
 
-- 
GitLab