Yoast / Yoast/duplicate-post

Add post to meta filters

Open
#387 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
53
Forks
38
Avg merge
4d 8h
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.

AFAICT, there is currently no official way to get the post from within duplicate_post_excludelist_filter and duplicate_post_meta_keys_filter filters. This makes it hard to return different values based on the original post's type or similar.

Describe the solution you'd like

Add a WP_Post $post parameter to the filters.

Why do you think this feature is something we should consider for the Yoast SEO plugins?

Because it would be an improvement to the plugin.

Additional context

I've spent about an hour looking through the code, and I cannot find any reliable workaround.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the code that applies the duplicate_post_excludelist_filter and duplicate_post_meta_keys_filter filters, then inspect their current arguments and related tests. The work is done when both filters receive the original WP_Post as an additional parameter and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.