Making WordPress.org

Changeset 10937


Ignore:
Timestamp:
04/29/2021 10:07:27 PM (5 years ago)
Author:
coffee2code
Message:

Developer, Note Voting: Fix localization of data for JS use.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content-voting.php

    r7797 r10937  
    6565        // Only need to enqueue voting-related resources if there are comments to vote on.
    6666        if ( self::user_can_vote() && is_singular() && '0' != get_comments_number() ) {
    67             wp_register_script( 'wporg-developer-user-notes-voting', get_template_directory_uri() . '/js/user-notes-voting.js', array( 'wp-a11y' ), '20180606', true );
    68             wp_localize_script( 'wporg-developer-user-notes-voting', 'ajaxurl', admin_url( 'admin-ajax.php' ) );
     67            wp_register_script( 'wporg-developer-user-notes-voting', get_template_directory_uri() . '/js/user-notes-voting.js', array( 'wp-a11y' ), '20210428', true );
     68            wp_localize_script( 'wporg-developer-user-notes-voting', 'wporg_note_voting', array(
     69                'ajaxurl' => admin_url( 'admin-ajax.php' ),
     70            ) );
    6971            wp_enqueue_script( 'wporg-developer-user-notes-voting' );
    7072        }
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes-voting.js

    r7276 r10937  
    1212
    1313        $.post(
    14             ajaxurl,
     14            wporg_note_voting.ajaxurl,
    1515            {
    1616                action:   'note_vote',
Note: See TracChangeset for help on using the changeset viewer.