Created
January 26, 2022 21:23
-
-
Save MogulChris/3a2d8a9888eedaabcf914f9736cad981 to your computer and use it in GitHub Desktop.
Filtering the 'Edit with Elementor' admin menu
This file contains hidden or 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 example_admin_bar_settings($settings){ | |
//print_r($settings); | |
foreach($settings['elementor_edit_page']['children'] as $id => $item){ | |
//$id is the post id, perform whatever checks you want | |
//if(get_post_type($id) == 'post_type_i_dont_want') unset($settings['elementor_edit_page']['children'][$id]); | |
} | |
return $settings; | |
} | |
add_filter('elementor/frontend/admin_bar/settings','example_admin_bar_settings'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment