|
@@ 2951-2961 (lines=11) @@
|
| 2948 |
|
$plugins_to_install = array(); |
| 2949 |
|
|
| 2950 |
|
// Did user actually select any plugins to install/update ? |
| 2951 |
|
if ( empty( $_POST['plugin'] ) ) { |
| 2952 |
|
if ( 'install' === $install_type ) { |
| 2953 |
|
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' ); |
| 2954 |
|
} else { |
| 2955 |
|
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' ); |
| 2956 |
|
} |
| 2957 |
|
|
| 2958 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 2959 |
|
|
| 2960 |
|
return false; |
| 2961 |
|
} |
| 2962 |
|
|
| 2963 |
|
if ( is_array( $_POST['plugin'] ) ) { |
| 2964 |
|
$plugins_to_install = (array) $_POST['plugin']; |
|
@@ 2994-3004 (lines=11) @@
|
| 2991 |
|
} |
| 2992 |
|
|
| 2993 |
|
// No need to proceed further if we have no plugins to handle. |
| 2994 |
|
if ( empty( $plugins_to_install ) ) { |
| 2995 |
|
if ( 'install' === $install_type ) { |
| 2996 |
|
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' ); |
| 2997 |
|
} else { |
| 2998 |
|
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' ); |
| 2999 |
|
} |
| 3000 |
|
|
| 3001 |
|
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>'; |
| 3002 |
|
|
| 3003 |
|
return false; |
| 3004 |
|
} |
| 3005 |
|
|
| 3006 |
|
// Pass all necessary information if WP_Filesystem is needed. |
| 3007 |
|
$url = wp_nonce_url( |