[wp-meta] [Making WordPress.org] #4701: Streamline access to the changelog content of plugin pages

Making WordPress.org noreply at wordpress.org
Thu Aug 22 20:03:18 UTC 2019

#4701: Streamline access to the changelog content of plugin pages
 Reporter:  netpassprodsr     |      Owner:  (none)
     Type:  defect            |     Status:  new
 Priority:  normal            |  Milestone:
Component:  Plugin Directory  |   Keywords:
 == The quick:
 The following snippet of code is in the wrong place. It should ideally be
 ''the final element'' just before the closing `<article>` tag on the page,
 not above the content it references.

 `<script type="text/javascript">if ( '#changelog' == window.location.hash
 ) { window.location.hash = '#developers'; }</script>`

 (this snippet immediately precedes the following group of tags, and
 because of which it does not produce the desired result:)

 <span id="description"></span>
 <span id="reviews"></span>
 <span id="installation"></span>
 <span id="developers"></span>

 == The details:
 The WP Toolkit for Plesk presents links to the plugin pages of those with
 an updated version available. The link has a reference to changelog, as in
 this '''example''':


 An automatic reformat of the URL occurs resulting in this link:


 Prior to mid-July 2019, the behavior of the WordPress.org plugins
 directory would be to simply present the first tab (description) content,
 so the user then needed to click the Development tab to see the changelog

 Since then, the script snippet above was inserted to attempt making the
 Development tab content appear when arriving at the page via a changelog
 While the URL in the browser does change, that change is ineffective
 because the new URL refers to elements not existing when it changes.
 (Interestingly, if the page is immediately refreshed in the browser, the
 Development tab content does indeed appear.)

 I propose 1 of 2 resolves to this issue:
 1. Move the script snippet to be the last element before the close of the
 article html block,
 2. Wrap the script content in some deferred logic structure (e.g.,
 window.onload() or similar) so it runs after the page is loaded.

Ticket URL: <https://meta.trac.wordpress.org/ticket/4701>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list