import_upload_size_limit

Filters the maximum allowed upload size for import files.

Description

apply_filters( 'import_upload_size_limit', (unknown) $wp_max_upload_size ); 

Parameters (1)

0. $wp_max_upload_size (unknown) => wp_max_upload_size()
The wp max upload size.

Usage

To run the hook, copy the example below.
  1. $wp_max_upload_size = apply_filters( 'import_upload_size_limit', $wp_max_upload_size ); 
  2.  
  3. if ( !empty( $wp_max_upload_size ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the import_upload_size_limit callback 
  2. function filter_import_upload_size_limit( $wp_max_upload_size ) { 
  3. // make filter magic happen here... 
  4. return $wp_max_upload_size
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'import_upload_size_limit', 'filter_import_upload_size_limit', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'import_upload_size_limit', 'filter_import_upload_size_limit', 10, 1 ); 

Defined (1)

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

/includes/admin/importers/class-wc-tax-rate-importer.php  
  1. $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );