PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
mycred
/
includes
/
shortcodes
<?php if ( ! defined( 'myCRED_VERSION' ) ) exit; /** * myCRED Shortcode: mycred_leaderboard_position * @see http://codex.mycred.me/shortcodes/mycred_leaderboard_position/ * Replaces the mycred_my_ranking shortcode. * @since 1.7 * @version 1.2 */ if ( ! function_exists( 'mycred_render_shortcode_leaderbaord_position' ) ) : function mycred_render_shortcode_leaderbaord_position( $atts, $content = '' ) { $args = shortcode_atts( array( 'user_id' => 'current', 'ctype' => MYCRED_DEFAULT_TYPE_KEY, 'type' => '', 'based_on' => 'balance', 'total' => 0, 'missing' => '-', 'suffix' => 0, 'timeframe' => '' ), $atts, MYCRED_SLUG . '_leaderboard_position' ); // Get the user ID we need a position for $user_id = mycred_get_user_id( $args['user_id'] ); // Backwards comp. if ( $args['type'] == '' ) $args['type'] = $args['ctype']; // Construct the leaderboard class $leaderboard = mycred_get_leaderboard( $args ); // Query the users position $position = $leaderboard->get_users_current_position( $user_id, $missing ); if ( $position != $missing && $suffix == 1 ) $position = mycred_ordinal_suffix( $position, true ); return $position; } endif; add_shortcode( MYCRED_SLUG . '_leaderboard_position', 'mycred_render_shortcode_leaderbaord_position' );
[+]
..
[-] mycred_hook_table.php
[edit]
[-] mycred_my_balance_converted.php
[edit]
[-] mycred_exchange.php
[edit]
[-] mycred_send.php
[edit]
[-] mycred_leaderboard.php
[edit]
[-] mycred_history.php
[edit]
[-] mycred_affiliate_id.php
[edit]
[-] mycred_best_user.php
[edit]
[-] index.php
[edit]
[-] mycred_my_balance.php
[edit]
[-] mycred_total_points.php
[edit]
[-] mycred_show_if.php
[edit]
[-] .shortcodes.php
[edit]
[-] mycred_affiliate_link.php
[edit]
[-] mycred_total_balance.php
[edit]
[-] mycred_video.php
[edit]
[-] mycred_link.php
[edit]
[-] mycred_give.php
[edit]
[-] mycred_total_since.php
[edit]
[-] mycred_leaderboard_position.php
[edit]
[-] mycred_hide_if.php
[edit]