Feature Request: Add/Edit/Delete Notes functions
-
I love the plugin, and use it on many sites.
One feature I would love to see and would personally use on most sites I have it installed is to be able to call a function or an action hook to be able to add/edit/delete notes programatically.
Something like:
// function to add new note function pnp_add_plugin_note( $plugin_id, $note_content, $note_icon=null, $user_id=null) { // set default for note_icon to dashicons-clipboard // set default for user_id to current_user_id // processing code here to validate and add to db // return true on success or error message on failure }
then in my code I could simply:
$pi_slug = 'plugin-slug/file.php'; $url = 'https://url/where/the/plugin/came/from'; $msg = 'Plugin Source: '.esc_url($url); $new_note = pnp_add_plugin_note( $pi_slug, $msg ); if ( !$new_note === true ) { // do something with error message }
Yes, I can accomplish the task with $wpdb and my own code, but I would love to see this built-in to Plugin Notes Plus!
I do a lot of plugin management through code, not so much in the wp-admin plugins page manually, so dynamically creating/editing/deleting notes in code would be an amazing addition to the plugin!
Hope this makes sense and seems like a worthwhile addition. Thanks for your hard work!
- The topic ‘Feature Request: Add/Edit/Delete Notes functions’ is closed to new replies.