wireIconMarkupFile() function

Get the markup or class name for an icon that can represent the given filename

Example

// Outputs: "<i class='fa fa-pdf-o'></i>"
echo wireIconMarkupFile('file.pdf'); 

Usage

// basic usage
$string = wireIconMarkupFile(string $filename);

// usage with all arguments
$string = wireIconMarkupFile(string $filename, $class = '');

Arguments

NameType(s)Description
filenamestring

Can be any type of filename (with or without path).

class (optional)string, bool

Additional class attributes, i.e. "fw" for fixed-width (optional). Or specify boolean TRUE to get just the icon class name (no markup).

Return value

string


Functions methods and properties

API reference based on ProcessWire core version 3.0.130

Twitter updates

  • New post: With ProcessWire 3.0.130, this week we’ll take a detailed look at a few useful new API additions made in the last few weeks, along with examples of each—More
    12 April 2019
  • New post: This week ProcessWire ProMailer has been released, plus we’ve got a nice upgrade in our community support forum, and more— More
    15 March 2019
  • New post: This week we look at the latest version of ProcessWire, 3.0.127 with nearly 30 new commits resolving dozens of older issue reports and a couple useful new features— More
    1 March 2019

Latest news

  • ProcessWire Weekly #257
    In the 257th issue of ProcessWire Weekly we'll walk you through the new features in ProcessWire 3.0.130, introduce two new third party modules, and showcase the elegant new website of the QFMA. Read on!
    Weekly.pw / 13 April 2019
  • ProcessWire 3.0.130 core updates
    This week we’ll take a detailed look at a few useful new API additions made in the last few weeks, along with examples of each.
    Blog / 12 April 2019
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.