Skip to content

Add a privacy policy content suggestion#1130

Merged
mauteri merged 10 commits intoGatherPress:developfrom
carstingaxion:fix/875
Jul 31, 2025
Merged

Add a privacy policy content suggestion#1130
mauteri merged 10 commits intoGatherPress:developfrom
carstingaxion:fix/875

Conversation

@carstingaxion
Copy link
Copy Markdown
Collaborator

@carstingaxion carstingaxion commented Jul 25, 2025

Description of the Change

image

Closes #875

How to test the Change

Changelog Entry

Added a privacy policy content suggestion

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Jul 25, 2025

PR Summary

  • Enhancements to Privacy Policy: We've introduced a new feature called add_privacy_policy_content() that further enriches the privacy policy of your site. This specifically relates to the integration of OpenStreetMap services when your site is accessed via GatherPress. This enhancement gives viewers of your site a better understanding of how their data is used with these map services.
  • Automated Initialization: This new capability is automatically activated when an administrator logs in. It ensures that the enhanced privacy information is available consistently to the users.
  • Improved Testing: Our team also revised some tests to ensure that the above mentioned automatic activation of privacy policy enhancements is working as intended. This allows for quicker detection and fixing of any potential glitches.

return;
}
$content = '<h2>' . __( 'Inform your visitors about GatherPress\' use of OpenStreetMap services.', 'gatherpress' ) . '</h2>'
. '<p><strong class="privacy-policy-tutorial">' . __( 'Suggested Text:', 'default' ) . '</strong> '
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix text domain

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's intentional.

GatherPress does not need to stress the translation contributors with defaults that are translated a thousand times.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I would omit it then and just have __( 'Suggested Text:' ) since default is the default and wp plugins guidelines is flagging it. Unless there's a reason not to do that.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little funny, because

I did exactly what you suggest in my commits here before (I guess) phpcs complained about the missing 'default' textdomain.
So I added it, expecting it to work now.

Ok, now what?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you saying PHPCS complains if you leave it off and WP Plugin Guidelines complains if it's not "gatherpress"? Maybe don't include it and if PHPCS complains, add a PHPCS Ignore.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carstingaxion Try changing tested up to 6.8.1 to just 6.8. Seems that is what it is erroring on (which is new, as it's been that way for awhile).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that fixes it, we can put in a PR to change that and pull it into all PRs we're working on.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All checks have passed
18 successful checks

That did it.

So next, I'm going top re-add the 'default' textdomain and remove the phpcs:ignore statement.

Copy link
Copy Markdown
Collaborator Author

@carstingaxion carstingaxion Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So next, I'm going top re-add the 'default' textdomain and remove the phpcs:ignore statement.

Which worked out very well, with no errors.

Do you still need additional information on the Why & How of this idea @mauteri or are you able to merge it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carstingaxion I'll get this on my list to do final review and merge if looks good. Thx!

@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#1130 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri mauteri merged commit 622006d into GatherPress:develop Jul 31, 2025
18 checks passed
@carstingaxion
Copy link
Copy Markdown
Collaborator Author

Hooray 🎉 and thanks for merging @mauteri !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggest text to the websites privacy-page, about OSM & Google

2 participants