BP 1.2 : \"bp_filter_request is not defined\"
-
Hi, I have a problem here when loading a member page of my own component.
It says : “bp_filter_request is not defined”.
The (core) function bp_filter_request is called inside my custom ajax.js :
jQuery(document).ready( function() {
var j = jQuery;
/*load initial content*/
if ( j(‘div.classified3s’).length ) {
bp_filter_request( j.cookie(‘bp-classified3s-type’), j.cookie(‘bp-classified3s-filter’), ‘classified3s’, ‘div.classified3s’, j.cookie(‘bp-classified3s-page’), j.cookie(‘bp-classified3s-search-terms’) );
}
and the ajax.js file is loaded with this function :
function classified3s_add_js() {
global $bp;
if (bp_is_user_classified3s()) {
wp_enqueue_script( ‘bp-classified3s-ajax’, get_stylesheet_directory_uri() . ‘/classified3s/_inc/js/ajax.js’, array(‘dtheme-ajax-js’) );
}
}
add_action( ‘wp_print_scripts’, ‘classified3s_add_js’, 1 );
So I guess it should be workins as the function bp_filter_request is inside the file enqueued as ‘dtheme-ajax-js’.
Any idea ?
Thanks a lot !
- The topic ‘BP 1.2 : \"bp_filter_request is not defined\"’ is closed to new replies.