Skip to content

Commit

Permalink
UI: Add Follow link
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryJones committed May 24, 2024
1 parent 7d9693a commit d1cde64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/class-list-redirects.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -117,6 +120,11 @@ public function modify_list_row_actions( $actions, $post ) {
esc_url( $validate_link ),
'Validate'
),
'follow' => sprintf(
'<a href="%1$s" target="_blank">%2$s</a>',
$follow_home_domain . esc_url( $post->post_title ),
'Follow'
),
)
);
// Re-insert thrash link preserved from the default $actions.
Expand Down

0 comments on commit d1cde64

Please sign in to comment.