WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/convert smilies

Description

Convert text equivalent of smilies to images.

Will only convert smilies if the option 'use_smilies' is true and the globals used in the function aren't empty.

Usage

<?php convert_smilies$text ?>

Parameters

$text
(string) (required) Content to convert smilies from text.
Default: None

Return Values

(string) 
Converted content with text smilies replaced with images.

Examples

echo convert_smilies("This smiley is going to show as an image... :) ");

Notes

  • Uses: $wp_smiliessearch, $wp_smiliesreplace Smiley replacement arrays.
  • Uses global: (array) $wp_smiliessearch
  • Uses global: (array) $wp_smiliesreplace

Change Log

Since: 0.71

Source File

convert_smilies() is located in wp-includes/formatting.php.

Related

See also index of Function Reference and index of Template Tags.