• Resolved wordtalk112

    (@wordtalk112)


    Hello

    Is there a way to apply the deletion process to a custom button.

    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ren Ventura

    (@renventura)

    Hi there. You could call the wp_delete_user_account_delete_button( 'Button Text' ) function in a custom container, and style it accordingly. If your button is outside the post content, such as in a theme template, you’ll need to enable the assets on the frontend using the wp_delete_user_accounts_load_assets_on_frontend filter.

    Thread Starter wordtalk112

    (@wordtalk112)

    Thanks for the reply

    Im not very good at file modification, I take it the loading of front end assets is via the Function.PHP.

    Saying that I use Elementor for page building – elementor has the ability to allow HTML & script to be loaded via widgets for individual pages and custom CSS to be loaded as well.

    Would there be a way to load the delete function via script as Im able to allocate a class to the button via its settings. Thereby using the buttons class to initiate the delete.

    Plugin Author Ren Ventura

    (@renventura)

    The easiest way would be to add the following line to your functions.php file:

    add_filter( 'wp_delete_user_accounts_load_assets_on_frontend', '__return_true' );
    

    Note that this loads the assets on every page. You’d need to add some logic for loading it only where needed.

    Thread Starter wordtalk112

    (@wordtalk112)

    Thanks for the reply, I wouldn’t have a clue how to add a logic form to load assets, I understand adding the filter to Function .PHP.

    I dont know if you would be able to create a silent shortcode (that doesnt display any content but acts as the logic for loading the assets) or url link that could be added to a element (button, icon, image) in any of your future plugin revisions.

    That would be handy and make the functionality of the plugin a lot better for people like me, who know nothing about coding terminology.

    Either way your plugin is the best designed I’ve seen so far.

    Plugin Author Ren Ventura

    (@renventura)

    Thank you for the feedback! ??

    I’ll explore some ideas that might make things like this easier. I appreciate you sharing your thoughts.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Apply delet function to custom button’ is closed to new replies.