Issues (203)

Plugin/Lib/script.php (2 issues)

1
<?php
2
namespace NirjharLo\Cgss\Lib;
3
4
/**
5
 * Add scripts to the plugin. CSS and JS.
6
 */
7
if ( ! defined( 'ABSPATH' ) ) exit;
8
9
10
	final class Script {
11
12
13
		public function __construct() {
14
15
			add_action( 'admin_head', array( $this, 'data_table_css' ) );
0 ignored issues
show
The function add_action 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

15
			/** @scrutinizer ignore-call */ 
16
   add_action( 'admin_head', array( $this, 'data_table_css' ) );
Loading history...
16
		}
17
18
19
20
		// Table css for settings page data tables
21
		public function data_table_css() {
22
23
			$table_css = '<style type="text/css">
24
							.wp-list-table .column-post_title { width: 42.5%; }
25
							.wp-list-table .column-focus { width: 15%; }
26
							.wp-list-table .column-word { width: 7.5%; }
27
							.wp-list-table .column-column-link { width: 7.5%; }
28
							.wp-list-table .column-column-image { width: 7.5%; }
29
							.wp-list-table .column-column-share { width: 7.5%; }
30
							.wp-list-table .column-column-time { width: 12.5%; }
31
						</style>';
32
33
			$overview_table_css = '<style type="text/css">
34
							.wp-list-table .column-item { width: 20%; }
35
							.wp-list-table .column-remark { width: 80%; }
36
						</style>';
37
38
			echo $table_css;
39
			echo $overview_table_css;
40
		}
41
	} ?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
42