@voltronik
You have that correct, I don’t use custom post types. In fact it’s possible to Revisionize any custom post type. So the post gets duplicated and the post_status is draft.
My naive approach would be BNFW to let me add_filter
– something like
add_filter('bnfw-custom-notifications', function($notifications) {
$notifications['revisionize_new_revision_created'] = array(
'label' => 'Revisionize: Created',
'description' => '...',
'other_settings_you_need' => '...'
);
});
The above would show my custom notification in the BNFW admin panel and allow users to configure who gets notified just like your built-in events. For you to set this up, you would need to $custom_notifications = apply_filters('bnfw-custom-notification', array())
and then add_action
for the ones returned. Like this:
foreach ($custom_notifications as $key=>$val) {
// Set up the your admin UI based on settings in $val
// listen for when I trigger the custom action
add_action($key /*revisionize_new_revision_created*/, 'handle_custom_notification');
}
function handle_custom_notification($args) {
// you need to tell me the $args you need here
// and then fire off the notification
}
I would trigger the event with do_action
,
// need to know the $args you need
do_action('revisionize_new_revision_created', $arg1, $arg2, $etc)
This does open the door for other devs to extend your plugin. I recognize you’ve monetized it and this may allow devs to write their own “pro” features that compete with your own.
What do you think? If you’re not interested in taking this further, no problem, but please let me know. Thanks!!
-
This reply was modified 8 years, 4 months ago by
jamiechong.
-
This reply was modified 8 years, 4 months ago by
jamiechong.