Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/16/2016 08:11:15 PM (9 years ago)
Author:
djpaul
Message:

BP-Legacy: remove redundant JS ajaxurl variable.

BuddyPress always prints this on every page in
bp_core_add_ajax_url_js, so doing it here again results in a
duplicate, and is useless.

Fixes #6136

Props slaFFik

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r10613 r10655  
    8787        add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_scripts'  ) ); // Enqueue theme JS
    8888        add_filter( 'bp_enqueue_scripts', array( $this, 'localize_scripts' ) ); // Enqueue theme script localization
    89         add_action( 'bp_head',            array( $this, 'head_scripts'     ) ); // Output some extra JS in the <head>.
    9089
    9190        /** Body no-js Class **************************************************/
     
    431430
    432431    /**
    433      * Put some scripts in the header, like AJAX url for wp-lists.
    434      *
    435      * @since 1.7.0
    436      */
    437     public function head_scripts() {
    438     ?>
    439 
    440         <script type="text/javascript">
    441             /* <![CDATA[ */
    442             var ajaxurl = '<?php echo bp_core_ajax_url(); ?>';
    443             /* ]]> */
    444         </script>
    445 
    446     <?php
    447     }
    448 
    449     /**
    450432     * Adds the no-js class to the body tag.
    451433     *
Note: See TracChangeset for help on using the changeset viewer.