Is this a feature you’d consider adding to the plugin settings? And if not, can you suggest a save_post hook function that would run your plugin on a post when it’s created or updated?
Something like this could go into a such function, if you can craft it properly ??
global $sti_global_settings;
$tags_relevances = STI_general_functions::get_tags_relevance( $sti_global_settings['plugin_settings']['tags_list'], $post->post_content );
$to_add = array_slice( $tags_relevances, 0, $sti_global_settings['plugin_settings']['default_tags_number'] );
foreach( $to_add as $tag => $relevance )
if( $relevance == 0 ) unset( $to_add[$tag] ); //don't add tags with relevance == 0
wp_set_post_tags( $single, array_keys( $to_add ), false );
On a separate subject, do you think there’s anything you could do to your plugin listing text to get it to appear in the plugin search ‘automatic post tagger‘ and other related search terms. I don’t see your plugin appearing in many of the related searches I tried. You might get a lot more interest that way.
There is probably some way, I’ll look into it when I’ve got some time ??