[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * BP Nouveau xProfile 4 * 5 * @since 3.0.0 6 * @version 3.0.0 7 */ 8 9 // Exit if accessed directly. 10 defined( 'ABSPATH' ) || exit; 11 12 /** 13 * xProfile Loader class 14 * 15 * @since 3.0.0 16 */ 17 class BP_Nouveau_xProfile { 18 /** 19 * Constructor 20 * 21 * @since 3.0.0 22 */ 23 public function __construct() { 24 $this->setup_globals(); 25 $this->includes(); 26 $this->setup_actions(); 27 $this->setup_filters(); 28 } 29 30 /** 31 * Globals 32 * 33 * @since 3.0.0 34 */ 35 protected function setup_globals() { 36 $this->dir = dirname( __FILE__ ); 37 } 38 39 /** 40 * Include needed files 41 * 42 * @since 3.0.0 43 */ 44 protected function includes() { 45 require( trailingslashit( $this->dir ) . 'functions.php' ); 46 require( trailingslashit( $this->dir ) . 'template-tags.php' ); 47 } 48 49 /** 50 * Register do_action() hooks 51 * 52 * @since 3.0.0 53 */ 54 protected function setup_actions() { 55 add_action( 'bp_nouveau_enqueue_scripts', 'bp_nouveau_xprofile_enqueue_scripts' ); 56 } 57 58 /** 59 * Register add_filter() hooks 60 * 61 * @since 3.0.0 62 */ 63 protected function setup_filters() { 64 add_filter( 'bp_nouveau_register_scripts', 'bp_nouveau_xprofile_register_scripts', 10, 1 ); 65 } 66 } 67 68 /** 69 * Launch the xProfile loader class. 70 * 71 * @since 3.0.0 72 */ 73 function bp_nouveau_xprofile( $bp_nouveau = null ) { 74 if ( is_null( $bp_nouveau ) ) { 75 return; 76 } 77 78 $bp_nouveau->xprofile = new BP_Nouveau_xProfile(); 79 } 80 add_action( 'bp_nouveau_includes', 'bp_nouveau_xprofile', 10, 1 );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:00:54 2024 | Cross-referenced by PHPXref 0.7.1 |