PluginProbe
Plugin Check (PCP) / trunk
Plugin Check (PCP) vtrunk
2.1.0 trunk 0.1 0.2.0 0.2.1 0.2.2 0.2.3 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.3.0 1.3.1 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 1.9.0 2.0.0 ci-artifacts
plugin-check / includes / Checker / Check_Types.php

Check_Types.php in Plugin Check (PCP) trunk, at includes/Checker/Check_Types.php

46 lines 886 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class WordPress\Plugin_Check\Checker\Check_Types
4 *
5 * @package plugin-check
6 */
7
8 namespace WordPress\Plugin_Check\Checker;
9
10 /**
11 * Check Type class.
12 *
13 * @since 1.8.0
14 */
15 class Check_Types {
16
17 // Constants for available check types.
18 const TYPE_ERROR = 'error';
19 const TYPE_WARNING = 'warning';
20
21 /**
22 * Returns an array of check types.
23 *
24 * @since 1.8.0
25 *
26 * @return array An array of check types.
27 */
28 public static function get_types() {
29 $default_types = array(
30 self::TYPE_ERROR => __( 'Error', 'plugin-check' ),
31 self::TYPE_WARNING => __( 'Warning', 'plugin-check' ),
32 );
33
34 /**
35 * Filters the check types.
36 *
37 * @since 1.8.0
38 *
39 * @param array<string, string> $default_types Associative array of type slugs to labels.
40 */
41 $check_types = (array) apply_filters( 'wp_plugin_check_types', $default_types );
42
43 return $check_types;
44 }
45 }
46