saquery.com
a web developer' s kung fu…
Categories: english | Add a Comment
This sample shows a good and well structured way to code your own WordPress Plugin in PHP. <?php /* Plugin Name: Your plugin-name Plugin URI: http://www.example.com Description: Your description. Version: 1.0.0.0 Author: Your name Author URI: http://www.example.com */ global $myWordpressPlugin; $myWordpressPlugin = new myWordpressPlugin(); class myWordpressPlugin{ function wp_head(){ echo '<!-- test -->'."\n"; } } add_action('wp_head', [...]