[Small bug fix] Save function
-
Hiya,
Thanks for the plugin.
I found a small bug in the code. Please find my fix included. Also, it would of course be good if some input validation was added to the save function….
File includes/class-add-links-to-pages.php
Find line 124:
add_post_meta($post_id, "altp_links_html", htmlentities( $_POST['altp_links_html'] ), true); update_post_meta($post_id, "altp_links_html", htmlentities( $_POST['altp_links_html'] ));
Replace with:
if( isset( $_POST['altp_links_html'] ) ) { if( add_post_meta($post_id, "altp_links_html", htmlentities( $_POST['altp_links_html'] ), true) === false ) { update_post_meta($post_id, "altp_links_html", htmlentities( $_POST['altp_links_html'] )); } }
Hope this helps.
Smile,
Juliette
- The topic ‘[Small bug fix] Save function’ is closed to new replies.