filesystem_method_file

Filters the path for a specific filesystem method class file.

Description

apply_filters( 'filesystem_method_file', $abspath_wp_admin_includes_class_wp_filesystem_method_php, (unknown) $method ); 

Parameters (2)

0. $abspath_wp_admin_includes_class_wp_filesystem_method_php
The abspath wp admin includes class wp filesystem method php.
1. $method (unknown)
The method.

Usage

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

Defined (1)

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

/functions.php  
  1. $abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method);