of_sanitize_upload
The SKT Corp of sanitize upload hook.
Description
Parameters (1)
- 0. $input_image (unknown)
- The input image.
Usage
- To run the hook, copy the example below.
- $input_image = apply_filters( 'of_sanitize_upload', $input_image );
- if ( !empty( $input_image ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the of_sanitize_upload callback
- function filter_of_sanitize_upload( $input_image ) {
- // make filter magic happen here...
- return $input_image;
- };
- // add the filter
- add_filter( 'of_sanitize_upload', 'filter_of_sanitize_upload', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'of_sanitize_upload', 'filter_of_sanitize_upload', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /inc/includes/class-options-sanitize.php
- $output['image'] = apply_filters( 'of_sanitize_upload', $input['image'] );