Skip to:
Content

BuddyPress.org

Ticket #4761: 4761.01.patch

File 4761.01.patch, 1.1 KB (added by r-a-y, 11 years ago)

Revert to admin_url(), but use second parameter to define the scheme

  • bp-core/bp-core-cssjs.php

    function bp_core_add_cropper_inline_css() { 
    146146function bp_core_add_ajax_url_js() {
    147147?>
    148148
    149         <script type="text/javascript">var ajaxurl = '<?php echo network_site_url( '/wp-admin/admin-ajax.php' ); ?>';</script>
     149        <script type="text/javascript">var ajaxurl = "<?php echo admin_url( 'admin-ajax.php', is_ssl() ? 'admin' : 'http' ); ?>";</script>
    150150
    151151<?php
    152152}
  • bp-templates/bp-legacy/buddypress-functions.php

    class BP_Legacy extends BP_Theme_Compat { 
    290290
    291291                <script type="text/javascript" charset="utf-8">
    292292                        /* <![CDATA[ */
    293                         var ajaxurl = '<?php echo network_site_url( '/wp-admin/admin-ajax.php' ); ?>';
     293                        var ajaxurl = "<?php echo admin_url( 'admin-ajax.php', is_ssl() ? 'admin' : 'http' ); ?>";;
    294294                        /* ]]> */
    295295                </script>
    296296