Making WordPress.org

Changeset 12615


Ignore:
Timestamp:
06/02/2023 02:40:46 PM (21 months ago)
Author:
Clorith
Message:

Support Forums: Show user notes in reverse order.

This reverses the order in which user notes are listed, making it simpler to view the most recent status of an account at a glance.

Fixes #7030.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php

    r12161 r12615  
    8787    /**
    8888     * Saves a note to a users meta data.
    89      * 
     89     *
    9090     * @param int    $user_id   The user ID.
    9191     * @param string $note_text The note text to add.
     
    148148    /**
    149149     * Saves a note to a users meta data. Suffixes to previous user note if by same moderator within a timeframe.
    150      * 
     150     *
    151151     * @param int    $user_id   The user ID.
    152152     * @param string $note_text The note text to add.
     
    269269            $user_notes = array();
    270270        }
     271
     272        // Reverse the order, so that the newer notes are displayed first.
     273        $user_notes = array_reverse( $user_notes, true );
    271274
    272275        $note_id   = isset( $_GET['note_id'] ) ? (int) $_GET['note_id'] : 0;
     
    591594    }
    592595
    593    
     596
    594597    /**
    595598     * Displays existing notes and the form for adding a new note in user edit profile.
Note: See TracChangeset for help on using the changeset viewer.