WordPress.org

Support

Support » Plugins and Hacks » Simple History » [Resolved] Suggestion: Custom Event

[Resolved] Suggestion: Custom Event

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pär Thernström

    @eskapism

    I believe you already can do that. Some examples:

    <?php
    
    # Check that function exists before trying to use it
    # Just in case someone disabled the history plugin or similar
    if (function_exists("simple_history_add")) {
    
        # Log that an email has been sent
        simple_history_add(array(
            "object_type" => "Email",
            "action" => "sent",
            "object_name" => "Hi there"
        ));
    
        # Will show “Plugin your_plugin_name Edited” in the history log
        simple_history_add("action=edited&object_type=plugin&object_name=your_plugin_name");
    
        # Will show the history item "Starship USS Enterprise repaired"
        simple_history_add("action=repaired&object_type=Starship&object_name=USS Enterprise");
    
    ?>

    Would that work for you?

    I guess I could make that work. I was thinking that a textarea could be provided for short notes to be made in a free-form manner.

    Plugin Author Pär Thernström

    @eskapism

    Ah, I understand. I’ll add that to the feature-request-list!

    Awesome, thank you. Sorry for not being more clear at first.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Suggestion: Custom Event’ is closed to new replies.
Skip to toolbar