Title: plugin_action_links handler trashes links array
Last modified: October 1, 2019

---

# plugin_action_links handler trashes links array

 *  Resolved [Jayce53](https://wordpress.org/support/users/jayce53/)
 * (@jayce53)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/plugin_action_links-handler-trashes-links-array/)
 * Your plugin_action_links filter handler “replace_plugin_edit_links()” in WPEditor.
   php (line 323) processes the input links array whether the call is related to
   your plugin or not. It initializes “$data” to an empty string and then later 
   uses this as though it was an array to hold the (possibly) processed links which
   it then returns. I suspect earlier versions of PHP did a type conversion for 
   you and masked the problem – the latest PHP does not type convert and you return
   a string instead of an array which trashes the links array for other plugins 
   that need it further down the filter chain.
 * The fix is simple… change the initialization of $data on line 324 from
    `$data
   = '';`
 * to
 * `$data = array();`

Viewing 1 replies (of 1 total)

 *  Plugin Author [feedmeastraycat](https://wordpress.org/support/users/feedmeastraycat/)
 * (@feedmeastraycat)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/plugin_action_links-handler-trashes-links-array/#post-11985387)
 * [@jayce53](https://wordpress.org/support/users/jayce53/) Hello. I think you are
   writing in the support forum for the wrong plugin. I think you are looking for
   [WP Editor](https://wordpress.org/plugins/wp-editor/), my plugin is called WP
   Editor Widget.
    -  This reply was modified 6 years, 8 months ago by [feedmeastraycat](https://wordpress.org/support/users/feedmeastraycat/).

Viewing 1 replies (of 1 total)

The topic ‘plugin_action_links handler trashes links array’ is closed to new replies.

 * ![](https://ps.w.org/wp-editor-widget/assets/icon-256x256.png?rev=980470)
 * [WP Editor Widget](https://wordpress.org/plugins/wp-editor-widget/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-editor-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-editor-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-editor-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-editor-widget/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [feedmeastraycat](https://wordpress.org/support/users/feedmeastraycat/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/plugin_action_links-handler-trashes-links-array/#post-11985387)
 * Status: resolved