Duplicate 'ajaxurl' variables
|Reported by:||r-a-y||Owned by:|
As I was looking into #4669, in bp-legacy, the 'ajaxurl' is outputted in 'bp_head':
The problem with that is the 'ajaxurl' variable is already defined in bp_core_add_ajax_url_js().
We could either:
- remove BP_Legacy::head_scripts()
- remove bp_core_add_ajax_url_js() and add a similar 'ajaxurl' function in bp-default's functions.php
- 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.