What the Secret Crush mini-API does
Allows you to add activity or meta data tracked by your Pepper during a user’s session to the expanded accordion-view of the Crushes pane’s Most Recent and Search tabs. Your Pepper provides a description of the activity and the time it occurred. Secret Crush figures out the duration and relative placement of that activity and formats it for display. The API allows for adding a row to the session meta data that appears before the list of session activity.
How to implement the Secret Crush mini-API
Add a
session_checksumcolumn to your custom Pepper table (or otherwise store thesession_checksum) in order to associate the activity with an existing session.The existing session_checksum is available as
$_COOKIE['MintCrush'](check for availability before using, default to0).Register/unregister your Pepper with Secret Crush during install, update or uninstall.
Add an
onSecretCrushActivitymethod that returns an array of activity for the given session, indexed by a Unix timestamp. Or add anonSecretCrushMetamethod that returns an associative array of session meta data indexed by display label.
See the Outbound Pepper for an example of an implemented Secret Crush mini-API. Of particular interest: the session_checksum index of the $manifest property and the isCompatible, onInstall, update, onUninstall, onSecretCrushActivity and (commented out) onSecretCrushMeta methods. Neither onSecretCrush* method is required (you can have one without the other).