I'm trying to enqueue jQuery UI in a plugin under a class method. I have this so far:
class AV_Slider {
function slider_load_js(){
wp_register_script('jquery-ui-core', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js');
wp_enqueue_script('jquery-ui-core', array('jquery') );
wp_enqueue_script('av_slider_js', AV_SLIDER_BASE_URL . 'includes/js/av_slider.js', array( 'jquery' ));
}
function __construct(){
$this->hooks();
}
function hooks(){
add_action('wp_enqueue_scripts', 'slider_load_js');
}
And I get this error on the page:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'slider_load_js' not found or invalid function name
I'm not sure how __construct() works other than that it creates a new Simple XML object. I also tried adding the action add_action('wp_enqueue_scripts', 'slider_load_js'); after the function but this caused an error as well.
Any help?