themovation / th-widget-pack

Theme Widget Pack
19 stars 6 forks source link

Widget section position #164

Closed ryanlabelle closed 6 years ago

ryanlabelle commented 6 years ago

Hi @adiraomj , with the new release of Elementor 2, our custom widget section has been pushed down under the General Elements.

Video: https://cl.ly/2w0Z2O0K3S3C

Can we put it above the General Items?

I've already implemented their new action found here: https://developers.elementor.com/widget-categories/

but that only gets us under General. can we find a way to bump us back up?

I'm sure that you could hijack the function that prints out the widget sections.

Look for the init_categories() function inside elementor/includes/managers/elements.php - you can probably get ahold of $this->categories and resort the arrays if you wanted to.

Thanks!

adiraoco commented 6 years ago

Hey. I tried a few things. Could not get it working.

$categories is a private property so it cannot be accessed from outside the class. The elementor guys seem to have done this to prevent this very situation. They seem to be particular that their elements appear above any 3rd party ones.

ryanlabelle commented 6 years ago

No worries then. We can stay where we are for now. :) Thanks for looking into it. Please track your time and invoice us.