Making WordPress.org

Changeset 1404


Ignore:
Timestamp:
03/16/2015 09:29:39 PM (11 years ago)
Author:
iandunn
Message:

Central Theme: Store all input variables together rather than individually.

More properties will be added soon, and having a single object will be cleaner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/js/central.js

    r1107 r1404  
    22
    33    // templateOptions is copied from Core in order to avoid an extra HTTP request just to get wp.template
    4     var ajaxURL,
     4    var options,
    55        templateOptions = {
    66            evaluate:    /<#([\s\S]+?)#>/g,
     
    1212     * Initialization that runs as soon as this file has loaded
    1313     */
    14     function immediateInit( options ) {
    15         ajaxURL = options.ajaxURL;
     14    function immediateInit( initOptions ) {
     15        options = initOptions;
    1616
    1717        toggleNavigation();
     
    6767    function populateLatestTweets() {
    6868        $.getJSON(
    69             ajaxURL,
     69            options.ajaxURL,
    7070            { action: 'get_latest_wordcamp_tweets' },
    7171            function( response ) {
Note: See TracChangeset for help on using the changeset viewer.