Skip to content

Instantly share code, notes, and snippets.

View askaryabbas's full-sized avatar
🏠
Working from home

Askary Abbas askaryabbas

🏠
Working from home
  • Delhi, India
View GitHub Profile
add_filter( 'gform_validation', 'ask_custom_validation' );
function ask_custom_validation( $validation_result ) {
global $email, $wpdb;
$table_lead = $wpdb->prefix . 'rg_lead';
$table_lead_detail = $wpdb->prefix . 'rg_lead_detail';
// new gravity form
$rg = new RGFormsModel();
/**
* MyCred Monthly Payouts
* On the first page load on the first day of each month
* award 10 points to all users with the role "Subscriber".
* @version 1.0
*/
add_action( 'mycred_init', 'mycred_pro_monthly_payouts' );
function mycred_pro_monthly_payouts() {
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) return;