Making WordPress.org

Changeset 13930


Ignore:
Timestamp:
07/26/2024 04:42:27 AM (7 weeks ago)
Author:
dd32
Message:

Plugin Directory: Release Confirmation: Simplify the UI by moving the page-headers to the shortcode.

See https://github.com/WordPress/wordpress.org/pull/344.
See #7704.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-release-confirmation.php

    r13929 r13930  
    3131
    3232        if ( $post->release_confirmation ) {
    33             Release_Confirmation_Shortcode::single_plugin( $post, $include_header = false );
     33            Release_Confirmation_Shortcode::single_plugin( $post );
    3434        }
    3535    }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-release-confirmation.php

    r13929 r13930  
    9191        $not_enabled = [];
    9292        foreach ( $plugins as $plugin ) {
     93            printf(
     94                '<h2><a href="%s">%s</a></h2>',
     95                get_permalink( $plugin ),
     96                get_the_title( $plugin )
     97            );
     98
    9399            self::single_plugin( $plugin );
    94100
     
    116122    }
    117123
    118     static function single_plugin( $plugin, $include_header = true ) {
     124    static function single_plugin( $plugin ) {
    119125        $releases = Plugin_Directory::get_releases( $plugin );
    120 
    121         if ( $include_header ) {
    122             printf(
    123                 '<h2><a href="%s">%s</a></h2>',
    124                 get_permalink( $plugin ),
    125                 get_the_title( $plugin )
    126             );
    127         }
    128126
    129127        echo '<table class="widefat plugin-releases-listing">
Note: See TracChangeset for help on using the changeset viewer.