I hereby claim:
- I am tbartels on github.
- I am thomfellow (https://keybase.io/thomfellow) on keybase.
- I have a public key ASCusBi6F7tk4AOwaPs8h3iPRr6QwJ6ORYjm05WxXCFqbwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
Plugin Name: Google Analytics for Wordpress Slashes Fix | |
Description: Strip slashes on the GAforWP plugin by Yoast to correctly avoid excess/infinite magic quotes. | |
Version: 0.1.0 | |
Author: Thomas Bartels <<a href="mailto:[email protected]">[email protected]</a>> | |
This plugin fixes the options for Yoast's 'google-analytics-for-wordpress' plugin | |
allowing for more complex content to be used in the form fields. Specifically it | |
will now be possible to put Javascript in the `gajsurl` field in order to use the |
<?php | |
// Force update our username (user_login) | |
global $wpdb; | |
// method 1 | |
#$sql = $wpdb->prepare("UPDATE {$wpdb->users} SET user_login = %s WHERE ID = %d", $user_email, $user_id); | |
#$wpdb->query($sql); | |
// method 2 | |
$wpdb->update($wpdb->users, array('user_login' => $user_email), array('ID' => $user_id)); |