=> array( 'type' => 'info', 'message' => __( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ), ), 'blogs-loop-none' => array( 'type' => 'info', 'message' => __( 'Sorry, there were no sites found.', 'buddypress' ), ), 'blogs-no-signup' => array( 'type' => 'info', 'message' => __( 'Site registration is currently disabled.', 'buddypress' ), ), 'directory-blogs-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the sites of the network. Please wait.', 'buddypress' ), ), 'directory-groups-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the groups of the community. Please wait.', 'buddypress' ), ), 'groups-loop-none' => array( 'type' => 'info', 'message' => __( 'Sorry, there were no groups found.', 'buddypress' ), ), 'group-activity-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the group updates. Please wait.', 'buddypress' ), ), 'group-members-loading' => array( 'type' => 'loading', 'message' => __( 'Requesting the group members. Please wait.', 'buddypress' ), ), 'group-members-none' => array( 'type' => 'info', 'message' => __( 'Sorry, there were no group members found.', 'buddypress' ), ), 'group-members-search-none' => array( 'type' => 'info', 'message' => __( 'Sorry, there was no member of that name found in this group.', 'buddypress' ), ), 'group-manage-members-none' => array( 'type' => 'info', 'message' => __( 'This group has no members.', 'buddypress' ), ), 'group-requests-none' => array( 'type' => 'info', 'message' => __( 'There are no pending membership requests.', 'buddypress' ), ), 'group-requests-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the members who requested to join the group. Please wait.', 'buddypress' ), ), 'group-delete-warning' => array( 'type' => 'warning', 'message' => __( 'WARNING: Deleting this group will completely remove ALL content associated with it. There is no way back. Please be careful with this option.', 'buddypress' ), ), 'group-avatar-delete-info' => array( 'type' => 'info', 'message' => __( 'If you\'d like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.', 'buddypress' ), ), 'directory-members-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the members of your community. Please wait.', 'buddypress' ), ), 'members-loop-none' => array( 'type' => 'info', 'message' => __( 'Sorry, no members were found.', 'buddypress' ), ), 'member-requests-none' => array( 'type' => 'info', 'message' => __( 'You have no pending friendship requests.', 'buddypress' ), ), 'member-invites-none' => array( 'type' => 'info', 'message' => __( 'You have no outstanding group invites.', 'buddypress' ), ), 'member-notifications-none' => array( 'type' => 'info', 'message' => __( 'This member has no notifications.', 'buddypress' ), ), 'member-wp-profile-none' => array( 'type' => 'info', /* translators: %s: member name */ 'message' => __( '%s did not save any profile information yet.', 'buddypress' ), ), 'member-delete-account' => array( 'type' => 'warning', 'message' => __( 'Deleting this account will delete all of the content it has created. It will be completely unrecoverable.', 'buddypress' ), ), 'member-activity-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the member\'s updates. Please wait.', 'buddypress' ), ), 'member-blogs-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the member\'s blogs. Please wait.', 'buddypress' ), ), 'member-friends-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the member\'s friends. Please wait.', 'buddypress' ), ), 'member-groups-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the member\'s groups. Please wait.', 'buddypress' ), ), 'member-notifications-loading' => array( 'type' => 'loading', 'message' => __( 'Loading notifications. Please wait.', 'buddypress' ), ), 'member-group-invites-all' => array( 'type' => 'info', 'message' => __( 'Currently every member of the community can invite you to join their groups. If you are not comfortable with it, you can always restrict group invites to your friends only.', 'buddypress' ), ), 'member-group-invites-friends-only' => array( 'type' => 'info', 'message' => __( 'Currently only your friends can invite you to groups. Uncheck the box to allow any member to send invites.', 'buddypress' ), ), 'member-invitations-help' => array( 'type' => 'info', 'message' => __( 'Fill out the form below to invite a new user to join this site. Upon submission of the form, an email will be sent to the invitee containing a link to accept your invitation. You may also add a custom message to the email.', 'buddypress' ), ), 'member-invitations-none' => array( 'type' => 'info', 'message' => __( 'There are no invitations to display.', 'buddypress' ), ), 'member-invitations-not-allowed' => array( 'type' => 'error', /** * Use this filter to edit the restricted feedback message displayed into the Send invitation form. * * @since 8.0.0 * * @param string $value The restricted feedback message displayed into the Send invitation form. */ 'message' => apply_filters( 'members_invitations_form_access_restricted', __( 'Sorry, you are not allowed to send invitations.', 'buddypress' ) ), ), ) ); if ( ! isset( $feedback_messages[ $feedback_id ] ) ) { return false; } /* * Adjust some messages to the context. */ if ( 'completed-confirmation' === $feedback_id && bp_get_membership_requests_required() ) { $feedback_messages['completed-confirmation']['message'] = __( 'You have successfully submitted your membership request! Our site moderators will review your submission and send you an activation email if your request is approved.', 'buddypress' ); } elseif ( 'completed-confirmation' === $feedback_id && bp_registration_needs_activation() ) { $feedback_messages['completed-confirmation']['message'] = __( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ); } elseif ( 'member-notifications-none' === $feedback_id ) { $is_myprofile = bp_is_my_profile(); if ( bp_is_current_action( 'unread' ) ) { $feedback_messages['member-notifications-none']['message'] = __( 'This member has no unread notifications.', 'buddypress' ); if ( $is_myprofile ) { $feedback_messages['member-notifications-none']['message'] = __( 'You have no unread notifications.', 'buddypress' ); } } elseif ( $is_myprofile ) { $feedback_messages['member-notifications-none']['message'] = __( 'You have no notifications.', 'buddypress' ); } } elseif ( 'member-wp-profile-none' === $feedback_id && bp_is_user_profile() ) { $feedback_messages['member-wp-profile-none']['message'] = sprintf( $feedback_messages['member-wp-profile-none']['message'], bp_get_displayed_user_fullname() ); } elseif ( 'member-delete-account' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-delete-account']['message'] = __( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); } elseif ( 'member-activity-loading' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-activity-loading']['message'] = __( 'Loading your updates. Please wait.', 'buddypress' ); } elseif ( 'member-blogs-loading' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-blogs-loading']['message'] = __( 'Loading your blogs. Please wait.', 'buddypress' ); } elseif ( 'member-friends-loading' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-friends-loading']['message'] = __( 'Loading your friends. Please wait.', 'buddypress' ); } elseif ( 'member-groups-loading' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-groups-loading']['message'] = __( 'Loading your groups. Please wait.', 'buddypress' ); } /** * Filter here if you wish to edit the message just before being displayed * * @since 3.0.0 * * @param array $feedback_messages */ return apply_filters( 'bp_nouveau_get_user_feedback', $feedback_messages[ $feedback_id ] ); } /** * Get the signup fields for the requested section * * @since 3.0.0 * * @param string $section Optional. The section of fields to get 'account_details' or 'blog_details'. * * @return array|false The list of signup fields for the requested section. False if not found. */ function bp_nouveau_get_signup_fields( $section = '' ) { if ( empty( $section ) ) { return false; } /** * Filter to add your specific 'text' or 'password' inputs * * If you need to use other types of field, please use the * do_action( 'bp_account_details_fields' ) or do_action( 'blog_details' ) hooks instead. * * @since 3.0.0 * * @param array $value The list of fields organized into sections. */ $fields = apply_filters( 'bp_nouveau_get_signup_fields', array( 'account_details' => array( 'signup_username' => array( 'label' => __( 'Username', 'buddypress' ), 'required' => true, 'value' => 'bp_get_signup_username_value', 'attribute_type' => 'username', 'type' => 'text', 'class' => '', ), 'signup_email' => array( 'label' => __( 'Email Address', 'buddypress' ), 'required' => true, 'value' => 'bp_get_signup_email_value', 'attribute_type' => 'email', 'type' => 'email', 'class' => '', ), 'signup_password' => array(), 'signup_password_confirm' => array(), ), 'blog_details' => array( 'signup_blog_url' => array( 'label' => __( 'Site URL', 'buddypress' ), 'required' => true, 'value' => 'bp_get_signup_blog_url_value', 'attribute_type' => 'slug', 'type' => 'text', 'class' => '', ), 'signup_blog_title' => array( 'label' => __( 'Site Title', 'buddypress' ), 'required' => true, 'value' => 'bp_get_signup_blog_title_value', 'attribute_type' => 'title', 'type' => 'text', 'class' => '', ), 'signup_blog_privacy_public' => array( 'label' => __( 'Yes', 'buddypress' ), 'required' => false, 'value' => 'public', 'attribute_type' => '', 'type' => 'radio', 'class' => '', ), 'signup_blog_privacy_private' => array( 'label' => __( 'No', 'buddypress' ), 'required' => false, 'value' => 'private', 'attribute_type' => '', 'type' => 'radio', 'class' => '', ), ), ) ); if ( ! bp_get_blog_signup_allowed() ) { unset( $fields['blog_details'] ); } if ( isset( $fields[ $section ] ) ) { return $fields[ $section ]; } return false; } /** * Get Some submit buttons data. * * @since 3.0.0 * @since 8.0.0 Adds the 'member-send-invite' button. * * @param string $action The action requested. * * @return array|false The list of the submit button parameters for the requested action * False if no actions were found. */ function bp_nouveau_get_submit_button( $action = '' ) { if ( empty( $action ) ) { return false; } /** * Filter the Submit buttons to add your own. * * @since 3.0.0 * @since 8.0.0 Adds the 'member-send-invite' button. * * @param array $value The list of submit buttons. * * @return array|false */ $actions = apply_filters( 'bp_nouveau_get_submit_button', array( 'register' => array( 'before' => 'bp_before_registration_submit_buttons', 'after' => 'bp_after_registration_submit_buttons', 'nonce' => 'bp_new_signup', 'attributes' => array( 'name' => 'signup_submit', 'id' => 'submit', 'value' => __( 'Complete Sign Up', 'buddypress' ), ), ), 'member-profile-edit' => array( 'before' => '', 'after' => '', 'nonce' => 'bp_xprofile_edit', 'attributes' => array( 'name' => 'profile-group-edit-submit', 'id' => 'profile-group-edit-submit', 'value' => __( 'Save Changes', 'buddypress' ), ), ), 'member-capabilities' => array( 'before' => 'bp_members_capabilities_account_before_submit', 'after' => 'bp_members_capabilities_account_after_submit', 'nonce' => 'capabilities', 'attributes' => array( 'name' => 'capabilities-submit', 'id' => 'capabilities-submit', 'value' => __( 'Save', 'buddypress' ), ), ), 'member-delete-account' => array( 'before' => 'bp_members_delete_account_before_submit', 'after' => 'bp_members_delete_account_after_submit', 'nonce' => 'delete-account', 'attributes' => array( 'disabled' => 'disabled', 'name' => 'delete-account-button', 'id' => 'delete-account-button', 'value' => __( 'Delete Account', 'buddypress' ), ), ), 'members-general-settings' => array( 'before' => 'bp_core_general_settings_before_submit', 'after' => 'bp_core_general_settings_after_submit', 'nonce' => 'bp_settings_general', 'attributes' => array( 'name' => 'submit', 'id' => 'submit', 'value' => __( 'Save Changes', 'buddypress' ), 'class' => 'auto', ), ), 'member-notifications-settings' => array( 'before' => 'bp_members_notification_settings_before_submit', 'after' => 'bp_members_notification_settings_after_submit', 'nonce' => 'bp_settings_notifications', 'attributes' => array( 'name' => 'submit', 'id' => 'submit', 'value' => __( 'Save Changes', 'buddypress' ), 'class' => 'auto', ), ), 'members-profile-settings' => array( 'before' => 'bp_core_xprofile_settings_before_submit', 'after' => 'bp_core_xprofile_settings_after_submit', 'nonce' => 'bp_xprofile_settings', 'attributes' => array( 'name' => 'xprofile-settings-submit', 'id' => 'submit', 'value' => __( 'Save Changes', 'buddypress' ), 'class' => 'auto', ), ), 'member-group-invites' => array( 'nonce' => 'bp_nouveau_group_invites_settings', 'attributes' => array( 'name' => 'member-group-invites-submit', 'id' => 'submit', 'value' => __( 'Save', 'buddypress' ), 'class' => 'auto', ), ), 'member-send-invite' => array( 'nonce' => 'bp_members_invitation_send_%d', 'nonce_placeholder_value' => bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id(), 'attributes' => array( 'name' => 'member-send-invite-submit', 'id' => 'submit', 'value' => __( 'Send', 'buddypress' ), 'class' => 'auto', ), ), 'activity-new-comment' => array( 'after' => 'bp_activity_entry_comments', 'nonce' => 'new_activity_comment', 'nonce_key' => '_wpnonce_new_activity_comment', 'wrapper' => false, 'attributes' => array( 'name' => 'ac_form_submit', 'value' => _x( 'Post', 'button', 'buddypress' ), ), ), ) ); if ( isset( $actions[ $action ] ) ) { return $actions[ $action ]; } return false; } /** * Reorder a BuddyPress item nav according to a given list of nav item slugs * * @since 3.0.0 * * @param object $nav The BuddyPress Item Nav object to reorder * @param array $order A list of slugs ordered (eg: array( 'profile', 'activity', etc..) ) * @param string $parent_slug A parent slug if it's a secondary nav we are reordering (case of the Groups single item) * * @return bool True on success. False otherwise. */ function bp_nouveau_set_nav_item_order( $nav = null, $order = array(), $parent_slug = '' ) { if ( ! is_object( $nav ) || empty( $order ) || ! is_array( $order ) ) { return false; } $position = 0; foreach ( $order as $slug ) { $position += 10; $key = $slug; if ( ! empty( $parent_slug ) ) { $key = $parent_slug . '/' . $key; } $item_nav = $nav->get( $key ); if ( ! $item_nav ) { continue; } if ( (int) $item_nav->position !== (int) $position ) { $nav->edit_nav( array( 'position' => $position ), $slug, $parent_slug ); } } return true; } /** * Gets the component's slug thanks to its ID. * * @since 8.0.0 * * @param string $component_id The component ID. * @return string The slug for the requested component ID. */ function bp_nouveau_get_component_slug( $component_id = '' ) { $slug = ''; if ( bp_is_active( $component_id ) ) { switch ( $component_id ) { case 'activity': $slug = bp_get_activity_slug(); break; case 'blogs': $slug = bp_get_blogs_slug(); break; case 'friends': $slug = bp_get_friends_slug(); break; case 'groups': $slug = bp_get_groups_slug(); break; case 'messages': $slug = bp_get_messages_slug(); break; case 'notifications': $slug = bp_get_notifications_slug(); break; case 'settings': $slug = bp_get_settings_slug(); break; case 'xprofile': $slug = bp_get_profile_slug(); break; } } // Defaults to the component ID. if ( ! $slug ) { $slug = $component_id; } /** * Filter here to edit the slug for the requested component ID. * * @since 8.0.0 * * @param string $slug The slug for the requested component ID. * @param string $component_id The component ID. */ return apply_filters( 'bp_nouveau_get_component_slug', $slug, $component_id ); } /** * Registers the 'bp/primary-nav' Widget Block. * * @since 9.0.0 * @since 12.0.0 Use the WP Blocks API v2. * * @param array $blocks The Core Blocks list. * @return array The Core Blocks list. */ function bp_nouveau_register_primary_nav_widget_block( $blocks = array() ) { $blocks['bp/primary-nav'] = array( 'metadata' => trailingslashit( buddypress()->plugin_dir ) . 'bp-core/blocks/primary-nav', 'render_callback' => 'bp_nouveau_render_primary_nav_block', ); return $blocks; } add_filter( 'bp_core_register_blocks', 'bp_nouveau_register_primary_nav_widget_block', 20, 1 ); /** * Registers the 'bp/primary-nav' Widget Block classnames. * * @since 9.0.0 * * @param array $block_globals The list of global properties for Core blocks. * @return array The list of global properties for Core blocks. */ function bp_nouveau_register_core_block_globals( $block_globals = array() ) { $block_globals['bp/primary-nav'] = array( 'widget_classnames' => array( 'widget_nav_menu', 'buddypress_object_nav', 'buddypress' ), ); return $block_globals; } add_filter( 'bp_core_block_globals', 'bp_nouveau_register_core_block_globals', 10, 1 ); /** * Unregister the 'bp/primary-nav' Block from the post context. * * @since 9.0.0 */ function bp_nouveau_unregister_blocks_for_post_context() { $is_registered = WP_Block_Type_Registry::get_instance()->is_registered( 'bp/primary-nav' ); if ( $is_registered ) { unregister_block_type( 'bp/primary-nav' ); } } add_action( 'load-post.php', 'bp_nouveau_unregister_blocks_for_post_context' ); add_action( 'load-post-new.php', 'bp_nouveau_unregister_blocks_for_post_context' ); /** * Callback function to render the BP Primary Nav Block. * * @since 9.0.0 * * @param array $attributes The block attributes. * @return string HTML output. */ function bp_nouveau_render_primary_nav_block( $attributes = array() ) { $widget_content = ''; $widget_title = ''; $block_args = bp_parse_args( $attributes, array( 'displayTitle' => true, ), 'widget_object_nav' ); // Previewing the Block inside the editor. if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { $widget_title = bp_get_loggedin_user_fullname(); ob_start(); // Temporary override the displayed user by the logged in one. add_filter( 'bp_displayed_user_id', 'bp_loggedin_user_id' ); bp_get_template_part( 'members/single/parts/item-nav' ); $widget_content = ob_get_clean(); // Remove the temporary override. remove_filter( 'bp_displayed_user_id', 'bp_loggedin_user_id' ); } else { ob_start(); if ( bp_is_user() ) { $widget_title = bp_get_displayed_user_fullname(); bp_get_template_part( 'members/single/parts/item-nav' ); } elseif ( bp_is_group() ) { $widget_title = bp_get_current_group_name(); bp_get_template_part( 'groups/single/parts/item-nav' ); } elseif ( bp_is_directory() ) { $widget_title = bp_get_directory_title( bp_current_component() ); bp_get_template_part( 'common/nav/directory-nav' ); } $widget_content = ob_get_clean(); } if ( ! $widget_content ) { return ''; } // Set the Block's title. if ( true === $block_args['displayTitle'] ) { $widget_content = sprintf( '

%1$s

%2$s', esc_html( $widget_title ), $widget_content ); } // Only add a block wrapper if not loaded into a Widgets sidebar. if ( ! did_action( 'dynamic_sidebar_before' ) ) { $classnames = 'widget_nav_menu buddypress_object_nav buddypress widget'; $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) ); return sprintf( '
%2$s
', $wrapper_attributes, $widget_content ); } return $widget_content; } /** * Retuns the theme layout available widths. * * @since 10.0.0 * * @return array The available theme layout widths. */ function bp_nouveau_get_theme_layout_widths() { $layout_widths = array(); if ( current_theme_supports( 'align-wide' ) ) { $layout_widths = array( 'alignnone' => __( 'Default width', 'buddypress' ), 'alignwide' => __( 'Wide width', 'buddypress' ), 'alignfull' => __( 'Full width', 'buddypress' ), ); } // `wp_get_global_settings()` has been introduced in WordPress 5.9 if ( function_exists( 'wp_get_global_settings' ) ) { $theme_layouts = wp_get_global_settings( array( 'layout' ) ); if ( isset( $theme_layouts['wideSize'] ) && $theme_layouts['wideSize'] ) { $layout_widths = array( 'alignnone' => __( 'Content width', 'buddypress' ), 'alignwide' => __( 'Wide width', 'buddypress' ), ); } } /** * Filter here to edit the available theme layout widths. * * @since 10.0.0 * * @param array $layout_widths The available theme layout widths. */ return apply_filters( 'bp_nouveau_get_theme_layout_widths', $layout_widths ); } /** * Get the current displayed object for the priority nav. * * @since 12.0.0 * * @return string The current displayed object (`member` or `group`). */ function bp_nouveau_get_current_priority_nav_object() { $object = ''; if ( bp_is_user() ) { $object = 'member'; } elseif ( bp_is_group() ) { $object = 'group'; } return $object; } /** * Checks whether a single item supports priority nav. * * @since 12.0.0 * * @param string $single_item The single item object name. Possible valuers are 'member' or 'group'. * @return bool True if the single item supports priority nav. False otherwise. */ function bp_nouveau_single_item_supports_priority_nav( $single_item = '' ) { $retval = false; $feature = bp_get_theme_compat_feature( 'priority_item_nav' ); if ( isset( $feature->single_items ) && is_array( $feature->single_items ) ) { $retval = ! empty( $feature->single_items ); if ( $single_item ) { $retval = in_array( $single_item, $feature->single_items, true ); } } /** * Use this filter to disallow/allow the Priority nav support. * * @since 12.0.0 * * @param bool $retval True if the single item supports priority nav. False otherwise. * @param string $single_item The single item object name. Possible valuers are 'member' or 'group'. */ return apply_filters( 'bp_nouveau_single_item_supports_priority_nav', $retval, $single_item ); } {"version":"1.0","provider_name":"Tranny Newbies","provider_url":"http:\/\/www.trannynewbies.com\/blog","author_name":"admin2","author_url":"http:\/\/www.trannynewbies.com\/blog\/author\/admin2\/","title":"Double New Half","type":"rich","width":600,"height":338,"html":"
Double New Half<\/a><\/blockquote>\n