Skip to content

Instantly share code, notes, and snippets.

View nkb-bd's full-sized avatar

Lukman Nakib nkb-bd

View GitHub Profile
<?php
add_filter('fluentform_form_settings_smartcodes', function ($groups) {
$groups[0]['shortcodes']['{adrian_all_data}'] = 'Custom All Data';
return $groups;
});
add_filter('fluentform_shortcode_parser_callback_adrian_all_data', function ($return, $instance) {
$form = $instance::getForm();
<?php
/*
* Function to push a task for background processing
* @param: string $callbackName - Your classback acction name
* @param: mixed $payload - Your payload data that you will get when procssing on callback
*/
function my_custom_queue_on_background($callbackName, $payload)
{
@nkb-bd
nkb-bd / ff-user-list-filter.php
Created September 4, 2020 10:35
fluent form users list in dropdown input
/*
* 1. Add this in function.php file
* 2. Change form ID
* 3. Change input attribute name
*/
add_filter('fluenform_rendering_field_data_select', function ($data, $form) {
if ($form->id != 91) {
return $data;
}
<?php
/*
* Code snippet to make login form with Fluent Forms WordPress Plugins
* Steps:
* 1. make a form with email and password (Make sure the name attribute is 'email' and 'password' for corresponding field)
* 2. Paste the shorcode in a page
* 3. Change the form id in the bellow code (23) with your created fluentform's form id and paste in your theme's functions.php file
* 4. That's it
*
/*Change input border color when input is selected/focused */
.ff-el-form-control:focus {
border-color:red;
outline: none;
-webkit-box-shadow: 0 0 0 3px rgba(255, 0, 129, 0.25);
box-shadow: 0 0 0 3px rgba(255, 0, 129, 0.25);
}
@nkb-bd
nkb-bd / Codeigniter smtp email server
Created May 3, 2019 08:21 — forked from as3eem/Codeigniter smtp email server
email from localhost via smtp server on codeigniter
//Load email library
$this->load->library('email');
//SMTP & mail configuration
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'gmail_password',