@@ 87-95 (lines=9) @@ | ||
84 | * |
|
85 | * @return array The array of errors. |
|
86 | */ |
|
87 | public function get_errors( $context = null ) { |
|
88 | ||
89 | // Only return a specific contexts errors. |
|
90 | if ( ! empty( $context ) ) { |
|
91 | return isset( $this->errors[ $context ] ) ? $this->errors[ $context ] : array(); |
|
92 | } |
|
93 | ||
94 | return $this->errors; |
|
95 | ||
96 | } |
|
97 | ||
98 | /** |
|
@@ 126-134 (lines=9) @@ | ||
123 | * |
|
124 | * @return array The array of warnings. |
|
125 | */ |
|
126 | public function get_warnings( $context = null ) { |
|
127 | ||
128 | // Only return a specific contexts errors. |
|
129 | if ( ! empty( $context ) ) { |
|
130 | return isset( $this->warnings[ $context ] ) ? $this->warnings[ $context ] : array(); |
|
131 | } |
|
132 | ||
133 | return $this->warnings; |
|
134 | ||
135 | } |
|
136 | ||
137 | /** |