Global Functions
Want a successful Modern site?
Start with IQRA training; it’s easy and quick to your needs.
By using this function you can fetch the Global data of the site.
Parametors
- Key (Required);
Key Names
- title (For Site Name)
- url (For Site URL)
- shortname (For Shortname)
- email (For Site Email)
- phone (For Site Phone)
- logo (For Site Logo)
- social_media (For Social Media (serialize) )
- maintenance (For Maintenance Mode (0-1))
- active_theme (For Active Themes)
- active_addons (For Active Addons)
- front_page (For Front Page (id))
- smtp_host (For SMTP Host)
- smtp_port (For SMTP Port)
- smtp_username (For SMTP username)
- smtp_password (For SMTP Password)
- Enter any custom Name (For Get Custom Site Options)
Note: You Can use return for return key and for echo use direct key;
example: return_title or title
How to use
site_options('return_keyname')
Use this function for Get Loggedin (current Loggedin User) Data .
Parametors
- Key (Required);
Key Names
- full_name (For Full Name)
- email (For Email)
- phone (For phone)
- password (For Password)
- featured_img (For User Profile Pic)
- Banner (For User Profile Banner Image)
- Status (For Status (0 - 1) )
- Role (For User Role )
- Enter any custom Key (For Get Custom User Data)
Note: You Can use return for return key and for echo use direct key;
example: return_key or key
How to use
loggedinuser('return_key')
Use this function to Get Site Url / Admin Url .
Parametors
- Key (required);
- targeturl (optional);
Key
- admin (For Admin Url)
- "" (Blank) (For site url)
- currentURL (For current url)
targeturl
- any targeted url.
How to use
site_url($url = null,$link = null)
Use this back function to redirect Site Url / Admin Url .
Parametors
- Key (required);
- targeturl (optional);
Key
- admin (For Redirect Admin url)
- "" or "/" (Blank) (For referred page redirect)
- reload (For reload current url)
targeturl
- any targeted url.
Note
- leave all parametors for redirect referred url.
How to use
back($redirect = null, $path = null)
// if you want to redirect referred url then use
back();
Use this function for Restrict area only for login users .
Parametors
- Key (required);
- role (optional);
Key
- "''" (For loggedin users can access this area)
- Logout (For loggedout users can access this area)
Role
- Role (Only this role can access this area)
How to use
loginonly($logout = null, $role=null);
// for loggedin users only
loginonly('')
// for logout users only
loginonly('logout')
- data
data
- url (target file ) (required)
-
location_path (save location ) (required)
-
rename_file (required)