PluginProbe
My WP Customize Admin/Frontend / 1.8
My WP Customize Admin/Frontend v1.8
1.27.4 1.27.3 trunk 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.10 1.10.1 1.10.2 1.11 1.12 1.12.1 1.12.2 1.13 1.13.1 1.13.2 1.14 1.15.0 1.16 1.17.0 All 76 releases
my-wp / developer / modules / mywp.developer.module.mywp.error.php

mywp.developer.module.mywp.error.php in My WP Customize Admin/Frontend 1.8, at developer/modules/mywp.developer.module.mywp.error.php

87 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 if( ! class_exists( 'MywpDeveloperAbstractModule' ) ) {
8 return false;
9 }
10
11 if ( ! class_exists( 'MywpDeveloperModuleMywpError' ) ) :
12
13 final class MywpDeveloperModuleMywpError extends MywpDeveloperAbstractModule {
14
15 static protected $id = 'mywp_error';
16
17 static protected $priority = 10;
18
19 public static function mywp_debug_renders( $debug_renders ) {
20
21 $debug_renders[ self::$id ] = array(
22 'debug_type' => 'mywp',
23 'title' => sprintf( '%s Error' , MYWP_NAME ),
24 );
25
26 return $debug_renders;
27
28 }
29
30 private static function get_errors() {
31
32 $errors = MywpApi::get_errors();
33
34 return $errors;
35
36 }
37
38 protected static function mywp_developer_debug() {
39
40 $errors = self::get_errors();
41
42 echo 'Mywp error = ';
43
44 if( empty( $errors ) ) {
45
46 return false;
47
48 }
49
50 foreach( $errors as $key => $val ) {
51
52 echo $val . "\n";
53
54 }
55
56 }
57
58 protected static function mywp_debug_render() {
59
60 $errors = self::get_errors();
61
62 if( empty( $errors ) ) {
63
64 printf( '<p>%s</p>' , __( 'No errors.' , 'my-wp' ) );
65
66 } else {
67
68 echo '<ul>';
69
70 foreach( $errors as $error ) {
71
72 printf( '<li>%s</li>' , $error );
73
74 }
75
76 echo '</ul>';
77
78 }
79
80 }
81
82 }
83
84 MywpDeveloperModuleMywpError::init();
85
86 endif;
87