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
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 | |
} |
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
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 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 | |
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 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
#!/bin/bash | |
echo "=================================================================" | |
echo "Awesome WordPress Installer!!" | |
echo "=================================================================" | |
# download WordPress core files | |
wp core download | |
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_filter( "learndash_settings_fields", "custom_learndash_settings_fields", 99, 2 ); | |
function custom_learndash_settings_fields( $fields, $metabox_key ) { | |
if( $metabox_key = "learndash-course-display-content-settings" ) { | |
$fields['course_materials_2'] = array( | |
'label' => 'Testing', | |
'name' => 'course_materials_2', | |
'type' => 'wpeditor', | |
'value' => $fields['course_materials_2'], | |
'default' => '', | |
'placeholder' => esc_html__( 'Add a list of needed documents or URLs. This field supports HTML.', 'learndash' ), |
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
/* | |
* Register Products CPT | |
*/ | |
if ( ! function_exists('register_cpt_products') ) { | |
// Register Custom Post Type | |
function register_cpt_products() { | |
$labels = array( | |
'name' => _x( 'Products','wooninjas' ), |
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 | |
defined('BASEPATH') or exit('No direct script access allowed'); | |
class Task extends CI_Controller | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
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 defined('BASEPATH') or exit('No direct script access allowed'); ?> | |
<!-- Main panel is starting from here --> | |
<div class="panel-header panel-header-sm"> | |
</div> | |
<style> | |
.card label { | |
font-size: unset; | |
margin-bottom: 0; |
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 | |
/** | |
* Shortcode get course total users number | |
* | |
* @since 2.1.0 | |
* | |
* @param array $atts shortcode attributes | |
* @return string course total users number | |
*/ |
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
$output = array( | |
0 => {value1 test {some text test} abc ksa dgsd}{value2 sadasdasdasd {some text more} xyz test unaib} | |
1 => value1 test | |
2 => some text test | |
3 => abc ksa dgsd | |
4 => value2 sadasdasdasd | |
5 => some text more | |
6 => xyz test unaib | |
) |
NewerOlder