-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Can a plugin override core functions? #1957
Comments
I think it is possible. Check e_parse.php addon files. |
No... I was wrong. It can be used only for extending toHtml() functionality. |
@lonalore Maybe i've expressed myself wrong. I'm thinking of globally override a core function, to replace the original sitewide, not only in the plugin.... |
Yes and no. There is is no generic function to override core methods but there are many things implemented which allow for a huge amount of customization. There are addons (such as As for changing the toGlyph method, I don't think this is possible. What kind of icons do you have in mind? In general, such type of code (icons) use either the EDIT: are you referring to SVG icons as discussed in #1958 ? |
Alright, then my answer above still stands :) I've updated it slightly. Regarding the SVG icons, we'll continue that discussion in the other issue. |
Maybe another workaround for the toGlyph would be to template the toGlyph hardcoded html.... |
Put that in the other issue haha 👍 |
For instance, is it possible to alter the function toGlyph at a plugin basis?
Let's say i want to use another icon fonts besides Glyphicons or Fontawesome globally, even with another tag output instead the only two alowed (span & i).
e107::getParser()->toGlyph('fa-user-times','fw=1')
Therefore i would need to redefine this core function at plugin (or module) basis.
Is it possible to do it?
The text was updated successfully, but these errors were encountered: