_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 '
Bon d’accord j’ai du dépensé au moins 300 packs pour l’avoir enfin mais je l’ai – et sans cheat à proprement parlé, juste un gros paquet d’âmes.
Il faut surtout regarder son niveau de profil. Si c’est moins de 30 disons, c’est un vrai cheat. Sinon, il peut l’avoir acquis raisonnablement ou, comme moi, en passant par des âmes moins chères.
Fondateur du site francophone MKXFan.org dédié au jeu Mortal Kombat X et à sa version iPhone.