pmpro_getfile_before_readfile

The Paid Memberships Pro pmpro getfile before readfile hook.

Description

do_action( 'pmpro_getfile_before_readfile', (string) $filename, (unknown) $file_mimetype ); 

Parameters (2)

0. $filename (string)
The filename.
1. $file_mimetype (unknown)
The file mimetype.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'pmpro_getfile_before_readfile', $filename, $file_mimetype ); 
The following example is for adding a hook callback.
  1. // define the pmpro_getfile_before_readfile callback 
  2. function action_pmpro_getfile_before_readfile( $filename, $file_mimetype ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'pmpro_getfile_before_readfile', 'action_pmpro_getfile_before_readfile', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'pmpro_getfile_before_readfile', 'action_pmpro_getfile_before_readfile', 10, 2 ); 

Defined (1)

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

/services/getfile.php  
  1. do_action("pmpro_getfile_before_readfile", $filename, $file_mimetype);