bp_activity_privacy_add_js

Load js files.

Description

bp_activity_privacy_add_js(); 

Usage

  1. if ( !function_exists( 'bp_activity_privacy_add_js' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-activity-privacy/includes/bp-activity-privacy-cssjs.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_activity_privacy_add_js(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/bp-activity-privacy-cssjs.php  
  1. function bp_activity_privacy_add_js() { 
  2. global $bp; 
  3.  
  4. wp_enqueue_script( 'jq-customselect-js', plugins_url( 'js/jquery.customSelect.js' , __FILE__ ), array(), false, true ); 
  5.  
  6. wp_enqueue_script( 'bp-activity-privacy-js', plugins_url( 'js/bp-activity-privacy.js' , __FILE__ ), array(), false, true ); 
  7.  
  8. $visibility_levels = array( 
  9. 'custom_selectbox' => bp_ap_is_use_custom_styled_selectbox(),  
  10. ); 
  11.  
  12. wp_localize_script( 'bp-activity-privacy-js', 'visibility_levels', $visibility_levels ); 
  13.