wpdatatables_filter_simplexml

Contents

Description

This filter is applied to the parsed XML (SimpleXML library is used for parsing the XML files), a SimpleXML object, before creating a table based on it.

Usage

add_filter( 'wpdatatables_filter_simplexml', 'filter_simplexml', 10, 2 );

Parameters

  • $simpleXmlObject object
    SimpleXML object.
  • $tableId integer
    ID of table from database.

Examples

// Callback function for the wpdatatables_filter_simplexml filter hook
function filter_simplexml( $simpleXmlObject, $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   } 
}

add_action( 'wpdatatables_filter_simplexml', 'filter_simplexml', 10, 2);