-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Adding more hooks & filters to settings and widget html output. #291
Comments
For now I'm just doing this to load my own custom "Elementor Widget" which is a copy of your image-carousel widget. I had to register my own fake control because the frontend elementor clears all the registered page scripts. So unable to use normal wp_enqueue stuff.
and my control dtbaker.php file:
|
Hi @dtbaker If you have any idea please share us.. We need some good references to learn what is the best way to do this. By the way, I don't have any idea how you can change the HTML markup by your theme. I have two ways to do this, but I don't very like this:
Do you have more ideas for this? |
Here is an example of using the three filters added in #361 This adds two new dropdowns to the "Image Carousel" widget and modifies the rendered HTML based on these dropdown options.
Here's a quick video of how I used these filters to apply new wrapper CSS classes and modify the default HTML layout with great success: |
I would recommend to create a factory class for all Widgets and the factory class have generic hooks. So for example:
|
@owiekindisch this can be added to the existing base/factory class for all widgets: base.php |
Any update on this? The hooks is very important for theme developers. |
A suggestion, since Elementor package comes with Namespace, how about tutorial / guide to autoload class? |
I'm looking at the code and looks like via I mean, for me it seems strange given that there is already an OO interface having to deal with the plugin via hooks; obviously both approaches are not exclusive but I think that it makes more sense that the main way of interacting with the plugin to be the POPO API. Please look at Carbon Fields, I find it to be a good reference for a developer friendly plugin. |
We published our Developer API so please continue there.. |
@dtbaker "Adding a custom button class with theme filters:" is there any documentation about this, this is exactly what I wanna do.. |
Hi, how i can modify widget output??? |
"We published our Developer API so please continue there.." (And could you please increase the output of results?! - I repeatedly freak out when I just want to have a look at all the available Classes, Methods, Hooks etc and it shows me only 20 per page with 20+ pages to go. Why would you do that with only text content?) |
Hey guys,
Great plugin! I'd love to use this in our next ThemeForest theme instead of Visual Composer.
A few more do_action() and apply_filters() through the code would be wonderful!
I need some extra hooks and filters on the generated HTML output (e.g. adding some more markup to the default image-carousel HTML output or adding some more "controls" in the _register_controls function).
If you're happy to accept pull requests I'd be happy to make a couple of suggestions that would make it easier for us to integrate more tightly with our themes.
Cheers,
Dave
The text was updated successfully, but these errors were encountered: