Skip to content
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

Automatically disable the Republication Tracker Tool widget on posts in the 'download' content type #14

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Dec 13, 2019

Changes

This pull request makes the following changes:

Why

For https://secure.helpscout.net/conversation/1016863827/4711?folderId=2730118

Testing/Questions

Features that this PR affects:

  • the "downloads" post type and the Republication Tracker Tool widget

Questions that need to be answered before merging:

  • Is this PR targeting the correct branch in this repository?

Steps to test this PR:

  1. Install and activate https://wordpress.org/plugins/republication-tracker-tool/
  2. Add a Republication Tracker Tool widget to the Article Bottom widget area
  3. Check that the widget appears on "post" posts and on posts in the "downloads" post_type, like /download-content/asian-restaurants-and-chicago-employment-agencies-accused-of-exploiting-latino-workers-in-midwest/
  4. Check out this branch
  5. Check that the widget continues to appear on "post" posts, but not on posts in the "downloads" post type

@benlk benlk requested a review from joshdarby December 13, 2019 19:40
@benlk benlk self-assigned this Dec 13, 2019
@benlk benlk changed the base branch from master to staging December 13, 2019 19:40
*/
function remove_republish_button_from_downloads( $hide_republication_widget, $post ){
if( true !== $hide_republication_widget ){
// if the current post is in this category, return true

Choose a reason for hiding this comment

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

@benlk Everything looks good, but can we update this comment to something like if the current post has this post type, return true, just in case someone new tries to edit this function

@benlk benlk removed their assignment Feb 17, 2021
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.

2 participants