Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'mycred_front_enqueue', 'mycred_pro_enqueue_mycred_send' );
- function mycred_pro_enqueue_mycred_send() {
- if ( is_user_logged_in() && is_single() ) {
- $mycred = mycred();
- $base = array(
- 'ajaxurl' => admin_url( 'admin-ajax.php' ),
- 'token' => wp_create_nonce( 'mycred-send-points' )
- );
- $language = apply_filters( 'mycred_send_language', array(
- 'working' => esc_attr__( 'Processing...', 'mycred' ),
- 'done' => esc_attr__( 'Sent', 'mycred' ),
- 'error' => esc_attr__( 'Error - Try Again', 'mycred' )
- ) );
- wp_localize_script(
- 'mycred-send-points',
- 'myCREDsend',
- array_merge_recursive( $base, $language )
- );
- wp_enqueue_script( 'mycred-send-points' );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement