Making WordPress.org


Ignore:
Timestamp:
02/11/2021 05:07:19 AM (5 years ago)
Author:
dd32
Message:

Support Forums: Ajaxify the actions (spam/archive/approve) on views.

Props Clorith, dd32.
Fixes #1965.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php

    r10601 r10660  
    3232
    3333    wp_enqueue_script( 'wporg-support-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20181209', true );
    34     wp_enqueue_script( 'wporg-support-forums', get_template_directory_uri() . '/js/forums.js', array( 'jquery' ), '20200318', true );
     34    wp_enqueue_script( 'wporg-support-forums', get_template_directory_uri() . '/js/forums.js', array( 'jquery' ), '20210211', true );
     35
     36    wp_localize_script(
     37        'wporg-support-forums',
     38        'wporgSupport',
     39        array(
     40            'strings' => array(
     41                'approve'       => __( 'The approval status of this post has been changed.', 'wporg-forums' ),
     42                'spam'          => __( 'The spam status of this post has been changed.', 'wporg-forums' ),
     43                'archive'       => __( 'The archive status of this post has been changed.', 'wporg-forums' ),
     44                'action_failed' => __( 'Unable to complete the requested action, please try again.', 'wporg-forums' ),
     45            ),
     46        )
     47    );
    3548}
    3649add_action( 'wp_enqueue_scripts', 'wporg_support_scripts' );
Note: See TracChangeset for help on using the changeset viewer.