Making WordPress.org


Ignore:
Timestamp:
02/06/2022 02:41:22 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Improve consistency of some DocBlocks and comments in the User_Notes class.

File:
1 edited

Legend:

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

    r10655 r11527  
    2222                add_action( 'wp_enqueue_scripts',                   array( $this, 'enqueue_scripts' ) );
    2323
    24                 add_action( 'bbp_post_request',                     array( $this, 'add_user_note_request' ), 0 ); // Low priority to get below bbp_edit_user_handler()
     24                add_action( 'bbp_post_request',                     array( $this, 'add_user_note_request' ), 0 ); // Low priority to get below bbp_edit_user_handler().
    2525                add_action( 'bbp_get_request',                      array( $this, 'delete_user_note_request' ) );
    2626
     
    8888         * Saves a note to a users meta data.
    8989         *
    90          * @param int    $user_id   The User ID.
     90         * @param int    $user_id   The user ID.
    9191         * @param string $note_text The note text to add.
    9292         * @param int    $post_id   The support thread this text is related to. Optional.
     
    210210         * Retrieves all notes for a particular user.
    211211         *
    212          * @param int $user_id User ID. Defaults to the current post author.
    213          * @param bool $display_add_note_form Whether to show the Add New Note form.
     212         * @param int  $user_id              User ID. Defaults to the current post author.
     213         * @param bool $display_add_note_form Whether to show the Add New Note form. Default true.
    214214         * @return array {
    215215         *     Array of user notes.
     
    256256                        $note_meta = array(
    257257                                'author' => sprintf(
    258                                         /* translators: 1: user note author's display name, 2: link to post, 3: date, 4: time */
     258                                        /* translators: 1: User note author's display name, 2: Link to post, 3: Date, 4: Time. */
    259259                                        __( 'By %1$s on <a href="%2$s">%3$s at %4$s</a>', 'wporg-forums' ),
    260260                                        sprintf( '<a href="%s">%s</a>',
     
    263263                                        ),
    264264                                        esc_url( $post_permalink ),
    265                                         /* translators: localized date format, see https://www.php.net/date */
     265                                        /* translators: Localized date format, see https://www.php.net/date */
    266266                                        mysql2date( __( 'F j, Y', 'wporg-forums' ), $note->date ),
    267                                         /* translators: localized time format, see https://www.php.net/date */
     267                                        /* translators: Localized time format, see https://www.php.net/date */
    268268                                        mysql2date( __( 'g:i a', 'wporg-forums' ), $note->date )
    269269                                )
     
    341341         * in the note adding/editing form with the current post ID and permalink.
    342342         *
    343          * @param int $user_id User ID. Default 0.
    344          * @param bool $display_add_note_form Whether to show the add new note form. Default true.
     343         * @param int  $user_id              User ID. Default 0.
     344         * @param bool $display_add_note_form Whether to show the Add New Note form. Default true.
    345345         * @return string User notes output.
    346346         */
     
    479479                        esc_attr( $post_id ),
    480480                        esc_html(
    481                                 /* translators: %d: user notes count */
     481                                /* translators: %d: User notes count. */
    482482                                sprintf( __( 'User Notes (%d)', 'wporg-forums' ),
    483483                                        $this->get_user_notes( $user_id )->count
Note: See TracChangeset for help on using the changeset viewer.