2011-09-06, 01:12:06
I'm trying my hands on making a plugin, and I have encountered a problem already...
I added a side menu on the "Pages" tab, but when I click it, all I get is the output of the function but all the side menu's are gone(i.e.: "View all pages","Create new page" and "Activities")
Here's the full code:
GS version: 3.0
I added a side menu on the "Pages" tab, but when I click it, all I get is the output of the function but all the side menu's are gone(i.e.: "View all pages","Create new page" and "Activities")
Here's the full code:
Code:
<?php
/*
Plugin Name: Activities
Description: Display activities
Version:
Author: J-Gamer
Author URI:
*/
# get correct id for plugin
$thisfile=basename(__FILE__, ".php");
register_plugin(
$thisfile, // ID of plugin, should be filename minus php
'Activities', // Title of plugin
'', // Version of plugin
'Jeroen De Busser', // Author of plugin
'', // Author URL
'', // Plugin Description
'', // Page type of plugin
'activities_show' // Function that displays content
);
add_action('pages-sidebar', 'createSideMenu', array($thisfile, 'Activities'));
# functions
function activities_show() {
echo '<p>Activities will be edited here</p>';
}
?>
GS version: 3.0