admin_url( 'admin-ajax.php' ), 'token' => wp_create_nonce( 'mycred-link-points' ) ) ); wp_enqueue_script( 'essb-mycred-link-points' ); } public static function generate_mycred_datatoken() { $group = ESSBGlobalSettings::$mycred_group; $points = ESSBGlobalSettings::$mycred_points; $salt = mt_rand (); $result = ""; if (function_exists('mycred_create_token')) { if ($points == "") { $points = "1"; } if ($group == "") { $group = "mycred_default"; } $result = mycred_create_token( array( $points, $group, $salt ) ); if ($result != '') { $result = ' data-token="' . $result . '" data-type="'.$group.'"'; } } return $result; } } ?>