wireIconMarkup() function

Render markup for a system icon

It is NOT necessary to specify an icon prefix like “fa-” with the icon name.

Example

// Outputs: "<i class='fa fa-home'></i>"
echo wireIconMarkup('home'); 

Usage

// basic usage
$string = wireIconMarkup(string $icon);

// usage with all arguments
$string = wireIconMarkup(string $icon, string $class = '');

Arguments

NameType(s)Description
iconstring

Icon name (currently a font-awesome icon name, but support for more in future)

class (optional)string

Additional attributes for class (example: "fw" for fixed width)

Return value

string


Functions methods and properties

API reference based on ProcessWire core version 3.0.133

Twitter updates

  • ProcessWire 3.0.133 adds a useful new Page::meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type— More
    14 June 2019
  • New post: This week we’ll take a look at 3 different WEBP image strategies that you can use in ProcessWire 3.0.132+. Then we’ll dive into a major update for the Google Client API module, and finish up by outlining some useful new updates in FormBuilder— More
    31 May 2019
  • New post: This week we've added WEBP support in ProcessWire thanks to a GitHub pull request from Horst Nogajski. This enables you to have highly optimized image output in PW and I think you’ll really like the difference it makes— More
    24 May 2019

Latest news

  • ProcessWire Weekly #266
    In the 266th issue of ProcessWire Weekly we're going to take a closer look at ProcessWire 3.0.133 (dev), introduce a third party module called Repeater Images, and highlight a recently released site belonging to the Australian Antarctic Division. Read on!
    Weekly.pw / 15 June 2019
  • ProcessWire 3.0.133 core updates
    ProcessWire 3.0.133 adds a useful new $page->meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type. Read on for all the details, examples and screenshots.
    Blog / 14 June 2019
  • Subscribe to weekly ProcessWire news

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer