Giter Site home page Giter Site logo

Comments (11)

gmazzap avatar gmazzap commented on August 11, 2024 2

My proposal here: dev...UnderscoreTemplateEnqueuer

Completely untested...

from wcm-avatar.

gmazzap avatar gmazzap commented on August 11, 2024 1

@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.

kraftner avatar kraftner commented on August 11, 2024 1

So I gave this a short test run - seems like it's working as intended. Thanks again @Giuseppe-Mazzapica !

from wcm-avatar.

kraftner avatar kraftner commented on August 11, 2024

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.

franz-josef-kaiser avatar franz-josef-kaiser commented on August 11, 2024

@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.

franz-josef-kaiser avatar franz-josef-kaiser commented on August 11, 2024

@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.

franz-josef-kaiser avatar franz-josef-kaiser commented on August 11, 2024

@Giuseppe-Mazzapica LGTM! Can you make that a PR?

from wcm-avatar.

gmazzap avatar gmazzap commented on August 11, 2024

@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.

kraftner avatar kraftner commented on August 11, 2024

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.

franz-josef-kaiser avatar franz-josef-kaiser commented on August 11, 2024

The last reference above this message here is wrong. I merged the wrong branches (which is fixed and reverted).

from wcm-avatar.

kraftner avatar kraftner commented on August 11, 2024

already fixed by #46

from wcm-avatar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.