Skip to content

Instantly share code, notes, and snippets.

View mcknightd's full-sized avatar

David McKnight mcknightd

  • Fosforus
  • Austin, Texas
View GitHub Profile
@champsupertramp
champsupertramp / Ultimate Member 2.1 - Add search & reset buttons in member directory
Last active April 28, 2024 02:34
Ultimate Member 2.1 - Add search & reset buttons in member directory
<?php
add_action("um_members_directory_head","um_custom_members_directory_head",10, 1 );
function um_custom_members_directory_head( $args )
{
?>
<div class="um-search-submit" style="margin:auto;width:50%;">
<div style="width: 40%;float:left;margin:10px;text-align:center;">
<a href="#" class="um-button um-do-search" ><?php _e("Search","ultimate-member"); ?></a>
</div>
@champsupertramp
champsupertramp / gist:d13302363caa36f2ae8a9281208d5b12
Last active February 14, 2023 14:37 — forked from ultimatemember/gist:5f725bff6bcf79d2988e
Ultimate Member 2.0 - Real-time notification - Add custom notification type
/*
This code sample shows you how to use the API to create
and add custom notifications (for real-time notifications)
plugin.
STEP 1: You need to extend the filter: um_notifications_core_log_types with your
new notification type as follows for example
*/
@ultimatemember
ultimatemember / gist:78aac8b268b2c75489f0
Last active August 21, 2024 18:17
Apply your own custom validation to a field
/*
In this code sample, you can learn how to apply custom
validations on any fields you want.
This can be done using these steps:
1. Edit the field in backend (field modal)
2. Where it asks for field validation choose "Custom"
3. Enter a unique validation action name e.g. my_8numbers