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 ) { | |
if ( ! isset( $values['register']['user_firstname'] ) || empty( $values['register']['user_firstname'] ) ) { | |
return $check; | |
} | |
if ( ! isset( $values['register']['user_lastname'] ) || empty( $values['register']['user_lastname'] ) ) { | |
return $check; | |
} |
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'; | |
}); |
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; | |
} | |
?> |
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; | |
} |
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.'; | |
} |
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> |
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; | |
} ); |
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' | |
); |
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 wpum_profile_tabs_translation_mapping() { | |
// Translated to Slovenian, change to your language | |
return array( | |
'about' => 'priblizno', | |
'posts' => 'objave', | |
'comments' => 'komentarj', | |
); | |
} |
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_non_allowed_fields', function ( $fields ) { | |
if ( ( $key = array_search( 'user_nickname', $fields ) ) !== false ) { | |
unset( $fields[ $key ] ); | |
} | |
return $fields; | |
} ); |
NewerOlder