[ 'href' => [], 'title' => [], 'target' => [], ], 'abbr' => [ 'title' => [] ], 'acronym' => [ 'title' => [] ], 'code' => [], 'pre' => [], 'em' => [], 'strong' => [], 'ul' => [], 'ol' => [], 'li' => [], 'p' => [], 'br' => [], ]; foreach ( (array) $recommended_plugins as $recommended_plugin ) { if ( is_object( $recommended_plugin ) ) { $recommended_plugin = (array) $recommended_plugin; } $plugin_title = wp_kses( $recommended_plugin['name'], $plugins_allowed_tags ); // Remove any HTML from the description. $description = wp_strip_all_tags( $recommended_plugin['short_description'] ); $name = wp_strip_all_tags( $plugin_title ); $download_link = isset( $recommended_plugin['download_link'] ) ? $recommended_plugin['download_link'] : null; $compatible_php = true; $compatible_wp = true; $tested_wp = true; $action_links = []; $plugin_status = 'Not installed'; if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { $plugin_pro_ver = $this->check_pro_version_exists( $recommended_plugin ); if ( false === $plugin_pro_ver ) { if ( 'yaypricing' === $recommended_plugin['slug'] ) { $install_status = [ 'status' => 'install', 'url' => $recommended_plugin['download_link'], 'version' => '', 'file' => $plugin_pro_ver, ]; } else { $install_status = \install_plugin_install_status( $recommended_plugin ); } } else { $install_status = [ 'status' => 'latest_installed', 'url' => false, 'version' => '', 'file' => $plugin_pro_ver, ]; } switch ( $install_status['status'] ) { case 'install': if ( $install_status['url'] ) { if ( $compatible_php && $compatible_wp ) { if ( 'yaymail' === $recommended_plugin['slug'] ) { $action_links[] = sprintf( '', esc_attr( $download_link ), esc_attr( $download_link ), /* translators: %s: Plugin name and version. */ esc_attr( sprintf( _x( 'Install %s now', 'plugin', 'ninjateam-whatsapp' ), $name ) ), __( 'Install Now', 'ninjateam-whatsapp' ) ); } else { $action_links[] = sprintf( '', esc_attr( $download_link ), /* translators: %s: Plugin name and version. */ esc_attr( sprintf( _x( 'Install %s now', 'plugin', 'ninjateam-whatsapp' ), $name ) ), __( 'Install Now', 'ninjateam-whatsapp' ) ); } } else { $action_links[] = sprintf( '', _x( 'Cannot Install', 'plugin', 'ninjateam-whatsapp' ) ); }//end if }//end if $plugin_status = 'Not installed'; break; case 'update_available': if ( $install_status['url'] ) { if ( $compatible_php && $compatible_wp ) { if ( 'yaymail' === $recommended_plugin['slug'] ) { $action_links[] = sprintf( '', esc_attr( $install_status['file'] ), esc_attr( $recommended_plugin['slug'] ), esc_url( $install_status['url'] ), /* translators: %s: Plugin name and version. */ esc_attr( sprintf( _x( 'Update %s now', 'plugin', 'ninjateam-whatsapp' ), $name ) ), esc_attr( $name ), __( 'Update Now', 'ninjateam-whatsapp' ) ); } else { $action_links[] = sprintf( '', esc_attr( $install_status['file'] ), esc_attr( $recommended_plugin['slug'] ), esc_url( $install_status['url'] ), /* translators: %s: Plugin name and version. */ esc_attr( sprintf( _x( 'Update %s now', 'plugin', 'ninjateam-whatsapp' ), $name ) ), esc_attr( $name ), __( 'Update Now', 'ninjateam-whatsapp' ) ); }//end if } else { $action_links[] = sprintf( '', _x( 'Cannot Update', 'plugin', 'ninjateam-whatsapp' ) ); }//end if }//end if if ( is_plugin_active( $install_status['file'] ) ) { $plugin_status = 'Active'; } else { $plugin_status = 'Inactive'; } break; case 'latest_installed': case 'newer_installed': if ( is_plugin_active( $install_status['file'] ) ) { $plugin_status = 'Active'; $action_links[] = sprintf( '', _x( 'Activated', 'plugin', 'ninjateam-whatsapp' ) ); } elseif ( current_user_can( 'activate_plugin', $install_status['file'] ) ) { $plugin_status = 'Inactive'; if ( $compatible_php && $compatible_wp ) { $button_text = __( 'Activate', 'ninjateam-whatsapp' ); /* translators: %s: Plugin name. */ $button_label = _x( 'Activate %s', 'plugin', 'ninjateam-whatsapp' ); $activate_url = add_query_arg( [ '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $install_status['file'] ), 'action' => 'activate', 'plugin' => $install_status['file'], ], network_admin_url( 'plugins.php' ) ); if ( is_network_admin() ) { $button_text = __( 'Network Activate', 'ninjateam-whatsapp' ); /* translators: %s: Plugin name. */ $button_label = _x( 'Network Activate %s', 'plugin', 'ninjateam-whatsapp' ); $activate_url = add_query_arg( [ 'networkwide' => 1 ], $activate_url ); } $action_links[] = sprintf( '', esc_attr( $install_status['file'] ), esc_attr( sprintf( $button_label, $recommended_plugin['name'] ) ), $button_text ); } else { $action_links[] = sprintf( '', _x( 'Cannot Activate', 'plugin', 'ninjateam-whatsapp' ) ); }//end if } else { $action_links[] = sprintf( '', _x( 'Installed', 'plugin', 'ninjateam-whatsapp' ) ); }//end if break; }//end switch }//end if $details_link = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $recommended_plugin['slug'] . '&TB_iframe=true&width=600&height=550' ); $plugin_icon_url = $recommended_plugin['icon']; /** * Filters the install action links for a plugin. * * @since 2.7.0 * * @param string[] $action_links An array of plugin action links. Defaults are links to Details and Install Now. * @param array $plugin The plugin currently being listed. */ $action_links = apply_filters( 'plugin_install_action_links', $action_links, $recommended_plugin ); ?>

'; if ( ! $compatible_php && ! $compatible_wp ) { echo esc_html__( 'This plugin doesn’t work with your versions of WordPress and PHP.', 'ninjateam-whatsapp' ); if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { printf( /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */ ' ' . esc_html__( 'Please update WordPress, and then learn more about updating PHP.', 'ninjateam-whatsapp' ), esc_url( self_admin_url( 'update-core.php' ) ), esc_url( wp_get_update_php_url() ) ); wp_update_php_annotation( '

', '' ); } elseif ( current_user_can( 'update_core' ) ) { printf( /* translators: %s: URL to WordPress Updates screen. */ ' ' . esc_html__( 'Please update WordPress.', 'ninjateam-whatsapp' ), esc_url( self_admin_url( 'update-core.php' ) ) ); } elseif ( current_user_can( 'update_php' ) ) { printf( /* translators: %s: URL to Update PHP page. */ ' ' . esc_html__( 'Learn more about updating PHP.', 'ninjateam-whatsapp' ), esc_url( wp_get_update_php_url() ) ); wp_update_php_annotation( '

', '' ); }//end if } elseif ( ! $compatible_wp ) { echo esc_html__( 'This plugin doesn’t work with your version of WordPress.', 'ninjateam-whatsapp' ); if ( current_user_can( 'update_core' ) ) { printf( /* translators: %s: URL to WordPress Updates screen. */ ' ' . esc_html__( 'Please update WordPress.', 'ninjateam-whatsapp' ), esc_url( self_admin_url( 'update-core.php' ) ) ); } } elseif ( ! $compatible_php ) { echo esc_html__( 'This plugin doesn’t work with your version of PHP.', 'ninjateam-whatsapp' ); if ( current_user_can( 'update_php' ) ) { printf( /* translators: %s: URL to Update PHP page. */ ' ' . esc_html__( 'Learn more about updating PHP.', 'ninjateam-whatsapp' ), esc_url( wp_get_update_php_url() ) ); wp_update_php_annotation( '

', '' ); } }//end if echo '

'; }//end if ?>

%s: %s', esc_html( 'Status' ), wp_kses_post( $plugin_status ) ); ?>
  • ' . wp_kses_post( implode( '
  • ', $action_links ) ) . '
  • '; } ?>