jetpack_require_lib_dir

Returns the location of Jetpack's lib directory.

Description

apply_filters( 'jetpack_require_lib_dir', (str) $lib_dir ); 

Parameters (1)

0. $lib_dir (str)
Path to the library directory.

Usage

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

Defined (1)

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

/require-lib.php  
  1. $lib_dir = apply_filters( 'jetpack_require_lib_dir', $lib_dir );