-
-
Save iqbalrony/8ef2017dcce9d35b2d9a6762a87e649c to your computer and use it in GitHub Desktop.
Elementor Widget category re-order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function add_elementor_widget_categories( $elements_manager ) { | |
$categories = []; | |
$categories['oceanic'] = | |
[ | |
'title' => 'Oceanic Widgets', | |
'icon' => 'fa fa-plug' | |
]; | |
$old_categories = $elements_manager->get_categories(); | |
$categories = array_merge($categories, $old_categories); | |
$set_categories = function ( $categories ) { | |
$this->categories = $categories; | |
}; | |
$set_categories->call( $elements_manager, $categories ); | |
} | |
add_action( 'elementor/elements/categories_registered', 'add_elementor_widget_categories') ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment