Add meta box to attachment

<?php

$hypbi_attachment_meta = new HypbiAttachmentMeta();

class HypbiAttachmentMeta{
public function __construct(){
add_filter('attachment_fields_to_edit',array($this,'add_image_meta_field'),null,2);
add_filter('attachment_fields_to_save',array($this,'save_image_meta_field'),null,2);
}
public function add_image_meta_field($form_fields,$post){
$form_fields['hypbi_option_code'] = array(
'label' => __('Build It Option Code'),
'value' => get_post_meta($post->ID,'_hypbi_option_code', true),
'helps' => __('Comma separated option code. For multiple options separate with pipe |'),
);
return $form_fields;
}
public function save_image_meta_field($post,$attachment){
if(isset($attachment['hypbi_option_code'])) update_post_meta($post['ID'],'_hypbi_option_code',$attachment['hypbi_option_code']);
return $post;
}
}

?>

No Index https, redirect https to http

RewriteEngine on

RewriteCond %{HTTPS} ^on$
RewriteCond %{REQUEST_URI} ^/robots.txt$
RewriteRule ^(.*)$ /robots-ssl.txt [L]

#this page has to be on https
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} ^/ssl.php$ [NC]
RewriteRule ^(.*)$ https://mydomain.com/$1 [L,R=301]

#all other pages have to be on http
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^/ssl.php$ [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]