WordPress / five-for-the-future

Plugins and themes for the Five for the Future subsite
https://wordpress.org/five-for-the-future/
55 stars 25 forks source link

Contributor pledge pages should use the 'pretty' links #223

Closed jonoalderson closed 4 months ago

jonoalderson commented 1 year ago

See https://meta.trac.wordpress.org/ticket/5824

When contributors on https://make.wordpress.org/meta/pledges/ and similar are linked to a 5ftf org, the link uses the plain permalink (?p=x) instead of the organization URL.

E.g., on my listing on https://make.wordpress.org/meta/pledges/, the 'sponsored' links to https://wordpress.org/five-for-the-future/?p=339; it should instead link to https://wordpress.org/five-for-the-future/pledge/yoast/

pkevan commented 4 months ago

I took a look at this, and unfortunately adding a pretty link isn't straightforward since the code on make wp is using switch_to_blog to grab the data but that doesn't load any theme/plugin code, which is where the pledge post type lives.

We can get around this by fixing the URLs generated which I guess is better than not. This also means we can avoid outputting links to non-published pledges too which end up returning 404 responses.

pkevan commented 4 months ago

Resolve with a hack!