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-themes-handler.php +13 -1 5.2 → 6.2.1 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_Themes_Handler
13 18 *
14 19 * @uses MainWP_Install_Bulk
@@ -61,8 +66,9 @@
61 66 }
62 67 $theme['websiteid'] = $website->id;
63 68 $theme['websiteurl'] = $website->url;
64 69 $theme['websitename'] = $website->name;
70 + $theme['site_info'] = $website->site_info;
65 71
66 72 $output->themes[] = $theme;
67 73 $not_found = false;
68 74 }
@@ -75,8 +81,9 @@
75 81 }
76 82 $theme['websiteid'] = $website->id;
77 83 $theme['websiteurl'] = $website->url;
78 84 $theme['websitename'] = $website->name;
85 + $theme['site_info'] = $website->site_info;
79 86 $output->themes_installed[] = $theme;
80 87 }
81 88 }
82 89 if ( ! empty( $website->rollback_updates_data ) ) {
@@ -289,9 +296,13 @@
289 296 $userExtension->trusted_themes = wp_json_encode( $trustedThemes );
290 297 MainWP_DB_Common::instance()->update_user_extension( $userExtension );
291 298 }
292 299
293 - /** This Method Saves a Trusted theme note. */
300 + /**
301 + * This Method Saves a Trusted theme note.
302 + *
303 + * @return string Escaped note.
304 + */
294 305 public static function save_trusted_theme_note() {
295 306 // phpcs:disable WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
296 307 $slug = isset( $_POST['slug'] ) ? urldecode( sanitize_text_field( wp_unslash( $_POST['slug'] ) ) ) : '';
297 308 $note = isset( $_POST['note'] ) ? wp_unslash( $_POST['note'] ) : '';
@@ -304,6 +315,7 @@
304 315 }
305 316 $trustedThemesNotes[ $slug ] = $esc_note;
306 317 $userExtension->trusted_themes_notes = wp_json_encode( $trustedThemesNotes );
307 318 MainWP_DB_Common::instance()->update_user_extension( $userExtension );
319 + return $esc_note;
308 320 }
309 321 }