Hi firelf,
Thanks for your message.
The only requirement is that custom post types are set to ‘public’ in order to show in the list of available notifications.
For example, if you have the ‘Movies’ custom post type, there should be a ‘New ‘Movie’ Published’ notification available to choose. The ‘New Post Notification’ will only work for the default ‘Post’ post type in WordPress.
Can you confirm that this is available and that you’re using the correct notification?
Thanks,
Jack
Thread Starter
firelf
(@firelf)
Thank you for the reply, Jack. Yes, I do have an options for:
New ‘Job’
‘Job’ Update
‘Job’ pending review
‘Job’ Scheduled
‘Job’ New Comment
We would like New ‘Job’ to work, because site members can post jobs that get published right away. I think I tried some of the other notification type yesterday but don’t remember how far I got or if I got any of them to work. I’ll try again and report back.
Thread Starter
firelf
(@firelf)
I can get a “Pending Review notification if
in my pre_save_post function, I change post_status from publish to pending, so it is working to some degree on my post type..
$post = array(
– ‘post_status’ => ‘publish’,
+ ‘post_status’ => ‘pending’,
Thread Starter
firelf
(@firelf)
But wait, there’s more. After an editor changed the status from pending to publish, the NEW notification fired away its messages.
Is this working as intended?
We’re not so much looking for moderation before publication. We’re looking to take action in the rare event a member does something out of bounds. Trust, but verify.
Hi firelf,
Thanks for testing and the extra information.
It sound like the functions you’re using are using post status transitions that aren’t quite the ones that BNFW is looking for.
I’ve made a conscious effort to ensure the compatibility of BNFW with lots of themes / plugins so have tried to choose the best post status transitions possible. It’s not 100% perfect but it works most of the time.
If you’re comfortable doing so, it’s work taking a look at the code of the plugin and finding what it uses to try and match is in your theme so that the notifications get picked up correctly.
Hope this helps but any other queries / just let me know.
Jack
Thread Starter
firelf
(@firelf)
Thanks, Jack.
We ended up writing a patch:
diff –git a/docroot/wp-content/plugins/bnfw/bnfw.php b/docroot/wp-content/plugins/bnfw/bnfw.php
index 5c8bd81..d7e497a 100644
— a/docroot/wp-content/plugins/bnfw/bnfw.php
+++ b/docroot/wp-content/plugins/bnfw/bnfw.php
@@ -94,7 +94,7 @@ class BNFW {
register_activation_hook( __FILE__ , array( $this, 'activate' ) );
// P2 theme directly inserts the post into db
- if ( 'P2' == wp_get_theme() ) {
+ if ( 'P2' == wp_get_theme() || 'Magazine Premium Child' == wp_get_theme() ) {
add_action( 'wp_insert_post' , array( $this, 'insert_post' ), 10, 3 );
}
Hi firelf,
Pleased you got it sorted in the end.
Thanks,
Jack