PHP – Converting elements to actual values

You didn’t include value in your checkboxes you have: ‘<input type=”checkbox” name=”Num1[]” />’ . $Thing1->Product1 . “<br />”; Should be: ‘<input type=”checkbox” name=”Num1[]” value=”‘ . $Thing1->Product1 . ‘” />’ . $Thing1->Product1 . “<br />”;

changing option for all posts

In the option table image_default_link_type is the key for that setting. So you can change its value with filtering. Please see below example. add_filter( ‘option_image_default_link_type’, function () { return ‘file’; }); With this, file will be selected by default when you insert media attachment.