comment_author example


            if ( $message ) {
                echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
            }
        }
        ?> <div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div> <table class="form-table comment-ays"> <tr> <th scope="row"><?php _e( 'Author' ); ?></th> <td><?php comment_author( $comment ); ?></td> </tr> <?php if ( get_comment_author_email( $comment ) ) { ?> <tr> <th scope="row"><?php _e( 'Email' ); ?></th> <td><?php comment_author_email( $comment ); ?></td> </tr> <?php } ?> <?php if ( get_comment_author_url( $comment ) ) { ?> <tr> <th scope="row"><?php _e( 'URL' ); ?></th> <td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td> </tr>
global $comment_status;

        $author_url = get_comment_author_url( $comment );

        $author_url_display = untrailingslashit( preg_replace( '|^http(s)?://(www\.)?|i', '', $author_url ) );

        if ( strlen( $author_url_display ) > 50 ) {
            $author_url_display = wp_html_excerpt( $author_url_display, 49, '&hellip;' );
        }

        echo '<strong>';
        comment_author( $comment );
        echo '</strong><br />';

        if ( ! empty( $author_url_display ) ) {
            // Print link to author URL, and disallow referrer information (without using target="_blank").             printf(
                '<a href="%s" rel="noopener noreferrer">%s</a><br />',
                esc_url( $author_url ),
                esc_html( $author_url_display )
            );
        }

        
Home | Imprint | This part of the site doesn't use cookies.