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; | |
} ); |
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_unload_styles() { | |
wp_dequeue_style( 'wpum-frontend' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'wpum_unload_styles', 11 ); |
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_already_logged_in_links', function ( $links ) { | |
unset( $links['account'] ); // either profile, account, logout | |
return $links; | |
} ); |
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( 'template_include', function ( $template ) { | |
global $wp; | |
if ( ! isset( $wp->query_vars ) ) { | |
return $template; | |
} | |
if ( ! isset( $wp->query_vars['page_id'] ) ) { |
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_send_registration_user_email', function ( $check ) { | |
if ( isset( $_POST['action'] ) && 'createuser' === $_POST['action'] ) { | |
return false; | |
} | |
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 | |
/** | |
* Remove an object filter. | |
* | |
* @param string $tag Hook name. | |
* @param string $class Class name. Use 'Closure' for anonymous functions. | |
* @param string|void $method Method name. Leave empty for anonymous functions. | |
* @param string|int|void $priority Priority |