Passed
Pull Request — main (#7)
by vishal
01:47
created

wp-comment-preview.php (2 issues)

Labels
Severity
1
<?php
2
/**
3
 * Plugin Name:     WP Comment Preview
4
 * Plugin URI:      https://github.com/vishalkakadiya
5
 * Description:     Allow to display comment preview.
6
 * Author:          Vishal Kakadiya
7
 * Author URI:      https://github.com/vishalkakadiya
8
 * Text Domain:     comment-preview
9
 * Domain Path:     /languages
10
 * Version:         0.1.0
11
 *
12
 * @package         WP_Comment_Preview
13
 */
14
15
if ( ! defined( 'ABSPATH' ) ) {
16
	exit; // Exit if accessed directly
17
}
18
19
define( 'WP_COMMENT_PREVIEW_URL', plugin_dir_url( __FILE__ ) );
0 ignored issues
show
The function plugin_dir_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
define( 'WP_COMMENT_PREVIEW_URL', /** @scrutinizer ignore-call */ plugin_dir_url( __FILE__ ) );
Loading history...
20
define( 'WP_COMMENT_PREVIEW_PATH', plugin_dir_path( __FILE__ ) );
0 ignored issues
show
The function plugin_dir_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
define( 'WP_COMMENT_PREVIEW_PATH', /** @scrutinizer ignore-call */ plugin_dir_path( __FILE__ ) );
Loading history...
21
22
require_once __DIR__ . '/inc/classes/class-comment-preview.php';
23
24
new \CommentPreview\Inc\Comment_Preview();
25