
When you check the "Hide Republish Button on this Post?" checkbox, on reload the metabox shows the The Republication sharing widget on this post is programatically disabled through the hide_republication_widget filter. message that should only show when the filter is disabling it.
This is happening because if $hide_republication_widget is true, regardless of whether or not the filter is set, the first conditional fires.
https://github.com/INN/republication-tracker-tool/blob/7925e9275baabed9e19072bd67b7d4af226b6cab/includes/class-article-settings.php#L147-L172
$hide_republication_widget = apply_filters( 'hide_republication_widget', $hide_republication_widget, $post );
if( true == $hide_republication_widget ){
echo '<p>The Republication sharing widget on this post is programatically disabled through the <code>hide_republication_widget</code> filter. <a href="https://github.com/INN/republication-tracker-tool/blob/master/docs/removing-republish-button-from-categories.md" target="_blank">Read more about this filter</a>.</p>';
} else {
should probably be updated to something along the lines of
$hide_republication_widget_by_filter = false;
$hide_republication_widget_by_filter = apply_filters( 'hide_republication_widget', $hide_republication_widget_by_filter, $post );
if( true == $hide_republication_widget_by_filter ){
echo '<p>The Republication sharing widget on this post is programatically disabled through the <code>hide_republication_widget</code> filter. <a href="https://github.com/INN/republication-tracker-tool/blob/master/docs/removing-republish-button-from-categories.md" target="_blank">Read more about this filter</a>.</p>';
} else {
When you check the "Hide Republish Button on this Post?" checkbox, on reload the metabox shows the
The Republication sharing widget on this post is programatically disabled through the hide_republication_widget filter.message that should only show when the filter is disabling it.This is happening because if
$hide_republication_widgetis true, regardless of whether or not the filter is set, the first conditional fires.https://github.com/INN/republication-tracker-tool/blob/7925e9275baabed9e19072bd67b7d4af226b6cab/includes/class-article-settings.php#L147-L172
should probably be updated to something along the lines of