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

Bugfix for figure tag #842

Merged
merged 7 commits into from
Jul 7, 2016
Merged

Bugfix for figure tag #842

merged 7 commits into from
Jul 7, 2016

Conversation

derweili
Copy link
Collaborator

Wordpress adds a with attribute to every figure tag, breaking the whole
layout if the image width is wider than its conainer.
You can see this here: https://foundationpress.olefredrik.com/posts/post-with-an-image-and-caption

I added a filter to remove the width attribute

@derweili
Copy link
Collaborator Author

Before:
bildschirmfoto 2016-06-21 um 20 16 17

After:
bildschirmfoto 2016-06-21 um 20 16 00

Foundation adds a margin to the figure tag. That's why the large image isn't displayed in full-width.

@olefredrik
Copy link
Owner

Hi @derweili . Sorry for the late reply. I've been busy with other things for a while now. I'll review and test your PR as soon as I get the chance. Thanks for your contribution! :) Cheers!

@derweili
Copy link
Collaborator Author

derweili commented Jun 28, 2016

@olefredrik no problem. I just moved the add_filter method inside the foundationpress_start_cleanup function to match the structure of the cleanup.php file.

Now Travis CI throws errors inside files files i haven't changed.

@olefredrik
Copy link
Owner

@derweili : I have review and tested your pull request, and it works very well. There has been some changes to the wordpress coding standards package lately. I have merged a fix for the sniffing violations to the master branch.

I see there is still one error in your pull request , regarding whitespace at end of line. Can you fix this, so I can merge your pull request? Thanks! :)

@derweili
Copy link
Collaborator Author

derweili commented Jul 7, 2016

I removed the whitespace. Now Travis CI shouldn't throw any errors.

@olefredrik olefredrik merged commit 8f1afa1 into olefredrik:master Jul 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants