pre_user_id

pre_user_id

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('pre_user_id') is found 2 times:

  • /wp-includes/comment.php line 2120
    2116
    2117
    2118
    2119
    2120
    2121
    2122
    2123
    2124
    2125
    2126
         * @since 1.5.0
         *
         * @param int $user_id The comment author's user ID.
         */
        $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] );
    } elseif ( isset( $commentdata['user_id'] ) ) {
        /** This filter is documented in wp-includes/comment.php */
        $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_id'] );
    }
     
    /**
  • /wp-includes/comment.php line 2123
    2119
    2120
    2121
    2122
    2123
    2124
    2125
    2126
    2127
    2128
    2129
         */
        $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] );
    } elseif ( isset( $commentdata['user_id'] ) ) {
        /** This filter is documented in wp-includes/comment.php */
        $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_id'] );
    }
     
    /**
     * Filters the comment author's browser user agent before it is set.
     *
     * @since 1.5.0