gmb_find_view

Find view file.

Description

(string) gmb_find_view( (string) $file, (bool) $full = false ); 

NOTE: First this attempts to load from GMB_PLUGIN_PATH . /includes/ then it trys GMP_CORE_PATH .'/includes', unless $full

Returns (string)

Parameters (2)

0. $file (string)
File path relative to either core includes path or plugin includes path. Use full absolute path if $full param is true
1. $full — Optional. (bool) => false
If true, $file param should be a full absolute path. Default is false.

Usage

  1. if ( !function_exists( 'gmb_find_view' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'maps-builder/vendor/wordimpress/maps-builder-core/includes/misc-functions.php'; 
  3.  
  4. // File path relative to either core includes path or plugin includes path. Use full absolute path if $full param is true 
  5. $file = ''; 
  6.  
  7. // Optional. If true, $file param should be a full absolute path. Default is false. 
  8. $full = false; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = gmb_find_view($file, $full); 
  12.  

Defined (1)

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

/vendor/wordimpress/maps-builder-core/includes/misc-functions.php  
  1. function gmb_find_view( $file, $full = false ) { 
  2. if ( ! $full ) { 
  3. $_file = GMB_PLUGIN_PATH . 'includes/' . $file; 
  4. if ( ! file_exists( $_file ) ) { 
  5. $_file = GMB_CORE_PATH . 'includes/' . $file; 
  6.  
  7. $file = $_file; 
  8.  
  9. return $file;