• Resolved senkax

    (@senkax)


    Hi,

    I want delete button clear log but how can i do it?

    • This topic was modified 1 year ago by senkax.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author P?r Thernstr?m

    (@eskapism)

    In the settings page there is a “Clear log” button. Is that what you are looking for?

    Thread Starter senkax

    (@senkax)

    yes it’s that button, I don’t want that button to “clear the log now”

    just don’t have it in the settings

    Plugin Author P?r Thernstr?m

    (@eskapism)

    Ah, I understand. You want to remove the button completely.

    You can use this PHP code to hide the button. Is uses the simple_history/user_can_clear_log filter to disable the “Clear log” button for all users:

    <?php
    add_filter('simple_history/user_can_clear_log',?'__return_false');
    ?>

    This code uses the?add_filter?function to modify the simple_history/user_can_clear_log filter. The __return_false function is a built-in WordPress function that simply returns?false. This will effectively disable the “Clear log” button for all users.

    You need to add the snippet above to for example your functions.phpfile.

    Hope that works!

    Thread Starter senkax

    (@senkax)

    thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How delete button clear log’ is closed to new replies.