← All changes
|
src/integrations/watchers/indexable-static-home-page-watcher.php
+6
-0
18.2
→
trunk
View file →
| @@ -43,8 +43,10 @@ | ||
| 43 | 43 | /** |
| 44 | 44 | * Initializes the integration. |
| 45 | 45 | * |
| 46 | 46 | * This is the place to register hooks and filters. |
| 47 | + * | |
| 48 | + * @return void | |
| 47 | 49 | */ |
| 48 | 50 | public function register_hooks() { |
| 49 | 51 | \add_action( 'update_option_page_on_front', [ $this, 'update_static_homepage_permalink' ], 10, 2 ); |
| 50 | 52 | } |
| @@ -53,8 +55,10 @@ | ||
| 53 | 55 | * Updates the new and previous homepage's permalink when the static home page is updated. |
| 54 | 56 | * |
| 55 | 57 | * @param string $old_value The previous homepage's ID. |
| 56 | 58 | * @param int $value The new homepage's ID. |
| 59 | + * | |
| 60 | + * @return void | |
| 57 | 61 | */ |
| 58 | 62 | public function update_static_homepage_permalink( $old_value, $value ) { |
| 59 | 63 | if ( \is_string( $old_value ) ) { |
| 60 | 64 | $old_value = (int) $old_value; |
| @@ -71,8 +75,10 @@ | ||
| 71 | 75 | /** |
| 72 | 76 | * Updates the permalink based on the selected homepage settings. |
| 73 | 77 | * |
| 74 | 78 | * @param int $page_id The page's id. |
| 79 | + * | |
| 80 | + * @return void | |
| 75 | 81 | */ |
| 76 | 82 | private function update_permalink_for_page( $page_id ) { |
| 77 | 83 | if ( $page_id === 0 ) { |
| 78 | 84 | return; |