How to detect which admin page the user is on? I would like to print out some JavaScript based on the page user is on. So is there a page with details of these? How to see the user is on the Write Post or Write Page or Add Link or Add Category or well... basically each page. Is there any little tricks that I could use in PHP to print out JavaScript based on the page user is on?
Thanks for your time
I'd suggest taking a look at the pages themselves since the page is already marked by the system (view the dashboard with css styles turned off and you'll see that it is showing that info already. Editing the source files themselves will allow you to add the code you want.
lunabyte
Member
Posted 17 years ago #
Checking the server var for request_uri is an option.
You could plug into the admin footer function and make it work without hacks.
Yes, lunabyte that's what I wanted to do. I'm going to plug into admin_footer but I want to know what page the user is.
lunabyte
Member
Posted 17 years ago #
Checking the server var for request_uri is an option.
Checking the server var for request_uri is an option.
Checking the server var for request_uri is an option.
Checking the server var for request_uri is an option.
Thanks all
I found this
if ('link-add.php' == basename($_SERVER['SCRIPT_FILENAME']))
could do this for any pages in WordPress