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 | |
| /** | |
| * Hook: um_admin_pre_save_field_to_form | |
| * | |
| * Type: filter | |
| * | |
| * Description: Change field data before save to form. | |
| * | |
| * @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/admin/core/class-admin-builder.php#L725 |
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 | |
| /** | |
| * Hook: um_render_field_type_{$type} | |
| * | |
| * Type: filter | |
| * | |
| * Description: Change admin form field layout by $type. | |
| * | |
| * @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/admin/core/class-admin-forms.php#L312 |
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 | |
| /** | |
| * Hook: um_admin_custom_login_metaboxes | |
| * | |
| * Type: action | |
| * | |
| * Description: Add custom metaboxes for the Login Form type. | |
| * | |
| * @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/admin/core/class-admin-metabox.php#L1040 |
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 | |
| /** | |
| * Hook: um_core_form_meta_all | |
| * | |
| * Type: filter | |
| * | |
| * Description: Extend UM forms meta keys. | |
| * | |
| * @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/class-config.php#L230 |
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 | |
| /** | |
| * Hook: um_login_form_button_one | |
| * | |
| * Type: filter | |
| * | |
| * Description: Change the Login Form primary button text. | |
| * | |
| * @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/um-actions-login.php#L358 |
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 | |
| /** | |
| * Hide unapproved members in the members directory for everybody. | |
| */ | |
| add_action( 'um_member_directory_before_query', function() { | |
| add_filter( 'um_user_permissions_filter', 'custom_disable_permission_can_edit_everyone' ); | |
| } ); | |
| function custom_disable_permission_can_edit_everyone( $permissions ) { | |
| $permissions['can_edit_everyone'] = 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 | |
| /** | |
| * Allow to upload vCard files via the "File Upload" field type. | |
| * Add this code to the file functions.php in the active theme directory. | |
| */ | |
| function um_add_vcard_file_types( $allowed_types ) { | |
| if( is_array( $allowed_types ) ) { | |
| $vcard_types = array( |
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 | |
| /** | |
| * Allow to upload video files via the "File Upload" field type. | |
| * Add this code to the file functions.php in the active theme directory. | |
| */ | |
| add_filter( 'um_allowed_file_types', 'um_add_video_file_types' ); | |
| add_filter( 'um_profile_field_filter_hook__file', 'um_profile_field_filter_hook__file_video', 101, 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 | |
| /** | |
| * Restricting Map Bounds and Zoom. | |
| */ | |
| add_action( 'wp_footer', function () { | |
| ?><script type="text/javascript"> | |
| function um_user_locations_customize_03 ( args, hash, directory ) { | |
| args.center = { |
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 | |
| /** | |
| * Restrict registration for under 18 years old. | |
| * | |
| * @param array $args Form Arguments. | |
| */ | |
| function um_custom_validate_birth_date( $args ) { | |
| if ( ! empty( $args['birth_date'] ) ) { | |
| // Birth date as a Unix timestamp. |