• Resolved darylldelfin

    (@darylldelfin)


    Hi Pär,

    I’ve been wanting to use this very neat plugin. Is there a way where I can pull the data from it and present it in a new front-end UI?

    Thanks,
    Daryll

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

    (@eskapism)

    There is a class called SimpleHistoryLogQuery that you can use to get events as an array and then do whatever you like with it.

    Something like this should get you started:

    
    // Get the last 20 events from Simple History
    $query = new SimpleHistoryLogQuery();
    
    $query_args = array(
    	"paged" => 1,
    	"posts_per_page" => 20
    );
    
    $events = $query->query($query_args);
    
    foreach ( $events["log_rows"] as $one_row ) {
      // do something with each row..
      echo '<pre>' . print_r($one_row, true) . '</pre>';
    }
    
    Thread Starter darylldelfin

    (@darylldelfin)

    Hi Par, thanks.
    I have an additional question,
    is there any way that we can group the log entries, for example, a custom field in a log entry perhaps? Any way to do this? Thanks

    Nice! How can I get translated message? Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Simple History Front-end UI’ is closed to new replies.