cmb2_meta_box_url

Filter the CMB location url.

Description

apply_filters( 'cmb2_meta_box_url', (unknown) $cmb2_url, (unknown) $cmb2_version ); 

Parameters (2)

0. $cmb2_url (unknown)
The cmb2 url.
1. $cmb2_version (unknown) => CMB2_VERSION
The cmb2 version.

Usage

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

Defined (1)

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

/includes/CMB2_Utils.php  
  1. self::$url = trailingslashit( apply_filters( 'cmb2_meta_box_url', $cmb2_url, CMB2_VERSION ) );