Forum Replies Created
-
I don’t think it will be easy but it’s certainly possible.
wp_insert_post()takes an array as its first param.post_dateis set to the current time by default so something is setting it to 0000-00-00 00:00:00.If you’re talking about BuddyPress activity items (not WordPress posts) then
recorded_timealso defaults to the current time. Again, in this case there must be something in your plugin that is setting it to 0000-00-00 00:00:00.Ref: https://codex.buddypress.org/developer/function-examples/bp_activity_add/
In reply to: Free Theme almost readyWould you prefer feedback on GitHub or on the group you created at buddycore.com?
In reply to: Free Theme almost readyas long as itβs not an octocat.txt file
Ah man, my plans have been ruined π
In reply to: Free Theme almost readyHi buddycore,
I think the theme is looking good! Will you be accepting pull requests on GitHub?
In reply to: [Resolved] Wrap embeds in divCool, no worries!
In reply to: [Resolved] Wrap embeds in divbp_use_oembed_in_activitycan be used to allow or disallow oEmbeds in activity items.The
bp_activity_embed()function just adds a bunch of filters and actions. It’s not really for filtering the oEmbed output.In reply to: [Resolved] Wrap embeds in divCan you try the
bp_activity_embed_htmlhook?add_filter( 'bp_activity_embed_html', function( $retval ) { return '<div>' . $retval . '</div>'; } );In reply to: [Resolved] Wrap embeds in divPerhaps that filter hook is for filtering embeds in WordPress content? BuddyPress must have a filter for this. I’ll need to have a dig around…
In reply to: [Resolved] Wrap embeds in divThink of it like this:
- Filters return stuff
- Actions don’t
Here’s an example using the
embed_oembed_htmlfilter:add_filter( 'embed_oembed_html', function( $html, $url, $attr, $post_ID ) { // Use $html, $url, $attr and $post_ID here if you like. // Wrap the HTML output. $html = '<div>' . $html . '</div>'; // Return $html. return $html; }, 10, 4 );In reply to: [Resolved] Wrap embeds in divCheck out the
embed_oembed_htmlfilter. I think that’s what you need here.In reply to: Activate BuddyPress components programmaticallyCan you let me know what output you get from this?
add_action( 'bp_loaded', function() { var_dump( bp_get_option( 'bp-active-components' ) ); } );In reply to: Activate BuddyPress components programmaticallyCan you var_dump
$bp_active_componentsjust to see what we have in the db?In reply to: Activate BuddyPress components programmaticallyYou need
activated_plugin. It fires after a plugin has been activated but note that if a plugin is silently activated (such as during an update), the hook doesn’t fire.Here’s an example:
add_action( 'activated_plugin', function( $plugin, $network_wide ) { // $plugin is a string (the path to main plugin file). }, 10, 2 );In reply to: How to properly set bcc in all emails?bcc stands for blind carbon copy. It’s a way of sending email to a group of recipients without them seeing who else the email is addressed to. So bcc will be blank every time.
@apokh glad you solved the problem π
Which theme are you using?
In reply to: How to properly set bcc in all emails?Try changing this
$bcc = new BP_Email_Recipient( 'myemail@gmail.com' );to
$bcc[] = new BP_Email_Recipient( 'myemail@gmail.com' );In reply to: Free theme in development@buddycore This looks super cool! Looking forward to seeing it up on GitHub π
In reply to: Update custom table field when posting activityIn order to update a custom table you’d need to use the wpdb class.
Are you sure the
gform_after_submission_79action is firing?In reply to: distorted gravatarThis could be a CSS issue. Which theme are you using?
In reply to: Change colors of fieldsWe’d need to see your theme’s markup in order to provide you with the relevant CSS help. Do you have a link to your website?
In reply to: [Resolved] Check if on profile of an admin?This is possible. As @mrjarbenne said you can check the capabilities of the displayed user.
In reply to: Latest Activity Image on Members LoopDo you mean you want to show the post thumbnail?