+ // If mature status changed, issue actions.
+ if ( $details['mature'] != $current_details['mature'] ) {
+ if ( $details['mature'] == 1 ) {
+ /**
+ * Fires when the blog status is changed to 'mature'.
+ *
+ * @since 3.1.0
+ *
+ * @param int $blog_id Blog ID.
+ */
+ do_action( 'mature_blog', $blog_id );
+ } else {
+ /**
+ * Fires when the blog status is changed to 'unmature'.
+ *
+ * @since 3.1.0
+ *
+ * @param int $blog_id Blog ID.
+ */
+ do_action( 'unmature_blog', $blog_id );
+ }
+ }
+
+ // If archived status changed, issue actions.
+ if ( $details['archived'] != $current_details['archived'] ) {
+ if ( $details['archived'] == 1 ) {
+ /**
+ * Fires when the blog status is changed to 'archived'.
+ *
+ * @since MU
+ *
+ * @param int $blog_id Blog ID.
+ */
+ do_action( 'archive_blog', $blog_id );
+ } else {
+ /**
+ * Fires when the blog status is changed to 'unarchived'.
+ *
+ * @since MU
+ *
+ * @param int $blog_id Blog ID.
+ */
+ do_action( 'unarchive_blog', $blog_id );
+ }
+ }
+
+ // If deleted status changed, issue actions.
+ if ( $details['deleted'] != $current_details['deleted'] ) {
+ if ( $details['deleted'] == 1 ) {
+ /**
+ * Fires when the blog status is changed to 'deleted'.
+ *
+ * @since 3.5.0
+ *
+ * @param int $blog_id Blog ID.
+ */
+ do_action( 'make_delete_blog', $blog_id );
+ } else {
+ /**
+ * Fires when the blog status is changed to 'undeleted'.
+ *
+ * @since 3.5.0
+ *
+ * @param int $blog_id Blog ID.
+ */
+ do_action( 'make_undelete_blog', $blog_id );
+ }
+ }
+
+ if ( isset( $details['public'] ) ) {
+ switch_to_blog( $blog_id );
+ update_option( 'blog_public', $details['public'] );
+ restore_current_blog();
+ }