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

Stripping Image Classes #532

Closed
jsoningram opened this issue Oct 29, 2015 · 8 comments
Closed

Stripping Image Classes #532

jsoningram opened this issue Oct 29, 2015 · 8 comments
Labels

Comments

@jsoningram
Copy link

Hi Ole,

Thanks for the great work on FoundationPress.

In recreate_img_tag() you're only allowing alignment classes on images. Just curious why that is. I had an issue with a site I'm working on where I needed some extra classes applied to images but they were being stripped out.

Thanks again!

@phylaxis
Copy link

Why was this issue closed? I too have just encountered this issue. What's the fix? The issue is that this is stripping any Advanced Wordpress image options which means you cannot override or add classes or Titles to images in the Wordpress editor.

@jsoningram
Copy link
Author

I copied library/cleanup.php to my child theme and replaced the $allowed_classes array on line 174 with the following $allowed_classes = $class_segs; so all classes are left as is.

@Aetles
Copy link
Contributor

Aetles commented Nov 18, 2015

A lot of the stuff in library/cleanup.php (dare I say all of it) could be removed without causing much trouble (even solve some issues). Look through the functions and question which you actually need. A lot of it is quite old code by now.

@olefredrik
Copy link
Owner

After the last comment, it looks as if the whole library/cleanup.phpneeds an update. I'll go through the functions and see which ones are still necessary. I'll also take a fresh look at this specific issue.

@jhollo
Copy link

jhollo commented Feb 12, 2016

I'm still having the image alignment problem as well. WP 4.4.1. Not clear on the fixes above as cleanup has changed, maybe looking in the wrong place?

@phylaxis
Copy link

phylaxis commented Mar 6, 2016

Just to add to the list of issues with cleanup.php I was getting XML errors from Facebook avatar images brought in using the WP Social Login plug-in. This issue again was the Foundationpress_img_rebuilder class in the cleanup.php file. I had to comment out line 145 so that the filter in the get_avatar method was not run.

@olefredrik
Copy link
Owner

Fixed #657

@jhollo
Copy link

jhollo commented Mar 10, 2016

Fantastic.
working as expected now. thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants