• phantomdentist

    (@phantomdentist)


    I wanted to learn some php, wordpress specific stuff and make something of some actual use as well.

    I understand functions, operators, arrays and most syntax but I’m not a coding wizz so be gentle in your replies, but not to delecate.

    This plugin removes the screen options and help tabs based on a users access level, 10 – 1. Its useful as I don’t always want clients messing about turning on stuff that they don’t need. The minimum access level to be allowed to see the screen/help options can be set on the plugins options oage

    All works fine.

    I need a better way to remove the screen options and help tabs. At the second I use javascript to hide them, but thats a bit of a bodge. The function that pops the tabs in is the screen_meta function thats in the wp-admin\includes\template.php file and its called in wp-admin\admin-header.php file. I know theres a wordpress function to remove actions, which I translate as meaning removing functions from wordpress hooks, correct?

    remove_action( 'hook', 'screen_meta');

    But I’m feeling a little beat up because I can’t find the right hook (hehe) or because as its a stock wordpress function, there isn’t one.

    Secondly I would be interested to know if anyone sees any obious screw ups, legacy code (un-needed or stupid)or security issues.

    Cheers

    edit:
    code removed as per the forum guidelines, please use https://wordpress.pastebin.ca

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘First plugin needs perfectng. Used remove screen options and help’ is closed to new replies.