|
@@ 2816-2826 (lines=11) @@
|
| 2813 |
|
$plugins_to_install = array(); |
| 2814 |
|
|
| 2815 |
|
// Did user actually select any plugins to install/update ? |
| 2816 |
|
if ( empty( $_POST['plugin'] ) ) { |
| 2817 |
|
if ( 'install' === $install_type ) { |
| 2818 |
|
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
| 2819 |
|
} else { |
| 2820 |
|
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
| 2821 |
|
} |
| 2822 |
|
|
| 2823 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2824 |
|
|
| 2825 |
|
return false; |
| 2826 |
|
} |
| 2827 |
|
|
| 2828 |
|
if ( is_array( $_POST['plugin'] ) ) { |
| 2829 |
|
$plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2859-2869 (lines=11) @@
|
| 2856 |
|
} |
| 2857 |
|
|
| 2858 |
|
// No need to proceed further if we have no plugins to handle. |
| 2859 |
|
if ( empty( $plugins_to_install ) ) { |
| 2860 |
|
if ( 'install' === $install_type ) { |
| 2861 |
|
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
| 2862 |
|
} else { |
| 2863 |
|
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
| 2864 |
|
} |
| 2865 |
|
|
| 2866 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2867 |
|
|
| 2868 |
|
return false; |
| 2869 |
|
} |
| 2870 |
|
|
| 2871 |
|
// Pass all necessary information if WP_Filesystem is needed. |
| 2872 |
|
$url = wp_nonce_url( |