Created
June 1, 2023 15:31
-
-
Save Alimir/926482f6a94904673fbafdbf101583a6 to your computer and use it in GitHub Desktop.
Disable statistics & vote logs in wp ulike
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 wp_ulike_pro_remove_admin_menus( $submenus ){ | |
if( is_array( $submenus ) ){ | |
if( isset( $submenus['statistics'] ) ){ | |
unset($submenus['statistics']); | |
} | |
if( isset( $submenus['posts_logs'] ) ){ | |
unset($submenus['posts_logs']); | |
} | |
if( isset( $submenus['comments_logs'] ) ){ | |
unset($submenus['comments_logs']); | |
} | |
if( isset( $submenus['topics_logs'] ) ){ | |
unset($submenus['topics_logs']); | |
} | |
if( isset( $submenus['activities_logs'] ) ){ | |
unset($submenus['activities_logs']); | |
} | |
} | |
return $submenus; | |
} | |
add_filter( 'wp_ulike_admin_pages', 'wp_ulike_pro_remove_admin_menus', 1, 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment