ID ) { $enabled = get_post_meta( $post->ID, 'itsec_enable_ssl', true ); } $content = '
'; $content .= ' '; $content .= ''; $content .= '
'; echo $content; } /** * Save post meta for SSL selection * * @param int $id post id * * @return bool value of itsec_enable_ssl */ function save_post( $id ) { if ( isset( $_POST['itsec_admin_save_wp_nonce'] ) ) { if ( ! wp_verify_nonce( $_POST['itsec_admin_save_wp_nonce'], 'ITSEC_Admin_Save' ) ) { return $id; } if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return $id; } if ( ! current_user_can( 'edit_post', $id ) ) { return $id; } $itsec_enable_ssl = ( ( isset( $_POST['enable_ssl'] ) && $_POST['enable_ssl'] == true ) ? true : false ); if ( $itsec_enable_ssl ) { update_post_meta( $id, 'itsec_enable_ssl', true ); } else { delete_post_meta( $id, 'itsec_enable_ssl' ); } return $itsec_enable_ssl; } return false; } }