# opcache-manager/3.3.0/includes/system/class-comment.php

OPcache Manager, version 3.3.0. 56 lines.

- Page: https://pluginprobe.com/plugins/opcache-manager/3.3.0/code/includes/system/class-comment.php
- Raw: https://pluginprobe.com/plugins/opcache-manager/3.3.0/raw/includes/system/class-comment.php
- Modified: 2019-11-20T13:11:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/opcache-manager/3.3.0/code/includes/system/class-comment.php#L10-L20`.

```php
<?php
/**
 * Comments handling
 *
 * Handles all comments operations and detection.
 *
 * @package System
 * @author  Pierre Lannoy <https://pierre.lannoy.fr/>.
 * @since   1.0.0
 */

namespace OPcacheManager\System;

/**
 * Define the comments functionality.
 *
 * Handles all comments operations and detection.
 *
 * @package System
 * @author  Pierre Lannoy <https://pierre.lannoy.fr/>.
 * @since   1.0.0
 */
class Comment {

	/**
	 * Initializes the class and set its properties.
	 *
	 * @since 1.0.0
	 */
	public function __construct() {
	}

	/**
	 * Get a fully qualified comment name.
	 *
	 * @param   mixed $id         Optional. The comment id or WP_comment instance.
	 * @return  string  The comment pseudo name if detected.
	 * @since   1.0.0
	 */
	public static function get_full_comment_name( $id ) {
		$comment = null;
		if ( is_numeric( $id ) ) {
			$comment = get_comment( $id );
		}
		if ( $id instanceof \WP_Comment ) {
			$comment = $id;
		}
		if ( $comment instanceof \WP_Comment ) {
			return sprintf( '"%s" (comment ID %s)', wp_trim_words( wp_kses( $comment->comment_content, [] ), 8 ), $comment->comment_ID );
		} else {
			return 'unknow comment';
		}
	}

}

```
