Hey guys, so I'm working on a plugin which is a block. Just to get my feet in the water, I'm trying to make it so that my block displays one thing when the user has a certain capability (or is a certain user), and displays another if they are not.
In the first image I have attached, you can see how I am trying to do this in my block's main PHP file. Note that I have defined $context by searching for the database entry relative to my plugin, which has the ID# 52. Then if you look at the second photo, that is my access.php file and the thing you see written I've added. So how I've wanted it to work is, as you can see in photo 2, 'admin' is set to allow, however the code in photo 1 always ends up echoing false. Can someone tell me what I might be doing wrong? Also I have updated the version.php as well as upgrade.php to no avail.
Thanks in advance.