• Resolved tomqispi

    (@tomqispi)


    Hello,
    When you edit a review, the “Details” section in uneditable…
    Is there a way to modify those details, especially the name?
    More-often, people who fill the review form write their real full name instead of a “display name”. That’s why I would like to edit it.
    Thomas

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    It is not possible to change those details without modifying the database directly.

    However, you can modify the author name before it is displayed:

    /**
     * Convert the author name to initials
     * Paste this in your active theme's functions.php file.
     * @param object $review
     * @return object
     */
    add_filter( 'site-reviews/get/review', function( $review ) {
        if( !empty( trim( $review->author ))) {
            preg_match_all( '/(?<=\s|\b)\pL/u', $review->author, $matches );
            $result = implode( '.', $matches[0] );
            $review->author = strtoupper( $result ).'.';
        }
        return $review;
    });
    Thread Starter tomqispi

    (@tomqispi)

    Thank you for your answer. So I edited the database.

    Plugin Author Gemini Labs

    (@geminilabs)

    Happy to help. Please do consider leaving a review for the plugin if you find it useful! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Edit name’ is closed to new replies.