Skip to content

Commit

Permalink
Override WP default link rel
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Aug 1, 2024
1 parent 37e3e0d commit 8758af5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions includes/admin/feedzy-rss-feeds-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -1485,8 +1485,14 @@ private function run_job( $job, $max ) {
);

// Remove WordPress default link rel.
if ( isset( $item_link_data['attr']['rel'] ) ) {
add_filter( 'wp_targeted_link_rel', '__return_null' );
$link_rel = isset( $item_link_data['attr']['rel'] ) ? $item_link_data['attr']['rel'] : '';
if ( $link_rel ) {
add_filter(
'wp_targeted_link_rel',
function() use ( $link_rel ) {
return $link_rel;
}
);
}

$item_link_attr = isset( $item_link_data['attr'] ) ? $item_link_data['attr'] : array();
Expand Down

0 comments on commit 8758af5

Please sign in to comment.