[buddypress-trac] [BuddyPress] #4670: Duplicate 'ajaxurl' variables
buddypress-trac
noreply at wordpress.org
Sat Nov 17 09:34:14 UTC 2012
#4670: Duplicate 'ajaxurl' variables
--------------------------+-----------------
Reporter: r-a-y | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 1.7
Component: Core | Version: 1.7
Severity: minor | Keywords:
--------------------------+-----------------
As I was looking into #4669, in bp-legacy, the `'ajaxurl'` is outputted in
'bp_head':
https://buddypress.trac.wordpress.org/browser/trunk/bp-templates/bp-legacy
/buddypress-functions.php#L95
The problem with that is the `'ajaxurl'` variable is already defined in
`bp_core_add_ajax_url_js()`.
We could either:
1. remove `BP_Legacy::head_scripts()`
1. remove `bp_core_add_ajax_url_js()` and add a similar 'ajaxurl' function
in bp-default's functions.php
1. rename the head scripts hook in bp-legacy to use 'wp_head' instead of
'bp_head' - would result in duplicate 'ajaxurl' variables being outputted
when a theme other than bp-default is enabled
If we are going to stick with having the `head_scripts()` method in the
`BP_Legacy` class, I would rather see it in the parent `BP_Theme_Compat`
class instead so other theme packs like Turtleshell will not have to
define this in their own class unless they want to override it.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4670>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list