PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | pages/page-mainwp-install-bulk.php +10 -8 5.2 → 6.2.2 View file →
@@ -7,8 +7,13 @@
7 7 */
8 8
9 9 namespace MainWP\Dashboard;
10 10
11 +// Exit if accessed directly.
12 +if ( ! defined( 'ABSPATH' ) ) {
13 + exit;
14 +}
15 +
11 16 /**
12 17 * Class MainWP_Install_Bulk
13 18 *
14 19 * @used-by MainWP_Plugins::InstallPlugins
@@ -71,12 +76,10 @@
71 76 *
72 77 * @param string $type Plugin|Theme Type of upload.
73 78 */
74 79 public static function render_upload( $type ) {
75 - $title = ( 'plugin' === $type ) ? 'Plugins' : 'Themes';
76 - $favorites_enabled = is_plugin_active( 'mainwp-favorites-extension/mainwp-favorites-extension.php' );
77 - $cls = $favorites_enabled ? 'favorites-extension-enabled ' : '';
78 - $cls .= ( 'plugin' === $type ) ? 'qq-upload-plugins' : '';
80 + $title = ( 'plugin' === $type ) ? 'Plugins' : 'Themes';
81 + $cls = ( 'plugin' === $type ) ? 'qq-upload-plugins' : '';
79 82
80 83 $disabled_upload = false;
81 84 $disabled_functions = ini_get( 'disable_functions' );
82 85 if ( ! empty( $disabled_functions ) ) {
@@ -158,14 +161,13 @@
158 161 </div>
159 162 <div class="middle aligned column ">
160 163 <div class="dz-error-message"><span data-dz-errormessage=""></span></div>
161 164 <span class="qq-upload-processing">
162 - <i class="notched circle loading icon"></i> Uploading...
165 + <span data-tooltip="<?php esc_attr_e( 'Uploading. Please wait...', 'mainwp' ); ?>" data-inverted="" data-position="left center"><i class="notched circle loading icon"></i></span>
163 166 </span>
164 167 </div>
165 168 <div class="right aligned middle aligned column">
166 169 <a class="ui mini button basic red qq-upload-cancel" href="#">Cancel Upload</a>
167 - <?php echo $favorites_enabled ? '<span class="qq-upload-add-to-favorites" style="display:none;"><a class="ui mini button basic" href="#">Add to Favorites</a></span>' : ''; ?>
168 170 <a class="ui mini button basic red qq-upload-cancel-install" style="display:none;" href="#">Remove Item</a>
169 171 </div>
170 172 </div>
171 173 </div>
@@ -216,9 +218,9 @@
216 218 formData.append("mainwp_do", "MainWP_Install_Bulk-uploadfile");
217 219 formData.append("qq_nonce", "<?php echo esc_js( wp_create_nonce( 'qq_nonce' ) ); ?>");
218 220 });
219 221 this.on("uploadprogress", function( file, progress, bytesSent ) {
220 - progress = parseInt(progress);
222 + progress = Number.parseInt(progress);
221 223 jQuery(file.previewElement).find('.qq-upload-percent').html( progress + '% from ');
222 224 });
223 225 this.on("success", function( file, result ) {
224 226 let obj = false;
@@ -240,9 +242,9 @@
240 242
241 243 if( obj ){
242 244 if(obj.success){
243 245 file.previewElement.classList.add('qq-upload-success');
244 - jQuery(file.previewElement).find('.qq-upload-processing').html('Upload completed.');
246 + jQuery(file.previewElement).find('.qq-upload-processing').html('<span data-tooltip="Upload completed successfully." data-inverted="" data-position="left center"><i class="green check icon"></i></span>');
245 247 unerror = false;
246 248 } else if(obj.error){
247 249 jQuery(file.previewElement).find('.qq-upload-processing').html('<span data-tooltip="' + obj.error + '" data-inverted="" data-position="top left"><i class="red times icon"></i></span>' );
248 250 unerror = false;