file_extension

The WooCommerce PDF & Print file extension function.

Description

file_extension( (string) $filename ); 

Parameters (1)

0. $filename (string)
The filename.

Usage

  1. if ( !function_exists( 'file_extension' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-pdf-print/functions.php'; 
  3.  
  4. // The filename. 
  5. $filename = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = file_extension($filename); 
  9.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function file_extension($filename) 
  2. return substr(strrchr($filename, '.'), 1);