|
@@ 2661-2671 (lines=11) @@
|
| 2658 |
|
$plugins_to_install = array(); |
| 2659 |
|
|
| 2660 |
|
// Did user actually select any plugins to install/update ? |
| 2661 |
|
if ( empty( $_POST['plugin'] ) ) { |
| 2662 |
|
if ( 'install' === $install_type ) { |
| 2663 |
|
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
| 2664 |
|
} else { |
| 2665 |
|
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
| 2666 |
|
} |
| 2667 |
|
|
| 2668 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2669 |
|
|
| 2670 |
|
return false; |
| 2671 |
|
} |
| 2672 |
|
|
| 2673 |
|
if ( is_array( $_POST['plugin'] ) ) { |
| 2674 |
|
$plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2704-2714 (lines=11) @@
|
| 2701 |
|
} |
| 2702 |
|
|
| 2703 |
|
// No need to proceed further if we have no plugins to handle. |
| 2704 |
|
if ( empty( $plugins_to_install ) ) { |
| 2705 |
|
if ( 'install' === $install_type ) { |
| 2706 |
|
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
| 2707 |
|
} else { |
| 2708 |
|
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
| 2709 |
|
} |
| 2710 |
|
|
| 2711 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2712 |
|
|
| 2713 |
|
return false; |
| 2714 |
|
} |
| 2715 |
|
|
| 2716 |
|
// Pass all necessary information if WP_Filesystem is needed. |
| 2717 |
|
$url = wp_nonce_url( |