|
@@ 2865-2875 (lines=11) @@
|
| 2862 |
|
$plugins_to_install = array(); |
| 2863 |
|
|
| 2864 |
|
// Did user actually select any plugins to install/update ? |
| 2865 |
|
if ( empty( $_POST['plugin'] ) ) { |
| 2866 |
|
if ( 'install' === $install_type ) { |
| 2867 |
|
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
| 2868 |
|
} else { |
| 2869 |
|
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
| 2870 |
|
} |
| 2871 |
|
|
| 2872 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2873 |
|
|
| 2874 |
|
return false; |
| 2875 |
|
} |
| 2876 |
|
|
| 2877 |
|
if ( is_array( $_POST['plugin'] ) ) { |
| 2878 |
|
$plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2908-2918 (lines=11) @@
|
| 2905 |
|
} |
| 2906 |
|
|
| 2907 |
|
// No need to proceed further if we have no plugins to handle. |
| 2908 |
|
if ( empty( $plugins_to_install ) ) { |
| 2909 |
|
if ( 'install' === $install_type ) { |
| 2910 |
|
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
| 2911 |
|
} else { |
| 2912 |
|
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
| 2913 |
|
} |
| 2914 |
|
|
| 2915 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2916 |
|
|
| 2917 |
|
return false; |
| 2918 |
|
} |
| 2919 |
|
|
| 2920 |
|
// Pass all necessary information if WP_Filesystem is needed. |
| 2921 |
|
$url = wp_nonce_url( |