parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
return;
}
if ( hu_rec_notice_is_dismissed( REC_NOTICE_ID ) )
return;
$plugin = 'nimble-builder/nimble-builder.php';
$installed_plugins = get_plugins();
$is_nimble_installed = isset( $installed_plugins[ $plugin ] );
if ( $is_nimble_installed ) {
if ( !current_user_can( 'activate_plugins' ) ) {
return;
}
$button_text = __( 'Activate Nimble Builder Now', 'hueman' );
$button_link = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
} else {
if ( !current_user_can( 'install_plugins' ) ) {
return;
}
$button_text = __( 'Install Nimble Builder Now', 'hueman' );
$button_link = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=nimble-builder' ), 'install-plugin_nimble-builder' );
}
if ( hu_rec_notice_is_dismissed( PREV_REC_NOTICE_ID ) ) {
hu_print_s_rec_notice( $button_text, $button_link );
} else {
hu_print_l_rec_notice( $button_text, $button_link );
}
}
function hu_print_l_rec_notice( $button_text, $button_link ) {
$heading = sprintf( __('Hueman theme recommends %1$s.', 'hueman' ),
sprintf('%2$s',
wp_nonce_url( 'plugin-install.php?tab=plugin-information&plugin=nimble-builder&TB_iframe=true&width=640&height=500'),
__('Nimble Page Builder', 'hueman')
)
);
$message = sprintf( '%1$s
%2$s
%3$s
%4$s',
__( 'Developers of the Hueman theme have created Nimble Builder, a free, powerful yet easy-to-use page builder already active on 50K+ WordPress websites.', 'hueman'),
__( 'It allows you to drag and drop mobile-ready sections on really any page of your site, including home, posts, pages, products, archives, 404, search pages, ...', 'hueman' ),
sprintf(
__( 'You can insert simple text zones, but also create %1$s, insert post grids, column structures, buttons, widget zones, maps, icons, and much more, or use pre-designed sections with professional %2$s.', 'hueman'),
sprintf('%2$s', esc_url('nimblebuilder.com/mp4-video-background-with-delay/'), __('video backgrounds', 'hueman') ),
sprintf('%2$s', esc_url('demo.presscustomizr.com/nimble-builder/'), __('parallax effect', 'hueman') )
),
__( "The plugin is lightweight and has been designed to integrate seamlessly with Hueman and any WordPress theme.", 'hueman')
);
$notice_id = REC_NOTICE_ID;
?>
