diff --git src/wp-admin/includes/class-wp-community-events.php src/wp-admin/includes/class-wp-community-events.php
index cfe12fd52c..211d37ea5e 100644
--- src/wp-admin/includes/class-wp-community-events.php
+++ src/wp-admin/includes/class-wp-community-events.php
@@ -107,7 +107,7 @@ class WP_Community_Events {
 		} elseif ( 200 !== $response_code ) {
 			$response_error = new WP_Error(
 				'api-error',
-				/* translators: %s is a numeric HTTP status code; e.g., 400, 403, 500, 504, etc. */
+				/* translators: %d: numeric HTTP status code, e.g. 400, 403, 500, 504, etc. */
 				sprintf( __( 'Invalid API response code (%d)' ), $response_code )
 			);
 		} elseif ( ! isset( $response_body['location'], $response_body['events'] ) ) {
diff --git src/wp-admin/js/comment.js src/wp-admin/js/comment.js
index d194148f60..3541a2f68b 100644
--- src/wp-admin/js/comment.js
+++ src/wp-admin/js/comment.js
@@ -1,4 +1,12 @@
 /* global postboxes, commentL10n */
+
+/**
+ * @summary Binds to the document ready event.
+ *
+ * @since 2.5.0
+ *
+ * @param {jQuery} $ The jQuery object.
+ */
 jQuery(document).ready( function($) {
 
 	postboxes.add_postbox_toggles('comment');
@@ -9,8 +17,17 @@ jQuery(document).ready( function($) {
 		$timestampwrap = $timestampdiv.find( '.timestamp-wrap' ),
 		$edittimestamp = $timestampdiv.siblings( 'a.edit-timestamp' );
 
+	/**
+	 * @summary Adds event that opens the time stamp form if the form is hidden.
+	 *
+	 * @listens $edittimestamp:click
+	 *
+	 * @param {Event} event The event object.
+	 * @returns {void}
+	 */
 	$edittimestamp.click( function( event ) {
 		if ( $timestampdiv.is( ':hidden' ) ) {
+			// Slide down the form and set focus on the first field.
 			$timestampdiv.slideDown( 'fast', function() {
 				$( 'input, select', $timestampwrap ).first().focus();
 			} );
@@ -19,6 +36,15 @@ jQuery(document).ready( function($) {
 		event.preventDefault();
 	});
 
+	/**
+	 * @summary Resets the time stamp values when the cancel button is clicked.
+	 *
+	 * @listens .cancel-timestamp:click
+	 *
+	 * @param {Event} event The event object.
+	 * @returns {void}
+	 */
+
 	$timestampdiv.find('.cancel-timestamp').click( function( event ) {
 		// Move focus back to the Edit link.
 		$edittimestamp.show().focus();
@@ -32,6 +58,14 @@ jQuery(document).ready( function($) {
 		event.preventDefault();
 	});
 
+	/**
+	 * @summary Sets the time stamp values when the ok button is clicked.
+	 *
+	 * @listens .save-timestamp:click
+	 *
+	 * @param {Event} event The event object.
+	 * @returns {void}
+	 */
 	$timestampdiv.find('.save-timestamp').click( function( event ) { // crazyhorse - multiple ok cancels
 		var aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(),
 			newD = new Date( aa, mm - 1, jj, hh, mn );
diff --git src/wp-admin/js/custom-background.js src/wp-admin/js/custom-background.js
index c3f4e294f1..9e96015e75 100644
--- src/wp-admin/js/custom-background.js
+++ src/wp-admin/js/custom-background.js
@@ -1,9 +1,24 @@
 /* global ajaxurl */
+
+/**
+ * @summary Registers all events for customizing the background.
+ *
+ * @since 3.0.0
+ *
+ * @requires jQuery
+ */
 (function($) {
 	$(document).ready(function() {
 		var frame,
 			bgImage = $( '#custom-background-image' );
 
+		/**
+		 * @summary Instantiates the WordPress color picker and binds the change and clear events.
+		 *
+		 * @since 3.5.0
+		 *
+		 * @returns {void}
+		 */
 		$('#background-color').wpColorPicker({
 			change: function( event, ui ) {
 				bgImage.css('background-color', ui.color.toString());
@@ -13,22 +28,57 @@
 			}
 		});
 
+		/**
+		 * @summary Alters the background size CSS property whenever the background size input has changed.
+		 *
+		 * @since 4.7.0
+		 *
+		 * @returns {void}
+		 */
 		$( 'select[name="background-size"]' ).change( function() {
 			bgImage.css( 'background-size', $( this ).val() );
 		});
 
+		/**
+		 * @summary Alters the background position CSS property whenever the background position input has changed.
+		 *
+		 * @since 4.7.0
+		 *
+		 * @returns {void}
+		 */
 		$( 'input[name="background-position"]' ).change( function() {
 			bgImage.css( 'background-position', $( this ).val() );
 		});
 
+		/**
+		 * @summary Alters the background repeat CSS property whenever the background repeat input has changed.
+		 *
+		 * @since 3.0.0
+		 *
+		 * @returns {void}
+		 */
 		$( 'input[name="background-repeat"]' ).change( function() {
 			bgImage.css( 'background-repeat', $( this ).is( ':checked' ) ? 'repeat' : 'no-repeat' );
 		});
 
+		/**
+		 * @summary Alters the background attachment CSS property whenever the background attachment input has changed.
+		 *
+		 * @since 4.7.0
+		 *
+		 * @returns {void}
+		 */
 		$( 'input[name="background-attachment"]' ).change( function() {
 			bgImage.css( 'background-attachment', $( this ).is( ':checked' ) ? 'scroll' : 'fixed' );
 		});
 
+		/**
+		 * @summary Binds the event for opening the WP Media dialog.
+		 *
+		 * @since 3.5.0
+		 *
+		 * @returns {void}
+		 */
 		$('#choose-from-library-link').click( function( event ) {
 			var $el = $(this);
 
@@ -54,13 +104,21 @@
 				button: {
 					// Set the text of the button.
 					text: $el.data('update'),
-					// Tell the button not to close the modal, since we're
-					// going to refresh the page when the image is selected.
+					/*
+					 * Tell the button not to close the modal, since we're
+					 * going to refresh the page when the image is selected.
+					 */
 					close: false
 				}
 			});
 
-			// When an image is selected, run a callback.
+			/**
+			 * @summary When an image is selected, run a callback.
+			 *
+			 * @since 3.5.0
+			 *
+			 * @returns {void}
+ 			 */
 			frame.on( 'select', function() {
 				// Grab the selected attachment.
 				var attachment = frame.state().get('selection').first();
diff --git src/wp-admin/js/media.js src/wp-admin/js/media.js
index e23adebb17..4c1dc58fc3 100644
--- src/wp-admin/js/media.js
+++ src/wp-admin/js/media.js
@@ -1,8 +1,33 @@
 /* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice */
 
+/**
+ * @summary Creates a dialog containing posts that can have a particular media attached to it.
+ *
+ * @since 2.7.0
+ *
+ * @global
+ * @namespace
+ *
+ * @requires jQuery
+ */
 var findPosts;
+
 ( function( $ ){
 	findPosts = {
+		/**
+		 * @summary Opens a dialog to attach media to a post.
+		 *
+		 * Adds an overlay prior to retrieving a list of posts to attach the media to.
+		 *
+		 * @since 2.7.0
+		 *
+		 * @memberOf findPosts
+		 *
+		 * @param {string} af_name The name of the affected element.
+		 * @param {string} af_val The value of the affected post element.
+		 *
+		 * @returns {boolean} Always returns false.
+		 */
 		open: function( af_name, af_val ) {
 			var overlay = $( '.ui-find-overlay' );
 
@@ -14,35 +39,67 @@ var findPosts;
 			overlay.show();
 
 			if ( af_name && af_val ) {
+				// #affected is a hidden input field in the dialog that keeps track of which media should be attached.
 				$( '#affected' ).attr( 'name', af_name ).val( af_val );
 			}
 
 			$( '#find-posts' ).show();
 
+			// Close the dialog when the escape key is pressed.
 			$('#find-posts-input').focus().keyup( function( event ){
 				if ( event.which == 27 ) {
 					findPosts.close();
-				} // close on Escape
+				}
 			});
 
-			// Pull some results up by default
+			// Retrieves a list of applicable posts for media attachment and shows them.
 			findPosts.send();
 
 			return false;
 		},
 
+		/**
+		 * @summary Clears the found posts lists before hiding the attach media dialog.
+		 *
+		 * @since 2.7.0
+		 *
+		 * @memberOf findPosts
+		 *
+		 * @returns {void}
+		 */
 		close: function() {
 			$('#find-posts-response').empty();
 			$('#find-posts').hide();
 			$( '.ui-find-overlay' ).hide();
 		},
 
+		/**
+		 * @summary Binds a click event listener to the overlay which closes the attach media dialog.
+		 *
+		 * @since 3.5.0
+		 *
+		 * @memberOf findPosts
+		 *
+		 * @returns {void}
+		 */
 		overlay: function() {
 			$( '.ui-find-overlay' ).on( 'click', function () {
 				findPosts.close();
 			});
 		},
 
+		/**
+		 * @summary Retrieves and displays posts based on the search term.
+		 *
+		 * Sends a post request to the admin_ajax.php, requesting posts based on the search term provided by the user.
+		 * Defaults to all posts if no search term is provided.
+		 *
+		 * @since 2.7.0
+		 *
+		 * @memberOf findPosts
+		 *
+		 * @returns {void}
+		 */
 		send: function() {
 			var post = {
 					ps: $( '#find-posts-input' ).val(),
@@ -53,6 +110,10 @@ var findPosts;
 
 			spinner.addClass( 'is-active' );
 
+			/**
+			 * Send a POST request to admin_ajax.php, hide the spinner and replace the list of posts with the response data.
+			 * If an error occurs, display it.
+			 */
 			$.ajax( ajaxurl, {
 				type: 'POST',
 				data: post,
@@ -71,10 +132,15 @@ var findPosts;
 		}
 	};
 
+	/**
+	 * @summary Initializes the file once the DOM is fully loaded and attaches events to the various form elements.
+	 *
+	 * @returns {void}
+	 */
 	$( document ).ready( function() {
 		var settings, $mediaGridWrap = $( '#wp-media-grid' );
 
-		// Open up a manage media frame into the grid.
+		// Opens a manage media frame into the grid.
 		if ( $mediaGridWrap.length && window.wp && window.wp.media ) {
 			settings = _wpMediaGridSettings;
 
@@ -85,19 +151,33 @@ var findPosts;
 			}).open();
 		}
 
+		// Prevents form submission if no post has been selected.
 		$( '#find-posts-submit' ).click( function( event ) {
 			if ( ! $( '#find-posts-response input[type="radio"]:checked' ).length )
 				event.preventDefault();
 		});
+
+		// Submits the search query when hitting the enter key in the search input.
 		$( '#find-posts .find-box-search :input' ).keypress( function( event ) {
 			if ( 13 == event.which ) {
 				findPosts.send();
 				return false;
 			}
 		});
+
+		// Binds the click event to the search button.
 		$( '#find-posts-search' ).click( findPosts.send );
+
+		// Binds the close dialog click event.
 		$( '#find-posts-close' ).click( findPosts.close );
+
+		// Binds the bulk action events to the submit buttons.
 		$( '#doaction, #doaction2' ).click( function( event ) {
+
+			/*
+			 * Retrieves all select elements for bulk actions that have a name starting with `action`
+			 * and handle its action based on its value.
+			 */
 			$( 'select[name^="action"]' ).each( function() {
 				var optionValue = $( this ).val();
 
@@ -112,7 +192,11 @@ var findPosts;
 			});
 		});
 
-		// Enable whole row to be clicked
+		/**
+		 * @summary Enables clicking on the entire table row.
+		 *
+		 * @returns {void}
+		 */
 		$( '.find-box-inside' ).on( 'click', 'tr', function() {
 			$( this ).find( '.found-radio input' ).prop( 'checked', true );
 		});
diff --git src/wp-content/themes/twentysixteen/inc/template-tags.php src/wp-content/themes/twentysixteen/inc/template-tags.php
index eb87203062..fa1ad8efed 100644
--- src/wp-content/themes/twentysixteen/inc/template-tags.php
+++ src/wp-content/themes/twentysixteen/inc/template-tags.php
@@ -213,7 +213,7 @@ function twentysixteen_categorized_blog() {
 		set_transient( 'twentysixteen_categories', $all_the_cool_cats );
 	}
 
-	if ( $all_the_cool_cats > 1 ) {
+	if ( $all_the_cool_cats > 1 || is_preview() ) {
 		// This blog has more than 1 category so twentysixteen_categorized_blog should return true.
 		return true;
 	} else {
diff --git src/wp-includes/class-wp-editor.php src/wp-includes/class-wp-editor.php
index 8879797914..73de84de2b 100644
--- src/wp-includes/class-wp-editor.php
+++ src/wp-includes/class-wp-editor.php
@@ -144,7 +144,7 @@ final class _WP_Editors {
 	 * @static
 	 * @param string $content The initial content of the editor.
 	 * @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers).
-	 * @param array $settings See the _parse_settings() method for description.
+	 * @param array $settings See _WP_Editors()::parse_settings() for description.
 	 */
 	public static function editor( $content, $editor_id, $settings = array() ) {
 		$set = self::parse_settings( $editor_id, $settings );
diff --git src/wp-includes/class-wp-query.php src/wp-includes/class-wp-query.php
index baefec75b4..e20d574409 100644
--- src/wp-includes/class-wp-query.php
+++ src/wp-includes/class-wp-query.php
@@ -2405,7 +2405,7 @@ class WP_Query {
 			 *
 			 * @since 1.5.0
 			 *
-			 * @param string   $where The JOIN clause of the query.
+			 * @param string   $join  The JOIN clause of the query.
 			 * @param WP_Query &$this The WP_Query instance (passed by reference).
 			 */
 			$join = apply_filters_ref_array( 'posts_join', array( $join, &$this ) );
diff --git src/wp-includes/functions.php src/wp-includes/functions.php
index 966dcd8265..828f123491 100644
--- src/wp-includes/functions.php
+++ src/wp-includes/functions.php
@@ -158,6 +158,8 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
  *
  * @since 4.4.0
  *
+ * @global WP_Locale $wp_locale
+ *
  * @param string $date Formatted date string.
  * @return string The date, declined if locale specifies it.
  */
diff --git src/wp-includes/vars.php src/wp-includes/vars.php
index 2e97c9a0ae..89b3532327 100644
--- src/wp-includes/vars.php
+++ src/wp-includes/vars.php
@@ -139,5 +139,12 @@ function wp_is_mobile() {
 		$is_mobile = false;
 	}
 
-	return $is_mobile;
+	/**
+	 * Filters whether the request should be treated as coming from a mobile device or not.
+	 *
+	 * @since 4.9.0
+	 *
+	 * @param bool $is_mobile Whether the request is from a mobile device or not.
+	 */
+	return apply_filters( 'wp_is_mobile', $is_mobile );
 }
diff --git src/wp-includes/wp-db.php src/wp-includes/wp-db.php
index 74dedd5130..2c9cceabf7 100644
--- src/wp-includes/wp-db.php
+++ src/wp-includes/wp-db.php
@@ -3268,7 +3268,7 @@ class wpdb {
 	 *
 	 * @param string $db_cap The feature to check for. Accepts 'collation',
 	 *                       'group_concat', 'subqueries', 'set_charset',
-	 *                       or 'utf8mb4'.
+	 *                       'utf8mb4', or 'utf8mb4_520'.
 	 * @return int|false Whether the database feature is supported, false otherwise.
 	 */
 	public function has_cap( $db_cap ) {
