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 | |
| /** | |
| * Outputs Social Media Icons. | |
| */ | |
| if ( ! function_exists( 'um_theme_social_menu' ) ) { | |
| function um_theme_social_menu() { | |
| global $defaults; |
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 | |
| // Update the role configuration for existing subscriptions when the related product-subscription is updated. | |
| if ( is_plugin_active( 'um-woocommerce/um-woocommerce.php' ) && function_exists( 'wcs_get_subscription' ) ) { | |
| add_action( 'save_post', 'um_woo_product_settings_to_subscriptions', 20, 2 ); | |
| } | |
| /** | |
| * Updates saved role settings in existing subscriptions using the product's role settings. | |
| * |
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 | |
| /** | |
| * Change the user location field value. Save only a city. | |
| */ | |
| add_action( 'wp_footer', function () { | |
| ?><script type="text/javascript"> | |
| var currentLocationField; | |
| jQuery( '.um_user_location_g_autocomplete' ).on( 'click', function() { | |
| currentLocationField = this; |
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 | |
| /** | |
| * Template for the UM Private Messages. | |
| * Used on the "Profile" page, "Messages" tab. Display single conversation. | |
| * | |
| * This file overrides the /wp-content/plugins/um-messaging/templates/conversation.php template. | |
| * | |
| * @see https://docs.ultimatemember.com/article/1516-templates-map | |
| * @package um_ext\um_messaging\templates | |
| * @version 2.4.3 |
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 | |
| /** | |
| * Defer scripts of the "Ultimate Member - User Locations" extension. | |
| * | |
| * @link https://developer.wordpress.org/reference/classes/wp_scripts/add_data/ | |
| * @global WP_Scripts $wp_scripts | |
| */ | |
| function um_user_locations_alter_scripts() { | |
| global $wp_scripts; |
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 | |
| // Sort member directory filter options by values. | |
| add_filter( 'um_member_directory_filter_select_options_sorted', function( $options, $attrs ) { | |
| asort( $options ); | |
| return $options; | |
| }, 10, 2 ); |
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 | |
| // Delete private messages after 6 months. | |
| add_action( 'um_daily_scheduled_events', 'um_messaging_autodelete' ); | |
| function um_messaging_autodelete() { | |
| global $wpdb; | |
| $timestamp = strtotime( '6 months ago'); | |
| $sql = $wpdb->prepare( |
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 custom email notifications. | |
| add_filter( 'um_email_notifications', 'onemec_email_notifications', 10, 1 ); | |
| // Call action when a new Job is published. | |
| add_action( 'jb_job_published', 'onemec_job_submitted', 10, 2 ); | |
| /** | |
| * Extend Ultimate Member email notifications. |
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 | |
| // apply shortcodes in the "Content Block" field. | |
| add_filter( 'um_get_field_block', function( $data ) { | |
| if ( array_key_exists( 'content', $data ) ) { | |
| $data['content'] = apply_shortcodes( $data['content'] ); | |
| } | |
| return $data; | |
| } ); |
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 a new real-time notification type 'new_photo_comment'. | |
| * | |
| * @param array $array Notification types. | |
| * @return array | |
| */ | |
| function um_user_photos_add_notification_type( $array ) { | |
| $array['new_photo_comment'] = array( |
NewerOlder