Problem with meta box in Links
The hook you are after is edit_link (I couldn’t find any documentation). It’s fired from inside wp_insert_link (itself fired whenever a link is created or updated). The action only passes one argument, the link’s ID, to the callback. So you would need to change 2 to 1, on your add_action call: add_action( ‘edit_link’, ‘mytheme_save_data’, 10, … Read more