-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content warnings! #900
Content warnings! #900
Conversation
includes/functions.php
Outdated
@@ -1177,6 +1177,11 @@ function generate_post_summary( $post, $length = 500 ) { | |||
return ''; | |||
} | |||
|
|||
$content_warning = get_content_warning( $post->ID ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you set it in the transformer, you do not also have to add it here.
I quite like the idea to set it in the transformer only, this we can still generate the summary!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we would keep it in there, it would show the "content warning" also in the content field if someone would use the shortcode [ap_excerpt]
for the content field.
Awesome! |
@pfefferle thanks for taking this to the finish line! |
We now support content warnings! They are per-post.
fix #757 #176
Proposed changes:
Adds a "Fediverse" settings section to the post editor that allows entering a content warning.
The warning is used to set
sensitive: true
and populates thesummary
attribute.Other information:
Testing instructions:
On a post, set the value as above. I entered a value of
warning!!!
and then by appending?activitypub
to the post, I got this JSON: