Comments

colette’s picture

StatusFileSize
new3.28 KB

Preliminary patch.

colette’s picture

StatusFileSize
new3.28 KB

Preliminary patch.

colette’s picture

Anonymous’s picture

Status: Active » Needs work

It looks like there are a few changes in that patch that aren't related to microdata. I think you might need to git checkout again.

For the lines that are related to microdata, let's move them below the rest of the logic (right above the break) and add a comment. This comment should be broken at 80 characters, per the style guide. You will see a line at 80 characters in Komodo Edit.

// When Microdata module is enabled, it outputs field values in a machine readable form. However, this formatter is selected when users don't want the email address to be machine readable. Therefore, the microdata mapping should be unset for this formatter.
colette’s picture

StatusFileSize
new2.67 KB

Here's the cleaned up version of the patch.

Anonymous’s picture

+++ b/email.microdata.incundefined
@@ -0,0 +1,25 @@
+ * Microdata suggestions

This comment should say "Extended microdata integration for Email module."

Right now, there is only one hook, but we may add more.

+++ b/email.microdata.incundefined
@@ -0,0 +1,25 @@
+/**
+ * Suggest microdata terms to use for the email field type.
+ *
+ * This hook should only be used by the module that defines the field type.
+ *
+ * @return array
+ *   An array of suggested mappings, keyed as following:
+ *   $suggested_mappings[group][field_name][mapping scheme]

This comment should just say "Implements hook_microdata_suggestions()."

+++ b/email.moduleundefined
@@ -108,6 +109,12 @@ function email_field_formatter_view($object_type, $object, $field, $instance, $l
+        // When Microdata module is enabled, it outputs field values in a
+        // machine readable form. However, this formatter is selected when
+        // users don't want the email address to be machine readable.
+        // Therefore, the microdata mapping should be unset for this

I believe "Therefore," can move up a line (at least, it looks like it when I apply the patch and view it in Komodo IDE), which would reduce this from 5 lines to 4.

+++ b/email.moduleundefined
@@ -129,6 +136,12 @@ function email_field_formatter_view($object_type, $object, $field, $instance, $l
+      // When Microdata module is enabled, it outputs field values in a
+      // machine readable form. However, this formatter is selected when
+      // users don't want the email address to be machine readable.
+      // Therefore, the microdata mapping should be unset for this

This is the second instance of this comment, which I asked you to place. In looking at this, I realize it's a pretty big comment to duplicate. How about "Unset microdata. See comment above in email_contact."

colette’s picture

StatusFileSize
new2.21 KB

Here's the patch with the updated comments.

colette’s picture

StatusFileSize
new2.21 KB

I just realized the issue number was wrong, here's the new patch.

Anonymous’s picture

Status: Needs work » Closed (works as designed)

An issue has been created for this in the Email module, #1613346: Extending email field with microdata

Anonymous’s picture

Status: Closed (works as designed) » Closed (duplicate)