This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ public static function generate_commentdata( $commentdata ) {
130130 return array ();
131131 }
132132
133+ $ commentdata ['remote_source_mf2 ' ] = $ entry ;
133134 $ commentdata ['remote_source_properties ' ] = $ properties = array_filter ( self ::flatten_microformats ( $ entry ) );
134135 $ commentdata ['remote_source_rels ' ] = $ rels = $ mf_array ['rels ' ];
135136
@@ -158,6 +159,7 @@ public static function generate_commentdata( $commentdata ) {
158159 $ author = $ properties ['author ' ];
159160 } else {
160161 $ author = self ::get_representative_author ( $ mf_array , $ source );
162+ $ author = self ::flatten_microformats ( $ author );
161163 }
162164
163165 // if author is present use the informations for the comment
@@ -181,7 +183,7 @@ public static function generate_commentdata( $commentdata ) {
181183 $ properties ['author ' ]['me ' ] = $ author ['me ' ] = $ mf_array ['rels ' ]['me ' ];
182184 }
183185 }
184- if ( isset ( $ properties ['name ' ] ) ) {
186+ if ( isset ( $ author ['name ' ] ) ) {
185187 $ commentdata ['comment_author ' ] = wp_slash ( $ author ['name ' ] );
186188 }
187189
@@ -193,7 +195,7 @@ public static function generate_commentdata( $commentdata ) {
193195 $ commentdata ['comment_meta ' ]['semantic_linkbacks_author_url ' ] = $ author ['url ' ];
194196 }
195197
196- if ( isset ( $ properties ['photo ' ] ) ) {
198+ if ( isset ( $ author ['photo ' ] ) ) {
197199 $ commentdata ['comment_meta ' ]['semantic_linkbacks_avatar ' ] = $ author ['photo ' ];
198200 }
199201 }
Original file line number Diff line number Diff line change 5757
5858 < div class ="container ">
5959 < div class ="h-card twelve columns offset-by-two ">
60- < a class ="u-url u-uid " rel ="me author " href ="http://www. example.com/author/ ">
60+ < a class ="u-url u-uid " rel ="me author " href ="http://example.com/author/ ">
6161 < img class ="u-photo " src ="http://www.gravatar.com/avatar/64a4d7587e6e3db5b5ff8152b25eb1bc?s=420&d=mm&r=g " width ="80 ">
6262 </ a >
6363 < p class ="p-name "> Sandeep Shetty</ p >
You can’t perform that action at this time.
0 commit comments