Comments (11)
My proposal here: dev...UnderscoreTemplateEnqueuer
Completely untested...
from wcm-avatar.
@franz-josef-kaiser will hate me for this... but maybe sitting on top of wp_enqueue_script
is the wrong thing to do...
allow_url_fopen
to off
is a thing that make sense IMO, I would set it like that on my server, and doing that file_get_contents
with URL will fail anyway.
Surely we could use HTTP API, but honestly there should be a better approach...
from wcm-avatar.
So I gave this a short test run - seems like it's working as intended. Thanks again @Giuseppe-Mazzapica !
from wcm-avatar.
The more I think about it we probably can't easily get rid of going via the URL as we're sitting on top of wp_enqueue_script
.
The issue I mentioned probably can and should be fixed with properly configuring the Server...
Anyway I think we should be trying to get the file earlier in that method and do something more graceful than outputting empty templates and a bunch of Warnings.
from wcm-avatar.
@Giuseppe-Mazzapica It's just code and I am not married to it. Every input that makes things better or closes a gap is appreciated. Setting allow_url_fopen
to off
is a more than valid approach.
Added both labels now as I am not sure how to treat this and there are no alternatives so far. I need some time and brain to work on it, but currently I am mostly brain dead after work.
from wcm-avatar.
@kraftner can you elaborate this?
Reason why I'm asking is that I've just run into an issue while working on a dev site with a self-signed certificate where this fails as the server (somewhat ironically) isn't aware of his own self-signed certificate.
from wcm-avatar.
@Giuseppe-Mazzapica LGTM! Can you make that a PR?
from wcm-avatar.
@franz-josef-kaiser Did you take the time to test it? Maybe @kraftner can do it? Also, I think some love on code style is needed...
from wcm-avatar.
First of all: Thanks @Giuseppe-Mazzapica !
Okay so I gave this a quick look: First of all have you been too scared of the hate of @franz-josef-kaiser to stick with wp_enqueue_script
? 😉
Secondly I just pushed some changes to actually make that code run. 😉
from wcm-avatar.
The last reference above this message here is wrong. I merged the wrong branches (which is fixed and reverted).
from wcm-avatar.
already fixed by #46
from wcm-avatar.
Related Issues (20)
- Add better labels for GitHub
- Default/Fallback avatar HOT 1
- Reconsider positioning of UI on profile page HOT 3
- Disable Multi-Selection HOT 1
- Multi Uploader breaks when Upload fails HOT 3
- Helpers for common checks HOT 4
- Create *.pot file HOT 4
- Use correct text domain
- AvatarScriptsService lacks check for permissions HOT 1
- Make Plugin work for users without `upload_files` permission HOT 2
- Remove (apparently) unused AdminStylesService HOT 3
- Avatar Settings Page ends up weird HOT 3
- As a user who uploaded a custom avatar, I do not want to get fooled about using Gravatar HOT 6
- Uploader broken HOT 3
- AvatarBrowserUploaderSaveService breaks on non-english locale HOT 2
- AvatarMIMELimitService limits mime types for all uploads, but only for the browser-uploader HOT 3
- AvatarUploadSizeLimit only affects multi-uploader (plupload)
- AvatarBrowserUploaderSaveService nests errors one level to deep HOT 1
- AvatarDimensionLimitService and AvatarExistsLimitService only affect Multi-Uploader
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wcm-avatar.