backend body id hook - is there a way ? - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8) +--- Thread: backend body id hook - is there a way ? (/showthread.php?tid=3664) |
backend body id hook - is there a way ? - yojoe - 2012-10-07 I'm looking for a way, to stylize contents of <div id="maincontent"> container, along with a horiz nav tab item in backend. I thought that <body <?php filename_id(); ?> > in admin's theme header adds a unique ID of the plugin automatically, but all plugins I've watched end up with <body id="load">. I assume there's a simple way to hook a value into <body> tag, but I can't find anything about that, and w/o it, I can't refer to backend's content containers css starting with #load , as other plugins pages will inherit those values. Does anyone have a working snippet maybe? backend body id hook - is there a way ? - Carlos - 2012-10-07 Not tested, but you may try using hook 'header', then in your function something like: Code: if (get_filename_id()=='load' && $_GET['id']=='your_plugin') { backend body id hook - is there a way ? - shawn_a - 2012-10-08 Hmm I've posted this somewhere Ill see ifbo can find it backend body id hook - is there a way ? - yojoe - 2012-10-08 Carlos Wrote:Not tested, but you may try using hook 'header', then in your function something like: Muchas gracias ! This should do, although I'll have to do a little bit of gymnastics in the code to achieve a flawless vict. I haven't found snippet that Shawn has mentioned, but if it is a more flexible solution, others will surely benefit from it. backend body id hook - is there a way ? - shawn_a - 2012-10-08 I think you can get the plugin pages with these globals, like this. This returns true if page is pages or edit for example, regardless of if its a plugin. Code: function tab_is_pages(){ |