Plugin example. Standard website creation button
Result
The standard "Create a site" button without the drop-down list with the option to install WordPress.
Plugin XML description
Create the file /usr/local/mgr5/etc/xml/ispmgr_mod_wp.xml with 644 permissions (owner and group root). File contents:
<?xml version="1.0" encoding="UTF-8"?>
<mgrdata>
<handler name="wp.sh" type="xml">
<event name="webdomain" after="yes"/>
</handler>
</mgrdata>Handler
Create the handler file /usr/local/mgr5/addon/wp.sh with 750 permissions (owner and group root). File contents:
#!/bin/sh
cat | sed 's|<toolgrp name="create_site"[^>]*>|<toolgrp name="create_site"><toolbtn name="create_site" func="site.edit" type="new" img="t-new" detached="yes"/>|' | sed 's|<toolbtn name="new_site"[^>]*>||' | sed 's|<toolbtn name="wp_site"[^>]*>||'Now, for ispmanager to apply the added XML description of the plugin, execute the command in the server command line:
pkill core