Hide Motion.Page from admin

Thought other people might find this helpful as I have seen a few people asking for "client mode" which I'm not 100% what they want but if you want to hide the motion.page admin from the menu at client handoff of a project. this will hide it for admin and non admin users. just add this function to your functions.php

// remove unnecessary admin menus (for admins and non-admins)
function hide_menu_items() {
  if( current_user_can( 'update_core' ) ):
    remove_menu_page( 'motionpage'); // MotionPage
  endif;
  if( !current_user_can( 'update_core' ) ):
    remove_menu_page( 'motionpage'); // MotionPage
  endif;
  }
add_action( 'admin_menu', 'hide_menu_items', 9999 );
1
1 reply