if ( ! $is_um_active ) {
//UM is not active
function um_mycred_dependencies() {
echo '<div class="error"><p>' . sprintf( __( 'The <strong>%s</strong> extension requires the Ultimate Member plugin to be activated to work properly. You can download it <a href="https://wordpress.org/plugins/ultimate-member">here</a>', 'um-mycred' ), um_mycred_extension ) . '</p></div>';
}
add_action( 'admin_notices', 'um_mycred_dependencies' );
} elseif ( ! UM()->dependencies()->mycred_active_check() ) {
//UM old version is active
function um_mycred_dependencies() {
echo '<div class="error"><p>' . sprintf(__('Sorry. You must activate the <strong>myCRED</strong> plugin to use the %s.','um-mycred'), um_mycred_extension ) . '</p></div>';
}
add_action( 'admin_notices', 'um_mycred_dependencies' );
} elseif ( true !== UM()->dependencies()->compare_versions( um_mycred_requires, um_mycred_version, 'mycred', um_mycred_extension ) ) {
//UM old version is active
function um_mycred_dependencies() {
echo '<div class="error"><p>' . UM()->dependencies()->compare_versions( um_mycred_requires, um_mycred_version, 'mycred', um_mycred_extension ) . '</p></div>';
}
add_action( 'admin_notices', 'um_mycred_dependencies' );
} else {
require_once um_mycred_path . 'includes/core/um-mycred-init.php';
}