From d1cde64bbba4eb4deb05e285da971ff2df36d405 Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Fri, 24 May 2024 21:18:31 +0100 Subject: [PATCH] UI: Add Follow link --- includes/class-list-redirects.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/class-list-redirects.php b/includes/class-list-redirects.php index d69f79d..e086693 100644 --- a/includes/class-list-redirects.php +++ b/includes/class-list-redirects.php @@ -108,6 +108,9 @@ public function modify_list_row_actions( $actions, $post ) { '_validate_redirect' ); + // We need to keep here a code legacy for how original urls have been saved in DB. + $follow_home_domain = Utils::get_home_domain_without_path(); + // Add the Validate Link. $actions = array_merge( $actions, @@ -117,6 +120,11 @@ public function modify_list_row_actions( $actions, $post ) { esc_url( $validate_link ), 'Validate' ), + 'follow' => sprintf( + '%2$s', + $follow_home_domain . esc_url( $post->post_title ), + 'Follow' + ), ) ); // Re-insert thrash link preserved from the default $actions.