• Resolved tezalsec

    (@tezalsec)


    Hi Suman,

    thanks for your great plugin!

    I have a few feedback/request things I would like to pass by you.

    – First it would be great if it would be possible to be able to prepopulate a user checkbox by passing his ID as an url parameter on your email user page.

    For example, the url: https://example.com/wp-admin/admin.php?page=send-users-email-users&uid=34 , would visit your page and have user 34 immediately checked. This would allow for easy integration into many admin columns where users are listed, with a “email” link as a new column. That would be a great advantage.

    – The same could be for the subject field. If the url contains the subject parameter, prepopulate the subject field on your email form.

    – I would also really like to have a default fallback subject option added to settings. Maybe place this default subject value clickable behind/below the subject field in your form, so it would fill it in with JS with one click ??

    – Maybe a setting to be able to default exclude some roles in the roles form?

    – Small typo, “Emails send successfully” should be “Emails sent successfully”.

    – also please add some recognizable class to the body elements of your admin pages, like send-email-user-form

    – Where is your donation link, dude? ??

    Thanks and cheers!

    • This topic was modified 3 years, 1 month ago by tezalsec.
    • This topic was modified 3 years, 1 month ago by tezalsec.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Suman Bhattarai

    (@metalfreek)

    Hi tezalsec, thank you for your suggestion and review. I am glad you like my work. I will try my best to implement your suggestions in future versions. If you want to further contribute to development of the plugin, you can donate to the work here.

    Thread Starter tezalsec

    (@tezalsec)

    Did not want to wait for the user id function, so went ahead and created below function. Maybe it helps someone ??

    /*
    *  Prepopulate datatable search field when landing on user email admin page
    */
    function prepopulate_search_user_field() {
    
        if( isset( $_GET['page'] ) && ($_GET['page'] == 'send-users-email-users') ):
            if( isset( $_GET['uid'] ) || isset( $_GET['subject'] )  ):
                ?>
                <script type="text/javascript">
                (function($){
    
                    $('input[name="subject"]').val("<?php echo $_GET['subject']; ?>");
                    // https://datatables.net/reference/api/draw()
                    var table = $('#sue-user-email-tbl').DataTable();
                    table.search( <?php echo $_GET['uid']; ?> ).draw();
    
                })(jQuery);
                </script>
                <?php
            endif;
    
        endif;
    }
    add_action( 'shutdown', 'prepopulate_search_user_field' );
    • This reply was modified 3 years, 1 month ago by tezalsec.
    Plugin Contributor Suman Bhattarai

    (@metalfreek)

    Thank you for your input tezalsec. Appreciate it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Feature suggestions’ is closed to new replies.