geo.php
3 years ago
page.php
3 years ago
page_author_archive.php
3 years ago
page_date_archive.php
3 years ago
page_home.php
3 years ago
page_not_found.php
3 years ago
page_post_type_archive.php
3 years ago
page_search.php
3 years ago
page_singular.php
3 years ago
page_term_archive.php
3 years ago
referrer.php
3 years ago
visitor.php
3 years ago
page_home.php
93 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP; |
| 4 | |
| 5 | class Page_Home extends Page |
| 6 | { |
| 7 | public function __construct($row) |
| 8 | { |
| 9 | parent::__construct($row); |
| 10 | } |
| 11 | |
| 12 | protected function resource_key() |
| 13 | { |
| 14 | return null; |
| 15 | } |
| 16 | |
| 17 | protected function resource_value() |
| 18 | { |
| 19 | return null; |
| 20 | } |
| 21 | |
| 22 | protected function calculate_is_deleted(): bool |
| 23 | { |
| 24 | return false; |
| 25 | } |
| 26 | |
| 27 | protected function calculate_url() |
| 28 | { |
| 29 | $id = get_option('page_for_posts'); |
| 30 | |
| 31 | if ($id == 0) { |
| 32 | return get_home_url(); |
| 33 | } else { |
| 34 | return get_permalink($id); |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | protected function calculate_title() |
| 39 | { |
| 40 | $id = get_option('page_for_posts'); |
| 41 | |
| 42 | if ($id == 0) { |
| 43 | return esc_html__('Blog', 'iawp'); |
| 44 | } else { |
| 45 | return get_the_title($id); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | protected function calculate_type() |
| 50 | { |
| 51 | return 'blog-archive'; |
| 52 | } |
| 53 | |
| 54 | protected function calculate_type_label() |
| 55 | { |
| 56 | return esc_html__('Blog', 'iawp'); |
| 57 | } |
| 58 | |
| 59 | protected function calculate_icon() |
| 60 | { |
| 61 | if (get_option('page_on_front') == 0) { |
| 62 | return '<span class="dashicons dashicons-admin-home"></span>'; |
| 63 | } else { |
| 64 | return '<span class="dashicons dashicons-edit-large"></span>'; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | protected function calculate_author_id() |
| 69 | { |
| 70 | return null; |
| 71 | } |
| 72 | |
| 73 | protected function calculate_author() |
| 74 | { |
| 75 | return null; |
| 76 | } |
| 77 | |
| 78 | protected function calculate_avatar() |
| 79 | { |
| 80 | return null; |
| 81 | } |
| 82 | |
| 83 | protected function calculate_date() |
| 84 | { |
| 85 | return null; |
| 86 | } |
| 87 | |
| 88 | protected function calculate_category() |
| 89 | { |
| 90 | return null; |
| 91 | } |
| 92 | } |
| 93 |