wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
is_wp_version_compatible › WordPress Function
Da5.2.0
Deprecaton/a
› is_wp_version_compatible ( $required )
Parametri: |
|
Ritorna: |
|
Definito a: |
|
Codex: |
Checks compatibility with the current WordPress version.
Funzioni correlate: is_php_version_compatible, wp_version_check, wp_revisions_enabled, wp_post_revision_title, wp_get_translation_updates
Sorgenti
function is_wp_version_compatible( $required ) { global $wp_version; // Strip off any -alpha, -RC, -beta, -src suffixes. list( $version ) = explode( '-', $wp_version ); if ( is_string( $required ) ) { $trimmed = trim( $required ); if ( substr_count( $trimmed, '.' ) > 1 && str_ends_with( $trimmed, '.0' ) ) { $required = substr( $trimmed, 0, -2 ); } } return empty( $required ) || version_compare( $version, $required, '>=' ); }