<!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>[13620] sites/trunk/wordpress.org/public_html/wp-content: Plugin Directory: Expose the plugin closed status through the `plugin_information` API endpoint.</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="http://meta.trac.wordpress.org/changeset/13620">13620</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/13620","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>dd32</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-04-30 05:26:07 +0000 (Tue, 30 Apr 2024)</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'>Plugin Directory: Expose the plugin closed status through the `plugin_information` API endpoint.

This only applies to v1.2+ clients, as v1.0/1.1 expect a `null` response for any error case.

See <a href="http://meta.trac.wordpress.org/ticket/7057">#7057</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryapiroutesclasspluginphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryclasstemplatephp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorystandaloneclasspluginsinfoapiphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgplugins2024inctemplatetagsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryapiroutesclasspluginphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php     2024-04-30 05:22:33 UTC (rev 13619)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php       2024-04-30 05:26:07 UTC (rev 13620)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,6 +6,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> use WordPressdotorg\Plugin_Directory\Template;
</span><span class="cx" style="display: block; padding: 0 10px"> use WordPressdotorg\Plugin_Directory\Tools;
</span><span class="cx" style="display: block; padding: 0 10px"> use WordPressdotorg\Plugin_Directory\API\Base;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+use function WordPressdotorg\Plugin_Directory\Theme\get_plugin_status_notice;
</ins><span class="cx" style="display: block; padding: 0 10px"> use WP_REST_Server;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -38,9 +39,34 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return array A formatted array of all the data for the plugin.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function plugin_info( $request ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                global $post;
</ins><span class="cx" style="display: block; padding: 0 10px">                 $post = Plugin_Directory::get_plugin_post( $request['plugin_slug'] );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( ! $post || 'publish' != $post->post_status ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Support returning API data in different locales, even on wordpress.org (for api.wordpress.org usage)
+               if ( ! empty( $request['locale'] ) && ! in_array( strtolower( $request['locale'] ), array( 'en_us', 'en' ) ) ) {
+                       switch_to_locale( $request['locale'] );
+               }
+
+               if ( $post && in_array( $post->post_status, [ 'closed', 'disabled' ] ) ) {
+                       $close_data = Template::get_close_data( $post );
+
+                       $close_text = '';
+                       if ( is_callable( '\WordPressdotorg\Plugin_Directory\Theme\get_plugin_status_notice' ) ) {
+                               $close_text = strip_tags( get_plugin_status_notice( $post ) );
+                       }
+
+                       return [
+                               'error'       => 'closed',
+                               'name'        => get_the_title(),
+                               'slug'        => $post->post_name,
+                               'description' => $close_text,
+                               'closed'      => true,
+                               'closed_date' => $close_data['date'] ?: false,
+                               'reason'      => $close_data['public'] ? $close_data['reason'] : false,
+                               'reason_text' => $close_data['public'] ? $close_data['label'] : false,
+                       ];
+
+               } elseif ( ! $post || 'publish' != $post->post_status ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         // Copy what the REST API does if the param is incorrect
</span><span class="cx" style="display: block; padding: 0 10px">                        return new \WP_Error(
</span><span class="cx" style="display: block; padding: 0 10px">                                'rest_invalid_param',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -68,14 +94,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return array The formatted array of all the data for the plugin.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function plugin_info_data( $request, $post ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $GLOBALS['post'] = $post;
-               $plugin_slug     = $post->post_name;
-               $post_id         = $post->ID;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         global $post;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Support returning API data in different locales, even on wordpress.org (for api.wordpress.org usage)
-               if ( ! empty( $request['locale'] ) && ! in_array( strtolower( $request['locale'] ), array( 'en_us', 'en' ) ) ) {
-                       switch_to_locale( $request['locale'] );
-               }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $plugin_slug = $post->post_name;
+               $post_id     = $post->ID;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $result            = array();
</span><span class="cx" style="display: block; padding: 0 10px">                $result['name']    = get_the_title();
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryclasstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php      2024-04-30 05:22:33 UTC (rev 13619)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php        2024-04-30 05:26:07 UTC (rev 13620)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1059,18 +1059,44 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return string Close/disable reason.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public static function get_close_reason( $post = null ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                return self::get_close_data( $post )['label'] ?? '';
+       }
+
+       /**
+        * Returns the close/disable data for a plugin.
+        *
+        * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
+        */
+       public static function get_close_data( $post = null ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                 $post = get_post( $post );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( ! $post || ! in_array( $post->post_status, array( 'closed', 'disabled' ), true ) ) {
+                       return false;
+               }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $close_reasons = self::get_close_reasons();
-               $close_reason  = (string) get_post_meta( $post->ID, '_close_reason', true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $result = [
+                       'date'      => get_post_meta( $post->ID, 'plugin_closed_date', true ) ?: false,
+                       'reason'    => (string) get_post_meta( $post->ID, '_close_reason', true ),
+                       'label'     => '',
+                       'permanent' => false,
+                       'public'    => false,
+               ];
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( isset( $close_reasons[ $close_reason ] ) ) {
-                       $reason_label = $close_reasons[ $close_reason ];
-               } else {
-                       $reason_label = _x( 'Unknown', 'unknown close reason', 'wporg-plugins' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if (
+                       'author-request' === $result['reason'] ||
+                       ! Tools::get_plugin_committers( $post->post_name )
+               ) {
+                       $result['permanent'] = true;
</ins><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">-                return $reason_label;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $result['label'] = self::get_close_reasons()[ $result['reason'] ] ?? _x( 'Unknown', 'unknown close reason', 'wporg-plugins' );
+               $days_closed     = $result['date'] ? (int) ( ( time() - strtotime( $result['date'] ) ) / DAY_IN_SECONDS ) : false;
+
+               // If it's closed for more than 60 days, it's by author request, or we're unsure about the close date, it's publicly known.
+               if ( ! $result['date'] || $days_closed >= 60 || 'author-request' === $result['reason'] ) {
+                       $result['public'] = true;
+               }
+
+               return $result; 
</ins><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></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorystandaloneclasspluginsinfoapiphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api.php   2024-04-30 05:22:33 UTC (rev 13619)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api.php     2024-04-30 05:26:07 UTC (rev 13620)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -136,8 +136,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->output( $response, 404 );
</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">-                // Only include the fields requested.
-               $response = $this->remove_unexpected_fields( $response, $request, 'plugin_information' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Only include the fields requested. If an error is present, we ignore the requested fields.
+               if ( ! isset( $response['error'] ) ) {
+                       $response = $this->remove_unexpected_fields( $response, $request, 'plugin_information' );
+               }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->output( (object) $response );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -255,6 +257,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        )
</span><span class="cx" style="display: block; padding: 0 10px">                                ), true
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                       // Don't include unknown plugins OR closed plugins.
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( isset( $plugin['error'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                unset( $response['plugins'][ $i ] );
</span><span class="cx" style="display: block; padding: 0 10px">                                continue;
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgplugins2024inctemplatetagsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php      2024-04-30 05:22:33 UTC (rev 13619)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php        2024-04-30 05:26:07 UTC (rev 13620)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -208,35 +208,34 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                case 'disabled':
</span><span class="cx" style="display: block; padding: 0 10px">                case 'closed':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $closed_date  = get_post_meta( get_the_ID(), 'plugin_closed_date', true );
-                       $close_reason = Template::get_close_reason( $post );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $close_data = Template::get_close_data( $post );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( $closed_date ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 if ( $close_data['date'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 if ( 'disabled' === $post_status && current_user_can( 'plugin_approve' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        /* translators: %s: plugin closing date */
-                                       $message = sprintf( __( 'This plugin has been disabled as of %s -- this means it is closed, but actively serving updates.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $message = sprintf(
+                                               /* translators: %s: plugin closing date */
+                                               __( 'This plugin has been disabled as of %s -- this means it is closed, but actively serving updates.', 'wporg-plugins' ),
+                                               mysql2date( get_option( 'date_format' ), $close_data['date'] )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                 } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        /* translators: %s: plugin closing date */
-                                       $message = sprintf( __( 'This plugin has been closed as of %s and is not available for download.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $message = sprintf(
+                                               /* translators: %s: plugin closing date */
+                                               __( 'This plugin has been closed as of %s and is not available for download.', 'wporg-plugins' ),
+                                               mysql2date( get_option( 'date_format' ), $close_data['date'] )
+                                       );
</ins><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">-                                // Determine permanence of closure.
-                               $committers = Tools::get_plugin_committers( $post->post_name );
-                               $permanent  = ( __( 'Author Request', 'wporg-plugins' ) === $close_reason || ! $committers );
-
-                               $days_passed = (int) ( ( current_time( 'timestamp' ) - mysql2date( 'U', $closed_date ) ) / DAY_IN_SECONDS );
-
</del><span class="cx" style="display: block; padding: 0 10px">                                 // If we're closed, it may be permanent.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                if ( $permanent ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         if ( $close_data['permanent'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                         $message .= ' ' . __( 'This closure is permanent.', 'wporg-plugins' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                } elseif ( $days_passed < 60 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         } elseif ( ! $close_data['public'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                         $message .= ' ' . __( 'This closure is temporary, pending a full review.', 'wporg-plugins' );
</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">-                                // Display close reason if more than 60 days have passed.
-                               if ( $days_passed >= 60 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         // Display close reason if it's now publicly known.
+                               if ( $close_data['public'] && $close_data['reason'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                         /* translators: %s: plugin close/disable reason */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $message .= ' ' . sprintf( __( 'Reason: %s.', 'wporg-plugins' ), $close_reason );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $message .= ' ' . sprintf( __( 'Reason: %s.', 'wporg-plugins' ), $close_data['label'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                                 }
</span><span class="cx" style="display: block; padding: 0 10px">                        } else {
</span><span class="cx" style="display: block; padding: 0 10px">                                $message = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' );
</span></span></pre>
</div>
</div>

</body>
</html>