[buddypress-trac] [BuddyPress] #3622: bp_get_sitewide_activity_feed_link()

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon Sep 26 00:25:42 UTC 2011


#3622: bp_get_sitewide_activity_feed_link()
-------------------------------------+--------------------
 Reporter:  webraket                 |       Owner:
     Type:  defect                   |      Status:  new
 Priority:  normal                   |   Milestone:  1.5.1
Component:  Activity                 |     Version:  1.5
 Severity:  major                    |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+--------------------

Comment (by webraket):

 Now I also know why
 {{{
 add_action('wp_ajax_')
 }}}
 isn't working any more (since 1.5) when called from bp_init with the
 default priority.

 {{{
 function bp_core_add_ajax_hook() {
         // Theme only, we already have the wp_ajax_ hook firing in wp-
 admin
         if ( !defined( 'WP_ADMIN' ) && isset( $_REQUEST['action'] ) )
                 do_action( 'wp_ajax_' . $_REQUEST['action'] );
 }
 add_action( 'bp_init', 'bp_core_add_ajax_hook' );
 }}}

 /mu-plugins are loaded before /plugins, that's why BuddyPress loses the
 battle with the same priority.
 Isn't it better to always use priority's lower then the default(10) in the
 core?

 ''bp-core-hooks.php:''
 ~~add_action( 'init','bp_init' );~~
 add_action( 'init', 'bp_init', 9 );

 ''bp-core-functions.php:''
 ~~add_action( 'bp_init', 'bp_core_add_ajax_hook' );~~
 add_action( 'bp_init', 'bp_core_add_ajax_hook', 9 );

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3622#comment:12>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list