bp_activity_admin_edit_metabox_itemids

Primary item ID/Secondary item ID metabox for the Activity admin edit screen.

Description

bp_activity_admin_edit_metabox_itemids( (object) $item ); 

Parameters (1)

0. $item (object)
Activity item.

Usage

  1. if ( !function_exists( 'bp_activity_admin_edit_metabox_itemids' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-admin.php'; 
  3.  
  4. // Activity item. 
  5. $item = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_activity_admin_edit_metabox_itemids($item); 
  9.  

Defined (1)

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

/bp-activity/bp-activity-admin.php  
  1. function bp_activity_admin_edit_metabox_itemids( $item ) { 
  2. ?> 
  3.  
  4. <label for="bp-activities-primaryid"><?php _e( 'Primary Item ID', buddypress ); ?></label> 
  5. <input type="number" name="bp-activities-primaryid" id="bp-activities-primaryid" value="<?php echo esc_attr( $item->item_id ); ?>" min="0" /> 
  6. <br /> 
  7.  
  8. <label for="bp-activities-secondaryid"><?php _e( 'Secondary Item ID', buddypress ); ?></label> 
  9. <input type="number" name="bp-activities-secondaryid" id="bp-activities-secondaryid" value="<?php echo esc_attr( $item->secondary_item_id ); ?>" min="0" /> 
  10.  
  11. <p><?php _e( 'These identify the object that created this activity. For example, the fields could reference a pair of site and comment IDs.', buddypress ); ?></p> 
  12.  
  13. <?php