cmb2_dir

Helper function to provide directory path to CMB2.

Description

(string) cmb2_dir( (string) $path = '' ); 

Returns (string)

Directory with optional path appended

Parameters (1)

0. $path — Optional. (string) => ''
Path to append

Usage

  1. if ( !function_exists( 'cmb2_dir' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'cmb2/includes/helper-functions.php'; 
  3.  
  4. // Path to append 
  5. $path = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cmb2_dir($path); 
  9.  

Defined (1)

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

/includes/helper-functions.php  
  1. function cmb2_dir( $path = '' ) { 
  2. return CMB2_DIR . $path;