This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
core_docs:plugin_functions [2016/06/04 19:49] Tyblitz [exec_filter] |
core_docs:plugin_functions [2016/06/04 20:05] Tyblitz [Plugin functions] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Plugin functions ====== | ====== Plugin functions ====== | ||
- | This page documents the GetSimpleCMS functions available from ''admin/inc/plugin_functions.php''. | + | This page documents the GetSimpleCMS functions available from ''admin/inc/plugin_functions.php''.\\ |
- | This page is currently a work in progress. | + | The ones you will most commonly need as a plugin/ theme developer are: |
+ | <code>register_plugin, add_action, add_filter, createSideMenu, createNavTab, register_script, queue_script, register_style, queue_style</code> | ||
+ | The following functions are mostly used by GS internally: | ||
+ | <code>get_scripts_frontend, get_scripts_backend, get_styles_frontend, get_styles_backend, read_pluginsxml, create_pluginsxml, cdn_fallback</code> | ||
===== add_action ===== | ===== add_action ===== | ||
**Signature** | **Signature** | ||
Line 25: | Line 28: | ||
===== createSideMenu ===== | ===== createSideMenu ===== | ||
- | '''' | + | **Signature** |
+ | <code>createSideMenu($id, $txt[, $action=null, $always=true])</code> | ||
+ | |||
+ | **Description**\\ | ||
+ | Adds a sidebar link item to the sidebar with ''$id'' as id. | ||
**Parameters:** | **Parameters:** | ||
+ | *''$id'', the id of the sidebar to output the link in | ||
+ | *''$txt'', the text of the sidebar item | ||
+ | *''$action'' //(optional)//, the action parameter in the link's query string. Eg, "edit" will generate a link like ''load.php?id=myplugin&action=edit'' | ||
+ | *''$always'' //(optional)//, set to true if the sidebar item should be loaded on every admin page with a sidebar. | ||
===== createNavTab ===== | ===== createNavTab ===== | ||
**Signature** | **Signature** |