View wpum_rearrange_account_tabs.php
This file contains 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 my_wpum_rearrange_account_tabs( $tabs ) { | |
// Find the correct slug used in the URL, alter the priority | |
$tabs['email-subscriptions'] ['priority'] = 5; | |
return $tabs; | |
} | |
add_filter( 'wpum_get_account_page_tabs', 'my_wpum_rearrange_account_tabs', 100 ); |
View wpum_date_picker_format.php
This file contains 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_filter( 'wpum_field_datepicker_date_format', function (){ | |
return 'd-m-Y'; | |
}); |
View cover.php
This file contains 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 | |
/** | |
* The Template for displaying the profile cover. | |
*/ | |
// Exit if accessed directly | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
?> |
View wpum_cover.php
This file contains 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 | |
/** | |
* The Template for displaying the profile cover. | |
*/ | |
// Exit if accessed directly | |
if ( ! defined( 'ABSPATH' ) ) exit; |
View wpum_custom_field_regex_validation.php
This file contains 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_filter( 'submit_wpum_form_validate_fields', function ( $check, $fields, $values, $form_name ) { | |
foreach ( $fields as $group_key => $group_fields ) { | |
$field_key = 'wpum_field_33'; // Change this to be your unique field ID with wpum_ prefix | |
if ( ! isset( $values[ $group_key ][ $field_key ] ) ) { | |
return $check; | |
} |
View wpum_content_restriction_global_message.php
This file contains 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_filter( 'wpumcr_global_restriction_message', 'my_wpum_global_restriction_message' ); | |
function my_wpum_global_restriction_message( $restricted_global_message ) { | |
return 'This is message show for all restricted content unless the content has a specific restriction message.'; | |
} |
View wpum_content_restriction_function.php
This file contains 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_header(); | |
if ( wpum_can_access_restricted_content() ) : ?> | |
Some extra content in the template that is restricted as per the restriction settings of the page | |
<?php endif; ?> | |
<div> | |
<?php the_content(); ?> | |
</div> |
View wpum_alert_admin_user_field_change.php
This file contains 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_filter( 'account_page_form_fields', function ( $fields ) { | |
if ( ! wp_verify_nonce( $_POST['account_update_nonce'], 'verify_account_form' ) ) { | |
return $fields; | |
} | |
/** | |
* Changed this array to the field keys (wpum_ is the prefix) | |
*/ |
View wpum_remove_privacy_policy_registration_form.php
This file contains 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_filter( 'wpum_get_registration_fields', function ( $fields ) { | |
if ( isset( $fields['privacy'] ) ) { | |
unset( $fields['privacy'] ); | |
} | |
return $fields; | |
} ); |
View wpum_likes_wp_query_order.php
This file contains 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 | |
$args = array( | |
'post_status' => 'publish', | |
'post_type' => 'post', | |
'meta_key' => 'wpum_likes', | |
'orderby' => 'meta_value_num', | |
'order' => 'DESC' | |
); |
NewerOlder