Use Post ID in functions.php

Only posting an alternative answer despite the question being about a 3rd-party plugin, whose source code isn’t even freely available, because I don’t believe the accepted answer is likely to be a good solution. It’s not documented on their website, but a comment from the developer states: These would all be considered custom requests, which … Read more

Filter by Post Type

You can use WP_Query for that : $contentTypes = explode(‘,’, $_POST[‘contents’]); $qry = new WP_Query( array( ‘post_type’ => $contentTypes )); if( $qry->have_posts() ){ while( $qry->have_posts() ) { $qry->the_post() // Your code } } Here is the [docs] ( https://codex.wordpress.org/Class_Reference/WP_Query ) for WP_Query

Showing how many times is plugin activated or deactivated

Although you might have already managed to solve the problem you faced, here’s few thoughts. You could use register_activation_hook(), register_deactivation_hook() and register_uninstall_hook() functions to trigger a wp_remote_post() call to your (custom) API endpoint to count the times when your plugin is activated, deactivated or deleted. If the recieving site, where you keep track of the … Read more