@@ 2776-2786 (lines=11) @@ | ||
2773 | $plugins_to_install = array(); |
|
2774 | ||
2775 | // Did user actually select any plugins to install/update ? |
|
2776 | if ( empty( $_POST['plugin'] ) ) { |
|
2777 | if ( 'install' === $install_type ) { |
|
2778 | $message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
|
2779 | } else { |
|
2780 | $message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
|
2781 | } |
|
2782 | ||
2783 | echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
|
2784 | ||
2785 | return false; |
|
2786 | } |
|
2787 | ||
2788 | if ( is_array( $_POST['plugin'] ) ) { |
|
2789 | $plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2819-2829 (lines=11) @@ | ||
2816 | } |
|
2817 | ||
2818 | // No need to proceed further if we have no plugins to handle. |
|
2819 | if ( empty( $plugins_to_install ) ) { |
|
2820 | if ( 'install' === $install_type ) { |
|
2821 | $message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
|
2822 | } else { |
|
2823 | $message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
|
2824 | } |
|
2825 | ||
2826 | echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
|
2827 | ||
2828 | return false; |
|
2829 | } |
|
2830 | ||
2831 | // Pass all necessary information if WP_Filesystem is needed. |
|
2832 | $url = wp_nonce_url( |