This file contains 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 | |
function admin_footer_script_tes() { | |
?> | |
<script type="text/javascript"> | |
jQuery(function($){ | |
$(document).on( 'click', 'button.ld-node-header__points-form-toggle.ld-button-reset', function( e ){ | |
$(".ld-node-header__points-form .ld-question-points") | |
.before( '<input type="number" min="0" name="points_neg" class="ld-question-points points_neg" value="1"> Negative Points' ); |
This file contains 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
function test_redirect($query) | |
{ | |
if( is_user_logged_in() ) { | |
$userid = get_current_user_id(); | |
$user = wp_get_current_user(); | |
$original_id = $user->data->ID; | |
$roles = ( array ) $user->roles; | |
} | |
This file contains 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
async function lookupEmailFromWP(wpUrl, nationalRegisterId) { | |
const axios = require('axios'); | |
const url = `${wpUrl}/wp-json/avia/v1/user/ssn?ssn=${nationalRegisterId}`; | |
const response = await axios.get(url); | |
const data = response.data; | |
if (Array.isArray(data) && data.length === 1) return data[0].user_email; | |
else return null | |
} |
OlderNewer