Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

#2607 closed enhancement (fixed)

[patch] Use wp_localize_script() to localise javascript strings

Reported by: djpaul's profile DJPaul Owned by:
Milestone: 1.2.6 Priority: normal
Severity: Version:
Component: Core Keywords: has-patch
Cc:

Description

Using wp_localize_script() improves upon the current behaviour of squirting out javascript variables with an wp_footer hook; may as well use the WordPress' methods for this rather than reinventing the wheel.

Attachments (2)

patch-2607.patch (9.0 KB) - added by DJPaul 14 years ago.
v1
patch-2607-2.patch (11.1 KB) - added by DJPaul 14 years ago.
v2

Download all attachments as: .zip

Change History (7)

@DJPaul
14 years ago

v1

#1 @johnjamesjacoby
14 years ago

Love it. Been meaning to attack that for months.

For php code comments, I'm trying to phpDoc the functions as I go, and change the in-function comments from block level to inline. Comments outside of functions should be phpDoc'ed as much as possible as we go, with a goal of 100% when we start ripping through 1.3.

Good work on this patch :)

#2 @paulhastings0
14 years ago

  • Summary changed from Use wp_localize_script() to localise javascript strings to [patch] Use wp_localize_script() to localise javascript strings

@DJPaul
14 years ago

v2

#3 @DJPaul
14 years ago

v2 adds phpDoc for the functions.

#4 @johnjamesjacoby
14 years ago

Super duper fly!

#5 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3227]) Fixes #2607. Super props Paul Gibbs.

Note: See TracTickets for help on using tickets.