<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[46594] trunk/src: Docs: Miscellaneous docblock fixes and improvements.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/46594">46594</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/46594","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-10-26 20:42:00 +0000 (Sat, 26 Oct 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Docs: Miscellaneous docblock fixes and improvements.
See <a href="https://core.trac.wordpress.org/ticket/48303">#48303</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludespostphp">trunk/src/wp-admin/includes/post.php</a></li>
<li><a href="#trunksrcwpadminusernewphp">trunk/src/wp-admin/user-new.php</a></li>
<li><a href="#trunksrcwpincludesclasswpblockstylesregistryphp">trunk/src/wp-includes/class-wp-block-styles-registry.php</a></li>
<li><a href="#trunksrcwpincludesclasswpimageeditorgdphp">trunk/src/wp-includes/class-wp-image-editor-gd.php</a></li>
<li><a href="#trunksrcwpincludesclasswpimageeditorimagickphp">trunk/src/wp-includes/class-wp-image-editor-imagick.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
<li><a href="#trunksrcwpincludesmediaphp">trunk/src/wp-includes/media.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludespostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/post.php 2019-10-26 17:28:20 UTC (rev 46593)
+++ trunk/src/wp-admin/includes/post.php 2019-10-26 20:42:00 UTC (rev 46594)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1319,7 +1319,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $id Post ID or post object.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $title Optional. Title to override the post's current title when generating the post name. Default null.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $name Optional. Name to override the post name. Default null.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return array Array containing the sample permalink with placeholder for the post name, and the post name.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array {
+ * Array containing the sample permalink with placeholder for the post name, and the post name.
+ *
+ * @type string $0 The permalink with placeholder for the post name.
+ * @type string $1 The post name.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_sample_permalink( $id, $title = null, $name = null ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1383,7 +1388,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $permalink Array containing the sample permalink with placeholder for the post name, and the post name.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $permalink {
+ * Array containing the sample permalink with placeholder for the post name, and the post name.
+ *
+ * @type string $0 The permalink with placeholder for the post name.
+ * @type string $1 The post name.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id Post ID.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $title Post title.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $name Post name (slug).
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1637,17 +1647,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $user ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters whether to show the post locked dialog.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Returning a falsey value to the filter will short-circuit displaying the dialog.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Returning false from the filter will prevent the dialog from being displayed.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param bool $display Whether to display the dialog. Default true.
- * @param WP_Post $post Post object.
- * @param WP_User|bool $user WP_User object on success, false otherwise.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param bool $display Whether to display the dialog. Default true.
+ * @param WP_Post $post Post object.
+ * @param WP_User $user The user with the lock for the post.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! apply_filters( 'show_post_locked_dialog', true, $post, $user ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1696,14 +1705,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters whether to allow the post lock to be overridden.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Returning a falsey value to the filter will disable the ability
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Returning false from the filter will disable the ability
</ins><span class="cx" style="display: block; padding: 0 10px"> * to override the post lock.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param bool $override Whether to allow overriding post locks. Default true.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param bool $override Whether to allow the post lock to be overridden. Default true.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Post $post Post object.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param WP_User $user User object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param WP_User $user The user with the lock for the post.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $override = apply_filters( 'override_post_lock', true, $post, $user );
</span><span class="cx" style="display: block; padding: 0 10px"> $tab_last = $override ? '' : ' wp-tab-last';
</span></span></pre></div>
<a id="trunksrcwpadminusernewphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/user-new.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/user-new.php 2019-10-26 17:28:20 UTC (rev 46593)
+++ trunk/src/wp-admin/user-new.php 2019-10-26 20:42:00 UTC (rev 46594)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,7 +105,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $user_id The invited user's ID.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $role The role of invited user.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $role Array containing role information for the invited user.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $newuser_key The key of the invitation.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'invite_user', $user_id, $role, $newuser_key );
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpblockstylesregistryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-block-styles-registry.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-block-styles-registry.php 2019-10-26 17:28:20 UTC (rev 46593)
+++ trunk/src/wp-includes/class-wp-block-styles-registry.php 2019-10-26 20:42:00 UTC (rev 46594)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -67,7 +67,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Unregisters a block style.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $block_name Block type name including namespace.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $block_style_name Block style name.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $block_style_name Block style name.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return boolean True if the block style was unregistered with success and false otherwise.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,7 +90,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $block_name Block type name including namespace.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $block_style_name Block style name.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $block_style_name Block style name.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array Registered block style properties.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -135,7 +135,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $block_name Block type name including namespace.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $block_style_name Block style name.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $block_style_name Block style name.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True if the block style is registered, false otherwise.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpimageeditorgdphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-image-editor-gd.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-image-editor-gd.php 2019-10-26 17:28:20 UTC (rev 46593)
+++ trunk/src/wp-includes/class-wp-image-editor-gd.php 2019-10-26 20:42:00 UTC (rev 46594)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -245,7 +245,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $size_data Array of width, height, and whether to crop.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $size_data {
+ * Array of size data.
+ *
+ * @type int $width The maximum width in pixels.
+ * @type int $height The maximum height in pixels.
+ * @type bool $crop Whether to crop the image to exact dimensions.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return WP_Error|array WP_Error on error, or the image data array for inclusion in the `sizes` array in the image meta.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function make_subsize( $size_data ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpimageeditorimagickphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-image-editor-imagick.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-image-editor-imagick.php 2019-10-26 17:28:20 UTC (rev 46593)
+++ trunk/src/wp-includes/class-wp-image-editor-imagick.php 2019-10-26 20:42:00 UTC (rev 46594)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -453,7 +453,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $size_data Array of width, height, and whether to crop.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $size_data {
+ * Array of size data.
+ *
+ * @type int $width The maximum width in pixels.
+ * @type int $height The maximum height in pixels.
+ * @type bool $crop Whether to crop the image to exact dimensions.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return WP_Error|array WP_Error on error, or the image data array for inclusion in the `sizes` array in the image meta.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function make_subsize( $size_data ) {
</span></span></pre></div>
<a id="trunksrcwpincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/functions.php 2019-10-26 17:28:20 UTC (rev 46593)
+++ trunk/src/wp-includes/functions.php 2019-10-26 20:42:00 UTC (rev 46594)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2857,7 +2857,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieve list of mime types and file extensions.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.2.0 Support was added for GIMP (xcf) files.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.2.0 Support was added for GIMP (.xcf) files.
+ * @since 4.9.2 Support was added for Flac (.flac) files.
+ * @since 4.9.6 Support was added for AAC (.aac) files.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array Array of mime types keyed by the file extension regex corresponding to those types.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3042,9 +3044,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $t Mime types keyed by the file extension regex corresponding to
- * those types. 'swf' and 'exe' removed from full list. 'htm|html' also
- * removed depending on '$user' capabilities.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $t Mime types keyed by the file extension regex corresponding to those types.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int|WP_User|null $user User ID, User object or null if not provided (indicates current user).
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'upload_mimes', $t, $user );
</span></span></pre></div>
<a id="trunksrcwpincludesmediaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/media.php 2019-10-26 17:28:20 UTC (rev 46593)
+++ trunk/src/wp-includes/media.php 2019-10-26 20:42:00 UTC (rev 46594)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -38,10 +38,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * not set.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Finally, there is a filter named {@see 'editor_max_image_size'}, that will be
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * called on the calculated array for width and height, respectively. The second
- * parameter will be the value that was in the $size parameter. The returned
- * type for the hook is an array with the width as the first element and the
- * height as the second element.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * called on the calculated array for width and height, respectively.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,7 +51,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Default 'medium'.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $context Optional. Could be 'display' (like in a theme) or 'edit'
</span><span class="cx" style="display: block; padding: 0 10px"> * (like inserting into an editor). Default null.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return array Width and height of what the result image should resize to.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int[] {
+ * An array of width and height values.
+ *
+ * @type int $0 The maximum width in pixels.
+ * @type int $1 The maximum height in pixels.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function image_constrain_size_for_editor( $width, $height, $size = 'medium', $context = null ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $content_width;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -117,8 +119,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $max_image_size An array with the width as the first element,
- * and the height as the second element.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int[] $max_image_size {
+ * An array of width and height values.
+ *
+ * @type int $0 The maximum width in pixels.
+ * @type int $1 The maximum height in pixels.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $size Size of what the result image should be.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $context The context the image is being resized for.
</span><span class="cx" style="display: block; padding: 0 10px"> * Possible values are 'display' (like in a theme)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -417,7 +423,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $current_height Current height of the image.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $max_width Optional. Max width in pixels to constrain to. Default 0.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $max_height Optional. Max height in pixels to constrain to. Default 0.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return array First item is the width, the second item is the height.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int[] {
+ * An array of width and height values.
+ *
+ * @type int $0 The width in pixels.
+ * @type int $1 The height in pixels.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_constrain_dimensions( $current_width, $current_height, $max_width = 0, $max_height = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $max_width && ! $max_height ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -474,7 +485,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $dimensions The image width and height.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int[] $dimensions {
+ * An array of width and height values.
+ *
+ * @type int $0 The width in pixels.
+ * @type int $1 The height in pixels.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int $current_width The current width of the image.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $current_height The current height of the image.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $max_width The maximum width permitted.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1149,10 +1165,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $size_array Array of width and height values in pixels (in that order).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int[] $size_array {
+ * An array of width and height values.
+ *
+ * @type int $0 The width in pixels.
+ * @type int $1 The height in pixels.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $image_src The 'src' of the image.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $attachment_id Optional. The image attachment ID to pass to the filter. Default 0.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $attachment_id Optional. The image attachment ID. Default 0.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return string|bool The 'srcset' attribute value. False on error or when only one source exists.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id = 0 ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1162,7 +1183,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $size_array Array of width and height values in pixels (in that order).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int[] $size_array {
+ * An array of requested width and height values.
+ *
+ * @type int $0 The width in pixels.
+ * @type int $1 The height in pixels.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $image_src The 'src' of the image.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $attachment_id The image attachment ID or 0 if not supplied.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1231,7 +1257,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $max_width The maximum image width to be included in the 'srcset'. Default '2048'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $size_array Array of width and height values in pixels (in that order).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int[] $size_array {
+ * An array of requested width and height values.
+ *
+ * @type int $0 The width in pixels.
+ * @type int $1 The height in pixels.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $max_srcset_image_width = apply_filters( 'max_srcset_image_width', 2048, $size_array );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1310,7 +1341,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * pixel density value if paired with an 'x' descriptor.
</span><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> * }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $size_array Array of width and height values in pixels (in that order).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $size_array {
+ * An array of requested width and height values.
+ *
+ * @type int $0 The width in pixels.
+ * @type int $1 The height in pixels.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $image_src The 'src' of the image.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $attachment_id Image attachment ID or 0.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2376,7 +2412,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Returns a filtered list of WP-supported audio formats.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Returns a filtered list of supported audio formats.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2624,7 +2660,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_shortcode( 'audio', 'wp_audio_shortcode' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Returns a filtered list of WP-supported video formats.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Returns a filtered list of supported video formats.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4011,9 +4047,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $args Post query arguments.
- * @param string $type Mime type of the desired media.
- * @param mixed $post Post ID or object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args Post query arguments.
+ * @param string $type Mime type of the desired media.
+ * @param WP_Post $post Post object.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $args = apply_filters( 'get_attached_media_args', $args, $type, $post );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4024,15 +4060,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $children Associative array of media attached to the given post.
- * @param string $type Mime type of the media desired.
- * @param mixed $post Post ID or object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $children Associative array of media attached to the given post.
+ * @param string $type Mime type of the media desired.
+ * @param WP_Post $post Post object.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return (array) apply_filters( 'get_attached_media', $children, $type, $post );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Check the content blob for an audio, video, object, embed, or iframe tags.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Check the content HTML for a audio, video, object, embed, or iframe tags.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4288,7 +4324,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Registers the personal data exporter for media
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Registers the personal data exporter for media.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $exporters An array of personal data exporters.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array An array of personal data exporters.
</span></span></pre>
</div>
</div>
</body>
</html>