Hello,
I have been working on a project with quotes on WHMCS. Now a new requirement has come up and I have come up with a solution for it. But i am stuck now at a page. I have been relying on the hooks mainly for this project.
In order to write custom jquery code in admin area pages i generally use in this format :
add_hook('AdminAreaPage', 1, function($vars) {
$jquery_code = $vars['jquerycode'];
$jquery_code .= ' $(document).ready(function(){
});';
$return = array();
$return['jquerycode'] = $jquery_code;
return $return;
});
This works on all pages,but somehow in this page domain.com/quotes.php?action=loadprod&id=xxx it is not working. I tried like this in the page :
add_hook('AdminAreaPage', 1, function($vars) {
if($_GET['action'] == 'loadprod'){
$jquery_code = $vars['jquerycode'];
$jquery_code .= ' $(document).ready(function(){ alert(); });';
$return = array();
$return['jquerycode'] = $jquery_code;
return $return;
}
});
Could someone guide me or help me through this ?
Thanks in advance