Hooks: actions and filters

Hooks: actions and filters

Postby Erik Sefkow » Sat 20. Apr 2013, 22:55

Like Wordpress, really-static provides two kinds of hooks: actions and filters. The main difference is, that a filter require a return value and a action not.
filters:
rs-pre-rewriting-filecontent
really-static modifies the downloaded html-code. This filter is called right after the download
param1: content
param2: url

rs-post-rewriting-filecontent
really-static modifies the downloaded html-code. This filter is called after all modifications
param1: content
param2: url

rs-do-download
if you want to define own http-downloadload routins
param1: downloaded content
param2: url

rs-transport
if you want to create own saveingroutines

rs-updatefile-source
is called right at the end of really-statics work, just bevor really-static try to load a url. with this filter you can modifiy the sourceurl
param2: sourceurl

rs-updatefile-destination
is called right at the end of really-statics work, just bevor really-static try to load a url. with this filter you can modifiy the destinationfile and path
param2: destinationpath

rs-transport

rs-todolist
called when really-static is ready with collecting urls and contains 2 subarrays with urls

rs-todolist-add
is called if someting is added to the todolist

rs-todolist-delete
is called if someting is fromto the todolist

  • rs-comment-redirecturl
  • rs-pre-urlrewriter:
  • rs-post-urlrewriter:
  • rs-rewriterules-wp2s
  • rs-rewriterules-s2wp
  • rs-rewriterules-main
  • rs-adminmenu-show : Erlaubt weitere Einträge ins Really-Staticadminmenü einzubauen
  • rs-adminmenu-transport
  • rs-adminmenu-savealltransportsettings
  • rs-adminmenu-refreshsinglepage
  • rs-adminmenu-refreshallpages
  • rs-adminmenu-show

Actions:
  • rs-aboutyourplugin: Gibt dem Pluginautoren sich im Menüpunkt “Über Really-Static” zu verwiegen
  • rs-write-file: wird aufgerufen wenn eine datei auf den Staticserver geladen wird
  • rs-downloaded-url: übergibt den Dateiinhalt und die Url
Erik Sefkow
Administrator
 
Posts: 69
Joined: Sun 16. Sep 2012, 14:44

Return to development


cron