[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-nouveau/includes/xprofile/ -> functions.php (source)

   1  <?php
   2  /**
   3   * xProfile functions
   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   * Register Scripts for the xProfile component
  14   *
  15   * @since 3.0.0
  16   *
  17   * @param array $scripts The array of scripts to register
  18   *
  19   * @return array The same array with the specific groups scripts.
  20   */
  21  function bp_nouveau_xprofile_register_scripts( $scripts = array() ) {
  22      if ( ! isset( $scripts['bp-nouveau'] ) ) {
  23          return $scripts;
  24      }
  25  
  26      return array_merge( $scripts, array(
  27          'bp-nouveau-xprofile' => array(
  28              'file'         => 'js/buddypress-xprofile%s.js',
  29              'dependencies' => array( 'bp-nouveau' ),
  30              'footer'       => true,
  31          ),
  32      ) );
  33  }
  34  
  35  /**
  36   * Enqueue the xprofile scripts
  37   *
  38   * @since 3.0.0
  39   */
  40  function bp_nouveau_xprofile_enqueue_scripts() {
  41      if ( ! bp_is_user_profile_edit() && ! bp_is_register_page() ) {
  42          return;
  43      }
  44  
  45      wp_enqueue_script( 'bp-nouveau-xprofile' );
  46  }


Generated: Thu May 2 01:01:02 2024 Cross-referenced by PHPXref 0.7.1