Skip to content

Commit

Permalink
The Vlad way constant
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed Dec 10, 2024
1 parent e73502b commit 8761e76
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vip-jetpack/vip-jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,17 @@ function vip_jetpack_is_mobile( $matches, $kind, $return_matched_agent ) {
* @return string[] $plugin_meta Updated plugin's metadata.
*/
function vip_filter_plugin_version_jetpack( $plugin_meta, $plugin_file ) {
if ( defined( 'VIP_JETPACK_SKIP_LOAD' ) && VIP_JETPACK_SKIP_LOAD ) {
if ( defined( 'VIP_JETPACK_SKIP_LOAD' ) && constant( 'VIP_JETPACK_SKIP_LOAD' ) ) {
return $plugin_meta;
}

if ( 'jetpack.php' === $plugin_file ) {
$type = defined( 'WPCOM_VIP_JETPACK_LOCAL' ) && WPCOM_VIP_JETPACK_LOCAL ? 'Local': 'MU-Plugins';
$type = defined( 'WPCOM_VIP_JETPACK_LOCAL' ) && constant( 'WPCOM_VIP_JETPACK_LOCAL' ) ? 'Local' :
'MU-Plugins';
if ( defined( 'VIP_JETPACK_LOADED_VERSION' ) ) {
$version = VIP_JETPACK_LOADED_VERSION;
$version = constant( 'VIP_JETPACK_LOADED_VERSION' );
} else {
$version = JETPACK__VERSION;
$version = constant( 'JETPACK__VERSION' );
}

/* translators: Loaded Jetpack version number */
Expand Down

0 comments on commit 8761e76

Please sign in to comment.