This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CREAZIONE NUOVA PAGINA UTENTE E ATTRIBUZIONE DELLE CAPABILITIES | |
add_action('user_register', 'registration_newpage'); | |
function registration_newpage($user_id) { | |
$user_info = get_userdata($user_id); | |
$username = $user_info->user_login; | |
$post = array(); | |
$post['post_name'] = $username; // Il permalink della pagina |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @karibusana.org Funzione per indirizzare gli utenti a diversi negozi a seconda del loro gruppo di appartenenza | |
function karibusana_change_woocommerce_button_url() { | |
$user_id = get_current_user_id(); | |
$group = Groups_Group::read_by_name( 'Rivenditori' ); // Qui specifica il nome del gruppo per il quale eseguire il redirect | |
if ( Groups_User_Group::read( $user_id, $group->group_id ) ) { | |
$redirect_to = get_permalink( 1054 ); // inserisci qui l'id dela pagina rivenditori |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'gform_after_submission_1', 'karibusana_update_mycred_user_balance', 10, 2 ); // Change 1 with the form ID | |
function karibusana_update_mycred_user_balance ($entry, $form) { | |
// Change 23 to the ID of the form field you want | |
$orderID = rgar($entry, '23'); | |
$user_id = get_current_user_id(); | |
// switch to mycred_add if you want to add points instead of subtract | |
if (function_exists('mycred_subtract')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var checkboxHandler = { | |
//Change these IDs to match your form | |
checkboxFieldId: 'input_1_25', //checkbox container ID | |
outputFieldId: 'input_1_23', //hidden field to capture values | |
checkboxField: null, | |
outputField: null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add the following code to the functions.php code it will add a new column in the mycred_history with the user fisrt name and last name | |
function mycredpro_add_log_column( $columns ) { | |
// Add our own column | |
$columns['user-data'] = 'Utente'; | |
return $columns; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<option value="A001">ABANO TERME</option> | |
<option value="A004">ABBADIA CERRETO</option> | |
<option value="A005">ABBADIA LARIANA</option> | |
<option value="A006">ABBADIA SAN SALVATORE</option> | |
<option value="A007">ABBASANTA</option> | |
<option value="A008">ABBATEGGIO</option> | |
<option value="A010">ABBIATEGRASSO</option> | |
<option value="A012">ABETONE</option> | |
<option value="M376">ABETONE CUTIGLIANO</option> | |
<option value="A013">ABRIOLA</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$loop = new WP_Query( array( | |
'post_type' => 'Property', | |
'posts_per_page' => -1 | |
) | |
); | |
?> | |
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?> |