Tribe__Tickets__Main::supported_version( string $system )
Test whether the current version of PHP or WordPress is supported.
Contents
Parameters
- $system
-
(string) (Required) Which system to test the version of such as 'php' or 'wordpress'.
Return
(boolean) Whether the current version of PHP or WordPress is supported.
Source
File: src/Tribe/Main.php
public function supported_version( $system ) {
if ( $supported = wp_cache_get( $system, 'tribe_version_test' ) ) {
return $supported;
}
switch ( strtolower( $system ) ) {
case 'wordpress' :
$supported = version_compare( get_bloginfo( 'version' ), $this->min_wordpress, '>=' );
break;
case 'php' :
$supported = version_compare( phpversion(), $this->min_php, '>=' );
break;
}
/**
* Filter whether the current version of PHP or WordPress is supported.
*
* @since 4.10
*
* @param boolean $supported Whether the current version of PHP or WordPress is supported.
* @param string $system Which system to test the version of such as 'php' or 'wordpress'.
*/
$supported = apply_filters( 'tribe_tickets_supported_system_version', $supported, $system );
wp_cache_set( $system, $supported, 'tribe_version_test' );
return $supported;
}
Changelog
| Version | Description |
|---|---|
| 4.10 | Introduced. |