Skip to content

adds dt_should_push_network_post action#1350

Open
psorensen wants to merge 5 commits intodevelopfrom
feature/pre-push-actions
Open

adds dt_should_push_network_post action#1350
psorensen wants to merge 5 commits intodevelopfrom
feature/pre-push-actions

Conversation

@psorensen
Copy link
Contributor

@psorensen psorensen commented Dec 11, 2025

Description of the Change

Adds filter to short circuit distribution.

How to test the Change

Simple example code to test filter.

/**
 * Test 
 *
 * @param bool    $should_push Whether the post should be pushed.
 * @param WP_Post $post        The post object.
 * @return bool Whether the post should be pushed.
 */
function test_prevent_push( $should_push, $post ) {
	if ( $post->ID === 1 ) {
            $should_push = false;
        }

	return $should_push;
}
add_filter( 'dt_should_push_network_post',    __NAMESPACE__ . '\\test_prevent_push', 10, 4 );

Changelog Entry

Added filters to prevent external and internal pushes.

Credits

Props @psorensen

Checklist:

@psorensen psorensen requested a review from a team as a code owner December 11, 2025 17:16
@psorensen psorensen requested review from peterwilsoncc and removed request for a team December 11, 2025 17:16
@psorensen psorensen marked this pull request as draft December 11, 2025 17:16
@github-actions github-actions bot added this to the 2.3.0 milestone Dec 11, 2025
@github-actions github-actions bot added the needs:feedback This requires reporter feedback to better understand the request. label Dec 11, 2025
@github-actions
Copy link

@psorensen thanks for the PR! Could you please fill out the PR template with description, changelog, and credits information so that we can properly review and merge this?

@github-actions github-actions bot removed the needs:feedback This requires reporter feedback to better understand the request. label Dec 11, 2025
@psorensen psorensen force-pushed the feature/pre-push-actions branch from c68ccae to f345b51 Compare December 11, 2025 18:33
@psorensen psorensen marked this pull request as ready for review December 11, 2025 18:56
@github-actions github-actions bot added the needs:code-review This requires code review. label Dec 11, 2025
@jeffpaul jeffpaul moved this from In Progress to Code Review in Open Source Practice Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

Status: Code Review

Development

Successfully merging this pull request may close these issues.

1 participant