We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
dt_available_pull_post_types
There's a filter to add non-existing post type to the pull option. https://10up.github.io/distributor/dt_available_pull_post_types.html
But it's not working because this filter results is compared to the distributable_post_types() function which uses post_type_exists check.
distributable_post_types()
post_type_exists
Summary:
dt_available_pull_post_types Filter: https://github.com/10up/distributor/blob/develop/includes/utils.php#L274-L283
$pull_post_types = apply_filters( 'dt_available_pull_post_types', $post_types, $remote_post_types, $local_post_types, $connection, $type ); if ( ! empty( $pull_post_types ) ) { $post_types = array(); foreach ( $pull_post_types as $post_type ) { if ( in_array( $post_type['slug'], $distributable_post_types, true ) ) { $post_types[] = $post_type; } } }
distributable_post_types Function: https://github.com/10up/distributor/blob/develop/includes/utils.php#L325
distributable_post_types
$post_types = array_filter( $post_types, 'post_type_exists' );
n/a - see description
WP 6.4.3 / Distributor 2.0.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
There's a filter to add non-existing post type to the pull option.
https://10up.github.io/distributor/dt_available_pull_post_types.html
But it's not working because this filter results is compared to the
distributable_post_types()
function which usespost_type_exists
check.Summary:
post_type_exists
dt_available_pull_post_types
Filter:https://github.com/10up/distributor/blob/develop/includes/utils.php#L274-L283
distributable_post_types
Function:https://github.com/10up/distributor/blob/develop/includes/utils.php#L325
Steps to Reproduce
post_type_exists
Screenshots, screen recording, code snippet
n/a - see description
Environment information
WP 6.4.3 / Distributor 2.0.3
WordPress information
WP 6.4.3 / Distributor 2.0.3
Code of Conduct
The text was updated successfully, but these errors were encountered: