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 | |
add_action( 'save_post', array($self, 'save_custom_fields'), 10, 3 ); | |
function save_custom_fields( $post_id, $post, $update) { | |
if ( $post->post_type != 'pfm_registration' ) { | |
return false; | |
} | |
if ( empty( $_POST['data'] ) ) { | |
return false; |
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 | |
add_action( 'init', array($self, 'remove_custom_fields_from_pfm_member' )); | |
function remove_custom_fields_from_pfm_member() | |
{ | |
remove_post_type_support( 'pfm_member', 'editor' ); | |
} |
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 | |
add_action( "admin_init", array($self, 'custom_meta_box') ); | |
function custom_meta_box() { | |
//add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args ); | |
add_meta_box( 'registration_form_fields','Registration Form Fields',array($this, 'display_registration_fields'),'pfm_registration', 'normal', 'low' ); | |
add_meta_box( 'notification_form', 'Notification Form',array($this, 'display_registration_notification'), 'pfm_registration', 'normal', 'high' ); | |
add_meta_box( 'pfm_shortcode_on_right', 'Shortcode', array($this, 'display_shortcode_form'), 'pfm_registration', 'side', 'core' ); | |
add_meta_box( 'member_list_on_pfm_member', 'Member List', array($this, 'display_member_list_on_pfm_member'), 'pfm_member', 'normal', '' ); | |
add_meta_box( 'member_details_on_pfm_member', 'Member Details', array($this, 'display_member_details_on_pfm_member'), 'pfm_member', 'normal', '' ); |
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
$('.delete-invoice').on('click', function(){ | |
$('body').data('open_invoice_id', $(this).data("invoice_no")); | |
swal({ | |
title: "Are you sure?", | |
text: "Credit note note will be placed!", | |
type: "warning", | |
showCancelButton: true, | |
confirmButtonColor: "#DD6B55", | |
confirmButtonText: "Yes, do it!", | |
closeOnConfirm: true, |
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
$('.mail-box-2').click(function(event){ | |
$('.modal_historique_id').val($(this).data("historique_id")); | |
}); | |
$('#historique_send').click( function(event){ | |
$.LoadingOverlay("show"); | |
var email = $('.historique-custom-input').val(); | |
// var historique_id = $("#envelope").data("historique_id") | |
var historique_id = $('.modal_historique_id').val(); |
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 | |
<!-- export --> | |
$users = get_users(); | |
$jsonString = json_encode($users); | |
$i = 1; | |
foreach ($users as $user) { | |
$user_meta = get_user_meta($user->id); | |
$imgArr = wp_get_attachment_image_src($user_meta['photo'][0]); | |
$data[$i]['profile_image'] = $imgArr[0]; | |
$data[$i]['user_login'] = $user->user_login; |
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
<html> | |
<body> | |
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/signature_pad.min.js"></script> | |
<div class="col-md-6 col-md-offset-3"> | |
<h2>Signature</h2><br> | |
<div class="wrapper"> | |
<canvas id="signature-pad" class="signature-pad" style="border: 1px solid #666; min-width: 500px; min-height: 400px"></canvas> |
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 | |
# Custom Post Type | |
function registration_post_types() | |
{ | |
$args = array( | |
'labels' => array( | |
'name' => __( 'Registrations' ), | |
'singular_name' => __( 'Registration' ) |
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 | |
get_site_url() // :http://courses.fiteducation.co.uk | |
get_template_directory_uri() // :http://courses.fiteducation.co.uk/wp-content/themes/x | |
get_stylesheet_directory_uri() // :http://courses.fiteducation.co.uk/wp-content/themes/x-child | |
get_stylesheet_uri() // :http://courses.fiteducation.co.uk/wp-content/themes/x-child/style.css | |
get_theme_root_uri() // :http://courses.fiteducation.co.uk/wp-content/themes | |
get_theme_root() // :/home/fiteducationco/public_html/courses/wp-content/themes | |
get_theme_roots() // :/themes | |
get_stylesheet_directory() // :/home/fiteducationco/public_html/courses/wp-content/themes/x-child |