-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Remove Webmention Dependence on Pings #485
base: main
Are you sure you want to change the base?
Conversation
…nly saves from webmention to webmention what is going on.
@pfefferle Where are we on this one? |
|
I agree that we should not care about the pingback settings, but why change the |
$open = false; | ||
} else { | ||
// If the webmentions_closed meta ID has a value then consider webmentions to be open. | ||
$open = get_post_meta( $post->ID, 'webmentions_closed', true ); |
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.
this is very misleading! we check for webmentions_closed
and write it into $open
? 😳
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.
I think the default should be false
because we set it only when webmentions are closed?!?
$open = get_post_meta( $post->ID, 'webmentions_closed', true ); | ||
$open = empty( $open ) ? true : false; |
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.
$open = get_post_meta( $post->ID, 'webmentions_closed', true ); | |
$open = empty( $open ) ? true : false; | |
$closed = (int) get_post_meta( $post->ID, 'webmentions_closed', '0' ); | |
$open = ! (bool) $closed; |
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.
Isn't WordPress always transforming booleans into integer-strings when using get_post_meta
?
true
=> '1'
false
=> '0'
This removes webmention receiving being dependent on pings_open. It does allow for checking the presence of a webmentions_closed meta key to close webmentions. If this approach is validated, will move to figure out a UI for this.
For the sending, it moves from using the pung URLs property within the post object to a new temporary storage that will just store what was sent last time, compare it to what is being send this time, and use that to send deleted webmentions.