page.php
4 years ago
page_author_archive.php
4 years ago
page_date_archive.php
4 years ago
page_home.php
4 years ago
page_not_found.php
4 years ago
page_post_type_archive.php
4 years ago
page_search.php
4 years ago
page_singular.php
4 years ago
page_term_archive.php
4 years ago
referrer.php
4 years ago
page_not_found.php
75 lines
| 1 | <?php |
| 2 | |
| 3 | if (!class_exists('IAWP_Page_Not_Found')) { |
| 4 | class IAWP_Page_Not_Found extends IAWP_Page |
| 5 | { |
| 6 | private $not_found_url; |
| 7 | |
| 8 | public function __construct($row) |
| 9 | { |
| 10 | $this->not_found_url = $row->not_found_url; |
| 11 | parent::__construct($row); |
| 12 | } |
| 13 | |
| 14 | protected function resource_key(): string |
| 15 | { |
| 16 | return 'not_found_url'; |
| 17 | } |
| 18 | |
| 19 | protected function resource_value(): string |
| 20 | { |
| 21 | return $this->not_found_url; |
| 22 | } |
| 23 | |
| 24 | protected function calculate_is_deleted(): bool |
| 25 | { |
| 26 | return false; |
| 27 | } |
| 28 | |
| 29 | protected function calculate_url() |
| 30 | { |
| 31 | return site_url($this->not_found_url); |
| 32 | } |
| 33 | |
| 34 | protected function calculate_title() |
| 35 | { |
| 36 | return '404'; |
| 37 | } |
| 38 | |
| 39 | protected function calculate_type() |
| 40 | { |
| 41 | return 'not-found'; |
| 42 | } |
| 43 | |
| 44 | protected function calculate_type_label() |
| 45 | { |
| 46 | return '404'; |
| 47 | } |
| 48 | |
| 49 | protected function calculate_icon() |
| 50 | { |
| 51 | return '<span class="dashicons dashicons-warning"></span>'; |
| 52 | } |
| 53 | |
| 54 | protected function calculate_author_id() |
| 55 | { |
| 56 | return null; |
| 57 | } |
| 58 | |
| 59 | protected function calculate_author() |
| 60 | { |
| 61 | return null; |
| 62 | } |
| 63 | |
| 64 | protected function calculate_avatar() |
| 65 | { |
| 66 | return null; |
| 67 | } |
| 68 | |
| 69 | protected function calculate_date() |
| 70 | { |
| 71 | return null; |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 |