This is not supported by AG Custom Admin, but it is a really nice idea, and we might support this in future, thanks.
If you want, you can add your custom code in ag-custom-admin/plugin.php inside function “print_admin_css”, but be aware that AGCA updates will overwrite this change, so make a backup before each update.
Thanks,
Argonius
Thread Starter
Bjedd
(@bjedd)
Thanks.I just want to add this code for a link to the WP Admin sidebar. I looked into the plugin.php and found: add_action(‘admin_head’, array(&$this,’print_admin_css’));
Sorry, I am not php savvy. How would I add this php snippet in? I have tried function, but I only get an error at line 86, $emember_auth=. I have placed it before the last );
<?php
$emember_auth = Emember_Auth::getInstance();
$user_id = $emember_auth->getUserInfo(‘member_id’);
if (!empty($user_id))
{
//User is logged in so add your conditional code here
$membership_level_resultset = $emember_auth->userInfo->primary_membership_level;
$home_page_url = $membership_level_resultset->loginredirect_page;
//Do something with this URL
}
?>
Thanks,
Bruce
I think you’re using some third party plugin for user membership. I really cannot help you with that. Please contact the support of that plugin.
To add your custom code to AGCA plugin.php, you can write your custom function like this:
function linkToWPAdminSidebar(){
//code
}
and to call it from constructor like this:
add_action('admin_head', array(&$this,'linkToWPAdminSidebar'));