IQ Notices / Alerts
Want a successful Modern site?
Start with IQRA training; it’s easy and quick to your needs.
How to use Notices or Popups and Alerts in IQRA CMS.
IQRA CMS used 3 types of Notices
- Notice
- Alert
- Popup
-
IQ_add_admin_notice()
Parametors
- key (Required)
use IQ_add_admin_notice() where you want to display notices in admin Only.
2. Create Custom Notice
To Create Custom Notice you can also use IQ_admin_notice() function.
- IQ_admin_notice()
parametors
- title (required)
- status (optional) (error, success)
- url (optional)
Add Actions
- IQ_admin_'.$key.'_notice_show
- Global add action IQ_admin_notice_show
2. popup
- popupmsg()
alert($icon, $title, $desc, $footer =null, $footerlink = null)
- By IQ_notice()
Parametors
- Key (required)
- msg (required)
key
- Global key (success_notice)
- Global key for (frontend "success" "error")
- Global key (error_notice)
- key ( success_ $key _notice )
- key ( error_ $key _notice )
msg
- msg (Enter Text)
// example
IQ_notice( success_'.$key.'_notice , 'msg' )
// Global notice
IQ_notice(success_notice , 'msg')
2. By Session
$_SESSION['success_'.$key.'_notice'] = msg
// Global Notice
$_SESSION['success_notice'] = msg
2. Call Popup
popupmsg($title, $msg, $shortmsg = null, $footer = null, $footerlink = null);
// or via Session
$_SESSION['popup_'.$for] = $msg;
$_SESSION['popup_'.$for.'_msg'] = $shortmsg;
$_SESSION['popup_'.$for.'_footer'] = $footer;
$_SESSION['popup_'.$for.'_footerlink'] = $footerlink;
Call Your Own Custom Notice
function anyname(){
IQ_admin_notice($title, $status = null, $url = null)
}
add_action(IQ_admin_'.$key.'_notice_show , anyname)
// Global
add_action(IQ_admin_notice_show , anyname)
if you want to use own custom function follow these steps
function anyname(){
// use here own custom notice
}
add_action(IQ_admin_'.$key.'_notice_show , anyname)
// Global
add_action(IQ_admin_notice_show , anyname)