| @@ 1467-1475 (lines=9) @@ | ||
| 1464 | * Get the errors | |
| 1465 | * | |
| 1466 | */ | |
| 1467 | 	public function get_errors( $context = null ) { | |
| 1468 | ||
| 1469 | 		if ( ! empty( $context ) ) { | |
| 1470 | return isset( $this->errors[ $context ] ) ? $this->errors[ $context ] : array(); | |
| 1471 | } | |
| 1472 | ||
| 1473 | return $this->errors; | |
| 1474 | ||
| 1475 | } | |
| 1476 | ||
| 1477 | /** | |
| 1478 | * Add an error to the errors stack | |
| @@ 1526-1534 (lines=9) @@ | ||
| 1523 | * Get the warnings | |
| 1524 | * | |
| 1525 | */ | |
| 1526 | 	public function get_warnings( $context = null ) { | |
| 1527 | ||
| 1528 | 		if ( ! empty( $context ) ) { | |
| 1529 | return isset( $this->warnings[ $context ] ) ? $this->warnings[ $context ] : array(); | |
| 1530 | } | |
| 1531 | ||
| 1532 | return $this->warnings; | |
| 1533 | ||
| 1534 | } | |
| 1535 | ||
| 1536 | /** | |
| 1537 | * Add an warning to the warnings stack | |