|
@@ 2691-2701 (lines=11) @@
|
| 2688 |
|
$plugins_to_install = array(); |
| 2689 |
|
|
| 2690 |
|
// Did user actually select any plugins to install/update ? |
| 2691 |
|
if ( empty( $_POST['plugin'] ) ) { |
| 2692 |
|
if ( 'install' === $install_type ) { |
| 2693 |
|
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
| 2694 |
|
} else { |
| 2695 |
|
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
| 2696 |
|
} |
| 2697 |
|
|
| 2698 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2699 |
|
|
| 2700 |
|
return false; |
| 2701 |
|
} |
| 2702 |
|
|
| 2703 |
|
if ( is_array( $_POST['plugin'] ) ) { |
| 2704 |
|
$plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2734-2744 (lines=11) @@
|
| 2731 |
|
} |
| 2732 |
|
|
| 2733 |
|
// No need to proceed further if we have no plugins to handle. |
| 2734 |
|
if ( empty( $plugins_to_install ) ) { |
| 2735 |
|
if ( 'install' === $install_type ) { |
| 2736 |
|
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
| 2737 |
|
} else { |
| 2738 |
|
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
| 2739 |
|
} |
| 2740 |
|
|
| 2741 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2742 |
|
|
| 2743 |
|
return false; |
| 2744 |
|
} |
| 2745 |
|
|
| 2746 |
|
// Pass all necessary information if WP_Filesystem is needed. |
| 2747 |
|
$url = wp_nonce_url( |