michaeluno / admin-page-framework

Facilitates WordPress plugin and theme development.
http://admin-page-framework.michaeluno.jp/
Other
339 stars 71 forks source link

Export file has extra info #182

Closed baskettcase closed 9 years ago

baskettcase commented 9 years ago

Im not sure if Im doing something wrong, but when I create an export button I am getting extra content at the bottom of the file, stuff like this

<div id="wpfront-scroll-top-container"><img src="http://localhost/wp-content/plugins/wpfront-scroll-top/images/icons/58.png" alt="" /></div>

    <script type="text/javascript">if(typeof wpfront_scroll_top == "function") wpfront_scroll_top({"scroll_offset":100,"button_width":100,"button_height":25,"button_opacity":0.8,"button_fade_duration":200,"scroll_duration":400,"location":1,"marginX":20,"marginY":20,"hide_iframe":false,"auto_hide":false,"auto_hide_after":2});</script>

Any ideas of what I might be doing wrong? or if this is a bug?

michaeluno commented 9 years ago

Hi,

Does it occur with the export field of the demo plugin? You can try it by going to Dashboard -> Admin Page Framework -> Tool -> Minifier. (added in v3.4.6)

baskettcase commented 9 years ago

Ill have to try that out, I don't currently have the demo installed. I did try to update my version of the class to your latest version and then export didn't even work, so Im guessing Im doing something wrong :) Once Im able to get the plugin installed and tested Ill let you know.

baskettcase commented 9 years ago

Ok tested and yep that one has the extra data at the end of the file also. I see that you somehow removed the issue where you had the demo plugin installed and Im including the class in my plugin and they are working together.. no conflicts... nice!

michaeluno commented 9 years ago

Sounds like a plugin conflict. The injected code you posted above is not the one of Admin Page Framework. You may try disabling the other plugins.

I'd suspect the plugin that uses the repository slug wpfront-scroll-top.

baskettcase commented 9 years ago

Aha, ok thanks. You are right, now I need to figure out if the client is using that plugin and if we can disable it, or if I'll need to modify it :( Crazy that it is injecting :(

michaeluno commented 9 years ago

It looks like a plugin called WPFront Scroll Top and it has a setting named Hide on WP-ADMIN. Enable it and it should not inject the code.

baskettcase commented 9 years ago

Yep did that and it worked, sorry I should have followed up with that. I didn't expect you to go and research that for me. Thank you, that's waaay above and beyond! :) Again, excellent job in removing the conflict between the included admin framework class and then the one included in the demo. It was great to have both working without conflict!

michaeluno commented 9 years ago

Glad it helped!

The part causing the conflict is that they use the shutdown hook to insert their code. It is not something that can be changed on the framework side.