yit_maybe_plugin_fw_loader

YITH WooCommerce Ajax Navigation.

Description

yit_maybe_plugin_fw_loader( $plugin_path ); 

Parameters (1)

0. $plugin_path
The plugin path.

Usage

  1. if ( !function_exists( 'yit_maybe_plugin_fw_loader' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yith-woocommerce-wishlist/plugin-fw/init.php'; 
  3.  
  4. // The plugin path. 
  5. $plugin_path = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = yit_maybe_plugin_fw_loader($plugin_path); 
  9.  

Defined (1)

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

/plugin-fw/init.php  
  1. function yit_maybe_plugin_fw_loader ( $plugin_path ) { 
  2. global $plugin_fw_data; 
  3.  
  4. $default_headers = array ( 
  5. 'Name' => 'Framework Name',  
  6. 'Version' => 'Version',  
  7. 'Author' => 'Author',  
  8. 'TextDomain' => 'Text Domain',  
  9. 'DomainPath' => 'Domain Path',  
  10. ); 
  11.  
  12. $framework_data = get_file_data ( trailingslashit ( $plugin_path ) . 'plugin-fw/init.php', $default_headers ); 
  13. $plugin_fw_main_file = trailingslashit ( $plugin_path ) . 'plugin-fw/yit-plugin.php'; 
  14.  
  15. if ( ! empty( $plugin_fw_data ) ) { 
  16. foreach ( $plugin_fw_data as $version => $path ) { 
  17. if ( version_compare ( $version, $framework_data[ 'Version' ], '<' ) ) { 
  18. $plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file ); 
  19. } else { 
  20. $plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );