You appear to be a bot. Output may be restricted
Description
Load a file which could have been relocated from one plugin to another
Usage
oik_require2( $include_file, $to_plugin, $from_plugin );
Parameters
- $include_file
- ( string ) optional default: bobbfunc.inc – file name within the chosen $pluging e.g. admin/oik-header.inc
- $to_plugin
- ( string ) optional default: oik – the first plugin to try – this is the "to" plugin to where the file has been relocated
- $from_plugin
- ( string ) optional default: oik – this is the original plugin, defaulting to "oik" Note: we try to be as efficient as possible loading the "new" file Note: this code does not allow for files to be renamed during relocation This code does REQUIRE the file to exist somewhere!
Returns
voidSource
File name: oik/libs/oik_boot.phpLines:
1 to 8 of 8
function oik_require2( $include_file="bobbfunc.inc", $to_plugin="oik", $from_plugin="oik" ) { $new_path = oik_path( $include_file, $to_plugin ); if ( file_exists( $new_path ) ) { require_once( $new_path ); } else { oik_require( $include_file, $from_plugin ); } }View on GitHub View on Trac