You appear to be a bot. Output may be restricted
Description
Check minimum required version loaded
Usage
OIK_Theme_Update::version_check( $lib, $version );
Parameters
- $lib
- ( mixed ) required –
- $version
- ( mixed ) optional default: * –
Returns
void
Source
File name: oik-libs/libs/class-oik-theme-update.php
Lines:
1 to 20 of 20
function version_check( $lib, $version='*' ) { $constant_name = str_replace( "-", "_", $lib ); $constant_name = strtoupper( $constant_name ); $constant_included = $constant_name . '_INCLUDED'; $constant_loaded = $constant_name . '_LOADED'; if ( defined( $constant_included ) ) { $current_version = constant( $constant_included ); $acceptable = $this->compatible_version( $current_version, $version ); } elseif ( defined( $constant_loaded ) ) { $current_version = constant( $constant_loaded ); $acceptable = $this->compatible_version( $current_version, $version ); } else { $current_version = "unknown"; $acceptable = false; } if ( !$acceptable ) { $this->report_error( "Incompatible version already loaded. Library: $lib. Current version: $current_version. Required version: $version" ); } return( $acceptable ); }