Changeset 6826
- Timestamp:
- 03/01/2013 08:57:30 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-cssjs.php
r6809 r6826 138 138 139 139 /** 140 * bp_core_add_ajax_url_js()141 *142 140 * Adds AJAX target URL so themes can access the WordPress AJAX functionality. 143 141 * … … 147 145 ?> 148 146 149 <script type="text/javascript">var ajaxurl = '<?php echo network_site_url( '/wp-admin/admin-ajax.php'); ?>';</script>147 <script type="text/javascript">var ajaxurl = '<?php echo bp_core_ajax_url(); ?>';</script> 150 148 151 149 <?php 152 150 } 153 151 add_action( 'wp_head', 'bp_core_add_ajax_url_js' ); 152 153 /** 154 * Returns the proper value for BP's ajaxurl 155 * 156 * Designed to be sensitive to FORCE_SSL_ADMIN and non-standard multisite 157 * configurations. 158 * 159 * @since BuddyPress (1.7) 160 * 161 * @return string 162 */ 163 function bp_core_ajax_url() { 164 return apply_filters( 'bp_core_ajax_url', admin_url( 'admin-ajax.php', is_ssl() ? 'admin' : 'http' ) ); 165 }
Note: See TracChangeset
for help on using the changeset viewer.