PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.1
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-plugins-handler.php +11 -2 5.1 → 6.2.1 View file →
@@ -6,8 +6,13 @@
6 6 */
7 7
8 8 namespace MainWP\Dashboard;
9 9
10 +// Exit if accessed directly.
11 +if ( ! defined( 'ABSPATH' ) ) {
12 + exit;
13 +}
14 +
10 15 /**
11 16 * Class MainWP MainWP_Plugins_Handler
12 17 *
13 18 * @uses MainWP_Install_Bulk()
@@ -61,8 +66,9 @@
61 66 }
62 67 $plugin['websiteid'] = $website->id;
63 68 $plugin['websiteurl'] = $website->url;
64 69 $plugin['websitename'] = $website->name;
70 + $plugin['site_info'] = $website->site_info;
65 71
66 72 $output->plugins[] = $plugin;
67 73 $not_found = false;
68 74 }
@@ -75,8 +81,9 @@
75 81 }
76 82 $plugin['websiteid'] = $website->id;
77 83 $plugin['websiteurl'] = $website->url;
78 84 $plugin['websitename'] = $website->name;
85 + $plugin['site_info'] = $website->site_info;
79 86 $output->plugins_installed[] = $plugin;
80 87 }
81 88 }
82 89
@@ -141,9 +148,9 @@
141 148 for ( $i = 0; $i < $_count; $i++ ) {
142 149 $slug = $plugins[ $i ];
143 150 $name = $names[ $i ];
144 151 if ( ! isset( $decodedIgnoredPlugins[ $slug ] ) ) {
145 - $decodedIgnoredPlugins[ $slug ] = urldecode( $name );
152 + $decodedIgnoredPlugins[ $slug ] = array( 'name' => urldecode( $name ) );
146 153 }
147 154 }
148 155
149 156 /**
@@ -339,11 +346,12 @@
339 346 return false;
340 347 }
341 348
342 349 /**
350 + *
343 351 * Save the trusted plugin note.
344 352 *
345 - * @uses \MainWP\Dashboard\MainWP_Utility::esc_content()
353 + * @return string Escaped note.
346 354 */
347 355 public static function save_trusted_plugin_note() {
348 356 // phpcs:disable WordPress.Security.NonceVerification
349 357 $slug = isset( $_POST['slug'] ) ? urldecode( wp_unslash( $_POST['slug'] ) ) : ''; //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
@@ -357,6 +365,7 @@
357 365 }
358 366 $trustedPluginsNotes[ $slug ] = $esc_note;
359 367 $userExtension->trusted_plugins_notes = wp_json_encode( $trustedPluginsNotes );
360 368 MainWP_DB_Common::instance()->update_user_extension( $userExtension );
369 + return $esc_note;
361 370 }
362 371 }