|
@@ 2849-2859 (lines=11) @@
|
| 2846 |
|
$plugins_to_install = array(); |
| 2847 |
|
|
| 2848 |
|
// Did user actually select any plugins to install/update ? |
| 2849 |
|
if ( empty( $_POST['plugin'] ) ) { |
| 2850 |
|
if ( 'install' === $install_type ) { |
| 2851 |
|
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
| 2852 |
|
} else { |
| 2853 |
|
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
| 2854 |
|
} |
| 2855 |
|
|
| 2856 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2857 |
|
|
| 2858 |
|
return false; |
| 2859 |
|
} |
| 2860 |
|
|
| 2861 |
|
if ( is_array( $_POST['plugin'] ) ) { |
| 2862 |
|
$plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2892-2902 (lines=11) @@
|
| 2889 |
|
} |
| 2890 |
|
|
| 2891 |
|
// No need to proceed further if we have no plugins to handle. |
| 2892 |
|
if ( empty( $plugins_to_install ) ) { |
| 2893 |
|
if ( 'install' === $install_type ) { |
| 2894 |
|
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
| 2895 |
|
} else { |
| 2896 |
|
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
| 2897 |
|
} |
| 2898 |
|
|
| 2899 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2900 |
|
|
| 2901 |
|
return false; |
| 2902 |
|
} |
| 2903 |
|
|
| 2904 |
|
// Pass all necessary information if WP_Filesystem is needed. |
| 2905 |
|
$url = wp_nonce_url( |