Skip to:
Content

BuddyPress.org

Opened 4 years ago

Last modified 4 years ago

#8349 new enhancement

Add appropriate buddypress objects to the wp sitemap

Reported by: shawfactor's profile shawfactor Owned by:
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version:
Component: Core Keywords: needs-patch
Cc:

Description

Wordpress 5.5 now supports sitemaps. The objects for public components, e.g groups should be listed in this sitemap. I am happy to assist on this enhancement

Link to documentation and annaouncement:

https://make.wordpress.org/core/2020/07/22/new-xml-sitemaps-functionality-in-wordpress-5-5/

Attachments (2)

lh-buddypress-add-to-sitemap.php (1.7 KB) - added by shawfactor 4 years ago.
lh-buddypress-add-to-sitemap-class.php (2.9 KB) - added by shawfactor 4 years ago.

Download all attachments as: .zip

Change History (11)

#1 @imath
4 years ago

  • Milestone changed from Awaiting Review to 7.0.0

Hi @shawfactor

Good idea! Could you make a patch about it, I’ll be happy to review it 👍

#2 @imath
4 years ago

  • Keywords needs-patch added

#3 @shawfactor
4 years ago

No worries I am very unfamiliar with trac but this is what I have coded up for groups so far. I have enscapulated the code in a plugin. Please find attached

Noting it relies on bp_has_groups, rather than directly querying groups as I wanted the same results in the sitemap as on the front end. I ootgen filter bp_after_has_groups_parse_args sitewide and I figure thers might as well.

Questions are what other objects should be incuded? Members? Are there privacy issues?

Where would this code reside in buddypress?

Sorry to be a pain. Im a bit of a newbie.

#4 @imath
4 years ago

Thanks a lot for the PHP files, I'll try to test these and will give you a few tips to start patching the BuddyPress development version.

In the meantime, here's a quick explanation about how to proceed, and could you adapt your code formatting a bit so that it comply with WordPress PHP Coding Standards ?

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


4 years ago

#6 @imath
4 years ago

  • Milestone changed from 7.0.0 to Awaiting Contributions

We're running out of time for the 7.0.0 milestone. Let's wait for contributions about this ticket.

#7 @shawfactor
4 years ago

What does this mean? You were going to review my code, which I already posted, so I think we have contributuons (although once reviewed I am happy to modify/enhance).

#8 @imath
4 years ago

Your code doesn't follow WordPress PHP Coding Standards (WPCS). It is not using a diff/patch format which needs us more time to review. If you want to speed up the process, it would be great if you (or anyone wishing to speed up the process) could:

  • Follow WPCS
  • build a patch out of your PHP files.

#9 @shawfactor
4 years ago

I'll try to fix he code standards aspect..
But this is new functionality so there is no file to diff/patch.

Unless you can suggest a file that you think the new code should reside in?

Note: See TracTickets for help on using tickets.