BP_Nouveau_Search

search Loader class

Description

Source

File: bp-templates/bp-nouveau/includes/search/loader.php

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
class BP_Nouveau_Search {
    /**
     * Constructor
     *
     * @since BuddyPress 3.0.0
     */
    public function __construct() {
        $this->setup_globals();
        $this->includes();
        $this->setup_actions();
        $this->setup_filters();
    }
 
    /**
     * Globals
     *
     * @since BuddyPress 3.0.0
     */
    protected function setup_globals() {
        $this->dir = dirname( __FILE__ );
    }
 
    /**
     * Include needed files
     *
     * @since BuddyPress 3.0.0
     */
    protected function includes() {
        $dir = trailingslashit( $this->dir );
 
        require "{$dir}functions.php";
    }
 
    /**
     * Register do_action() hooks
     *
     * @since BuddyPress 3.0.0
     */
    protected function setup_actions() {
        add_action( 'bp_nouveau_enqueue_scripts', 'bp_nouveau_search_enqueue_scripts' );
 
        if ( function_exists( 'bp_is_messages_component' ) ) {
            // Include the autocomplete JS for composing a message.
            if ( bp_is_messages_component() && bp_is_current_action( 'compose' ) ) {
                add_action( 'wp_head', 'bp_nouveau_search_messages_autocomplete_init_jsblock' );
            }
        }
    }
 
    /**
     * Register add_filter() hooks
     *
     * @since BuddyPress 3.0.0
     */
    protected function setup_filters() {
        add_filter( 'bp_nouveau_register_scripts', 'bp_nouveau_search_register_scripts', 10, 1 );
    }
}

Changelog

Changelog
Version Description
BuddyPress 3.0.0 Introduced.

Methods

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.