@@ 2899-2909 (lines=11) @@ | ||
2896 | $plugins_to_install = array(); |
|
2897 | ||
2898 | // Did user actually select any plugins to install/update ? |
|
2899 | if ( empty( $_POST['plugin'] ) ) { |
|
2900 | if ( 'install' === $install_type ) { |
|
2901 | $message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
|
2902 | } else { |
|
2903 | $message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
|
2904 | } |
|
2905 | ||
2906 | echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
|
2907 | ||
2908 | return false; |
|
2909 | } |
|
2910 | ||
2911 | if ( is_array( $_POST['plugin'] ) ) { |
|
2912 | $plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2942-2952 (lines=11) @@ | ||
2939 | } |
|
2940 | ||
2941 | // No need to proceed further if we have no plugins to handle. |
|
2942 | if ( empty( $plugins_to_install ) ) { |
|
2943 | if ( 'install' === $install_type ) { |
|
2944 | $message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
|
2945 | } else { |
|
2946 | $message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
|
2947 | } |
|
2948 | ||
2949 | echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
|
2950 | ||
2951 | return false; |
|
2952 | } |
|
2953 | ||
2954 | // Pass all necessary information if WP_Filesystem is needed. |
|
2955 | $url = wp_nonce_url( |