Looking at https://buddypress.trac.wordpress.org/browser/trunk/src/bp-activity/bp-activity-functions.php there’s several functions:
Activity Meta
I found bp_activity_add_meta
, bp_activity_delete_meta
and bp_activity_update_meta
in that file, e.g. bp_activity_update_meta
:
// Update activity meta counts.
if ( bp_activity_update_meta( $activity_id, 'favorite_count', $fav_count ) ) {
Activities
It looks like these can be updated the same way wp_insert_post
can be used to update a post, by calling bp_activity_add
with the updated information, and giving it an ID of the activity you want it to update
Activity Comments
That file also includes all comment related functions, but it looks like bp_activity_new_comment
works the same way as wp_insert_post
in that you can modify a comment by passing its ID
Related Posts:
- Add multiple custom fields to the general settings page
- When should you, and when should you not, use wp_list_pluck()?
- Display random categories on the front page (Finding and Editing Theme Functions)
- Is it possible to remove the “standard” post format?
- Woocommerce add to simple product attribute programmatically [closed]
- Issue with get_theme_mod returning a blank value instead of the saved value
- How to remove row-actions from pages table?
- How to display random users with avatars
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Modify search function in WordPress (TwentyTwelve)
- How to customize search result page title?
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- How to update WordPress and plugins at specific day and time in PHP?
- How to fix a theme with page.php Default Template that accidentally deleted?
- Removing Unnecessary Text from Admin Menu without CSS
- Set default options for inserting media
- Default or Preset Content for Custom Post Types
- change a post status when users update posts?
- Remove tag on my RSS Feed
- Display WordPress Search
- How do I change parameters without changing the core
- Problem with extract() with custom shortcode
- How to add a rel attribute to images that contains their categories?
- add sidebar area to header of child theme
- Preferred Use of home_url()?
- How to update BuddyPress xprofile fields programmatically? [closed]
- Custom function for user register in wp?
- Automatically insert php function into post $the_content
- How can I add an image field to BuddyPress Extended Profile Fields? [closed]
- Theme-Config tab in admin Pannel?
- Creating loop within functions.php
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Delete pages and Create default pages for all new network sites
- Actions according to image type and size
- Post thumbnail relative link and HTML modify
- Refactor create_function
- adding custom classes for tables
- Pass Shortcode Attribute to footer Script
- How to mass-delete inline styles in WordPress custom post type automatically?
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- How to call custom function from functions.php in site-wide template files?
- Customizer field value into functions.php variable
- PHP files included in functions.php don’t seem to work
- How Can I Expand the WordPress Customize window without any Plugin?
- Set quantity of woocommerce product on page visit [closed]
- wp_dropdown_categories and custom attribute
- str_replace function in theme
- Automatically wrap multiple images in div
- Ajax not working properly
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Right way to update widget on dynamic new input field
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Which action does wp_update_user triggers?
- Include default functions and methods
- How to limit character length in BuddyPress function output [closed]
- Hard-coding custom menu elements for menu manager
- Twentyten Child Theme: header images display messed up in admin panel
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- Allow Post Author to be 0 on Update
- How can I modify all existing tags while keeping the urls themselves?
- Best practices regarding the creation of custom widgets?
- IF Statement on Button to make it complete and “uncomplete” based on user action / click
- Gravity Forms Button Text
- Find resources dynamically loading and change or add to the url
- When sale price is 0.00 show only regular price
- Unable to login using username
- Word Press – Dynamic Content [closed]
- Insert image in WordPress with HTML5 tag and caption function
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- Move Custom Fields on General Settings Page to New Location
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- Update user meta of author when post content is viewed
- Has is_archived() for sites in a multisite changed with WP 4.7?
- Redirect to another page using contact form 7? [closed]
- different style sheet for just one page template
- How to set the default avatar of buddypress avatar [closed]
- Condition OR for current user ID
- How to retrieve the current post’s generated featured image size?
- Unhook the comment form in Buddypress
- Post variables not displaying correctly in custom function
- Remove snippets of JS from core
- How can i hide content if not friend in Buddypress? [closed]
- Removing Facebook contact field from user contact not working
- How do I add functionality to images?
- Sessions in word press [duplicate]
- Explode Array from Repeatable Custom Field
- WordPress Custom wp mail template return full template
- Problem with removing characters “<” – WpAllImport
- How to create a post without link in wordpress?
- How to crop image in WordPress with aspect ratio for any size of image
- multible shortcodes (for differnt values) with one function
- post_row_actions filter from parent theme not executing in child theme
- Customizer cuistom CSS Priority ordre Issue
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- wp_login_form display no styled form
- Advanced Custom Fields in WP_Query: Clickable Text in List Format
- wp_update_post breaks my function
- Add custom css to specific user
- How can I restrict comments on WordPress, so only the POST AUTHOR and the user who commented can see them?