Search Results for 'wordpress'
-
Search Results
-
Hi guys, I created a custom notification that is added when an user receive a like on a custom post type.
All good unitl now, but I noticed that if the post receive 2 likes, from 2 different users, the user receive only the first notification and not the second one.
Any help would be really appreciated.
//Component declaration if(!function_exists('my_custom_register_wiki_notification')) { function my_custom_register_wiki_notification() { // Register component manually into buddypress() singleton buddypress()->my_custom_wiki = new stdClass; // Add notification callback function buddypress()->my_custom_wiki->notification_callback = 'my_custom_wiki_like_format_notifications'; // Now register components into active components array buddypress()->active_components['my_custom_wiki'] = 1; } }; //Notification format declaration if(!function_exists('my_custom_wiki_like_format_notifications')) { function my_custom_wiki_like_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { // New custom notifications if ( 'my_custom_wiki_like' === $action ) { $wiki_post = get_post( $item_id ); $post_title = get_the_title( $item_id ); $custom_title = sprintf( esc_html__( 'Your post "%1$s" received a like', 'my_custom' ), $post_title ); $custom_text = sprintf( esc_html__( 'Your post "%1$s" received a like', 'my_custom' ), $post_title ); $custom_link = get_permalink( $item_id ); // WordPress Toolbar if ( 'string' === $format ) { $return = apply_filters( 'my_custom_wiki_like_format', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link ); // Deprecated BuddyBar } else { $return = apply_filters( 'my_custom_wiki_like_format', array( 'text' => $custom_text, 'link' => $custom_link ), $custom_link, (int) $total_items, $custom_text, $custom_title ); } return $return; } return $action; } } //Function that add the notification when like is triggered function my_custom_add_like() { //... //... if(my_custom_is_wiki_like_notification_enabled()) { bp_notifications_add_notification( array( 'user_id' => $post_object->post_author, 'item_id' => $post_id, 'secondary_item_id' => get_current_user_id(), 'component_name' => 'my_custom_wiki', 'component_action' => 'my_custom_wiki_like', 'date_notified' => bp_core_current_time(), 'is_new' => 1, ) ); } }Topic: 2 sites, shared userbase?
Help!
We are trying to build our sites, currently, I have multisite and I guess a network (still trying to wrap my head around this). We have buddypress and bbpress on the secondary forum site. Here’s what we’re looking to accomplish:
2 sites, main shop/site, forum
Both have different domains-single sign-on
-same user credentials
-potential social integration with facebookUsers can buy our products from main site, post about them on forum from same name, etc.
Sounds simple, but we are having the hardest time!!
Is this possible? If so, how do we achieve this? I have scoured the internet looking for answers and am having no such luck.
Also, is it possible to have login without the WordPress page? Would like this as seamless as possible.
Topic: Registration Form Issue…
Hi,
It should be simple but I need help to solve it urgently. How can I convert back to buddypress registration page to original wordpress registration page?
I do not want to use only buddypresss registration page, I want to keep the rest but I couldn’t find any way to revert it back to default wordpres version.
Thanks in advance.
Hi, things are going great on my desktop, where the WordPress profile loads on the left and the Buddypress loads on the right for the register form. But it is a mess on mobile with short fields and overlapping headings. How can I get the Buddypress section to drop below the WordPress one when viewed on mobile, so it can utiise the full width.
Hello,
we build a One-Click-Installer for our WordPress-Multisite and we would like to activate some BuddyPress components.
First we activate the plugin programmatically and then we would like to activate the component groups per default.
We modified array in the option bp-active-components and added ‘groups’ => 1.
But it seems, that BuddyPress is gonna overwrite this.Any ideas how we can enable the group component, after the programmatically activation of BuddyPress?
Cheers
Andreas