Skip to content

Instantly share code, notes, and snippets.

@AntonioRigo
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntonioRigo/b14eef9a821e565fcb41 to your computer and use it in GitHub Desktop.
Save AntonioRigo/b14eef9a821e565fcb41 to your computer and use it in GitHub Desktop.
Suscribirme a este sitio (wordpress multisite)
<?php
if (isset($_POST['suscribirme'])) {
$blog_id = get_current_blog_id();
$user_ID = get_current_user_id();
$role = 'subscriber';
add_user_to_blog($blog_id, $user_ID, $role);
}
?>
<form action="?suscribirme" method="post">
<input type="hidden" name="action" value="suscribirme">
<input type="submit" value="Suscribirme" name="suscribirme" id="suscribirme" class="button">
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment