Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #410 from alexpetroni/patch-1
Browse files Browse the repository at this point in the history
solve image aligment in posts
  • Loading branch information
olefredrik committed Aug 15, 2015
2 parents 90d5784 + 136c563 commit b96ba93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ public function recreate_img_tag( $tag ) {
'aligncenter',
);

if ( in_array( $class_segs[0], $allowed_classes ) ) {
$img .= ' class="' . $class_segs[0] . '"';
}
if ( $filtered_classes = array_intersect( $class_segs, $allowed_classes ) ) {
$img .= ' class="' . implode(' ', $filtered_classes) . '"';
}

// Finish up the img tag
$img .= ' />';
Expand Down

0 comments on commit b96ba93

Please sign in to comment.