Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/14/2019 05:37:11 AM (6 years ago)
Author:
imath
Message:

BP Nouveau: Improve Activity Post Form backcompat with legacy hooks

  • Make sure the bp_before_activity_post_form hook is fired inside the form tag.
  • Wrap action buttons and form options into the same container #whats-new-options.
  • Make sure the bp_activity_post_form_options is fired inside this container.

Fixes #8065

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/activity/functions.php

    r12283 r12358  
    44 *
    55 * @since 3.0.0
    6  * @version 3.1.0
     6 * @version 5.0.0
    77 */
    88
     
    6868        'user_id'     => bp_loggedin_user_id(),
    6969        'object'      => 'user',
    70         'backcompat'  => (bool) has_action( 'bp_activity_post_form_options' ),
     70        'backcompat'  => array(
     71            'before_post_form'  => (bool) has_action( 'bp_before_activity_post_form' ),
     72            'post_form_options' => (bool) has_action( 'bp_activity_post_form_options' ),
     73        ),
    7174        'post_nonce'  => wp_create_nonce( 'post_update', '_wpnonce_post_update' ),
    7275    );
Note: See TracChangeset for help on using the changeset viewer.