Skip to content

Commit

Permalink
Fix array merge
Browse files Browse the repository at this point in the history
Call array merge where $new_links is a valid array.
  • Loading branch information
ipokkel committed Nov 27, 2023
1 parent e91283f commit 0dcf6e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pmpro-limit-post-views.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ function pmpro_lpv_plugin_action_links( $links ) {
$new_links = array(
'<a href="' . get_admin_url( null, 'admin.php?page=pmpro-limitpostviews' ) . '">' . __( 'Settings', 'pmpro-limit-post-views' ) . '</a>',
);
array_merge( $new_links, $links );
}
return array_merge( $new_links, $links );
return $links;
}
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'pmpro_lpv_plugin_action_links' );

Expand Down

0 comments on commit 0dcf6e8

Please sign in to comment.