|
@@ 2710-2720 (lines=11) @@
|
| 2707 |
|
$plugins_to_install = array(); |
| 2708 |
|
|
| 2709 |
|
// Did user actually select any plugins to install/update ? |
| 2710 |
|
if ( empty( $_POST['plugin'] ) ) { |
| 2711 |
|
if ( 'install' === $install_type ) { |
| 2712 |
|
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
| 2713 |
|
} else { |
| 2714 |
|
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
| 2715 |
|
} |
| 2716 |
|
|
| 2717 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2718 |
|
|
| 2719 |
|
return false; |
| 2720 |
|
} |
| 2721 |
|
|
| 2722 |
|
if ( is_array( $_POST['plugin'] ) ) { |
| 2723 |
|
$plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2753-2763 (lines=11) @@
|
| 2750 |
|
} |
| 2751 |
|
|
| 2752 |
|
// No need to proceed further if we have no plugins to handle. |
| 2753 |
|
if ( empty( $plugins_to_install ) ) { |
| 2754 |
|
if ( 'install' === $install_type ) { |
| 2755 |
|
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
| 2756 |
|
} else { |
| 2757 |
|
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
| 2758 |
|
} |
| 2759 |
|
|
| 2760 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2761 |
|
|
| 2762 |
|
return false; |
| 2763 |
|
} |
| 2764 |
|
|
| 2765 |
|
// Pass all necessary information if WP_Filesystem is needed. |
| 2766 |
|
$url = wp_nonce_url( |