_x( 'Type de badge', 'taxonomy general name' ),
'singular_name' => _x( 'Type de badge', 'taxonomy singular name' ),
'search_items' => __( 'Chercher un type de badge' ),
'all_items' => __( 'Tous les types de badge' ),
'parent_item' => __( 'Parent' ),
'parent_item_colon' => __( 'Parent :' ),
'edit_item' => __( 'Modifier le type de badge' ),
'update_item' => __( 'Sauvegarder le type de badge' ),
'add_new_item' => __( 'Ajouter un nouveau type de badge' ),
'new_item_name' => __( 'Nom du nouveau type' ),
'menu_name' => __( 'Type de badge' ),
);
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'badge-type' ),
);
register_taxonomy( 'badge_type', array( 'mycred_badge' ), $args );
}
/**
* Count all Registered Users.
*/
function count_all_my_users() {
global $wpdb;
$user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users" );
echo "{$user_count}";
}
/**
* Check if user has earned the Badge.
*/
function check_badge_status() {
// check if page visitor is logged_in or not
if ( is_user_logged_in() ) {
$user_id = get_current_user_id(); // get user_id of logged in visitor
$id = get_the_ID(); // get post_id
$value = get_metadata( 'user', $user_id, 'mycred_badge'.$id, true );
// check if the field has a value
if( ! empty( $value ) ) {
echo '
'; // earned add this
}
else {
echo '
'; // not earned add this
}
}
else {
echo '
'; // if visitor ins't logged_in add this
}
}
/**
* List all Badges based on their badge_type.
*/
function get_list_types_badges( $type ) {
global $post;
$args = array(
'order' => 'ASC', // ascending order, 1,2,3 (oldest post first)
'post_type' => 'mycred_badge', // search in the post type "mycred_badge"
'badge_type' => $type, // only list the badges assigned to the badge type entered
'post_status' => 'publish' // only list those who are publish, no drafts
);
$myposts = get_posts( $args );
echo '
Yo.
En carte or j’ai
shinnok niveau 24 attaque 4400 santé 5940
Raiden niveau 31 attaque 4627 santé 6993
Chapelier fou kung lao niveau 27 attaque 4032 santé 6400
Et coupe gorge niveau 27 attaque 3195 santé 4092
Carte argent
Johnny cage niveau 18 attaque 1404 santé 1848
Jax briggs niveau 19 attaque 1961 santé 2392
Sub zéros niveau 19 attaque 1184 santé 1748
Total kahn niveau 18 attaque 1692 santé 2095
Kenshi niveau 40 attaque 3127 santé 4488
cassie vage niveau 28 attaque 2464 santé 2432
scorpion niveau 36 attaque 2541 santé 3646
Ermac niveau 28 attaque 2576 santé 3392
Carte bronze
Soldat niveau 18 attaque 1036 santé 1144
Oni niveau 23 attaque 1947 santé 2748
Sergent niveau 20 attaque 1037 santé 1507
Saurien niveau 28 attaque 1546 santé 1946
Lin kuei niveau 27 attaque 1296 santé 2182
Osh tekk niveau 26 attaque 2130 santé 3078
Shirais ryu niveau 25 attaque 1003 santé 1075