21 May 2009 – Added function for when comment is deleted. send curl to api added settings page link to green box on plugins page using action and image on menulinks
added public api_url for easier updating
add_filter('plugin_action_links', array(&$this,'commentluv_action'), -10, 2); // add a settings page link to the plugin description. use 2 for allowed vars
add_action('admin_menu', array(&$this, 'admin_menu'));
// hook the options page
function admin_menu(){
$menutitle = '<img src="' . $this->plugin_url.'images/littleheart.gif" alt="" /> ';
$menutitle .= 'CommentLuv';
add_options_page('CommentLuv Settings', $menutitle, 8, basename(__FILE__), array(&$this, 'handle_options'));
}
// add the settings link
function commentluv_action ($links, $file){
$this_plugin = plugin_basename(__FILE__);
if ($file == $this_plugin){
$links[] = "<a href='options-general.php?page=commentluv.php'>" . '<img src="' . $this->plugin_url.'images/littleheart.gif" alt="" /> ' . __('Settings', $this->plugin_domain) . "";
}
return $links;
}
basic skeleton is now done for no-frills version. the frills to be added..
Plugin Update 21 May 2009
Article by Andy Bailey
I am the creator of CommentLuv and site owner and administrator of ComLuv.com
Andy Bailey has written 190 articles for ComLuv.com
I normally write at The ComLuv Network
21 May 2009 – Added function for when comment is deleted. send curl to api added settings page link to green box on plugins page using action and image on menulinks
added public api_url for easier updating
add_filter('plugin_action_links', array(&$this,'commentluv_action'), -10, 2); // add a settings page link to the plugin description. use 2 for allowed vars
add_action('admin_menu', array(&$this, 'admin_menu'));
// hook the options page
function admin_menu(){
$menutitle = '<img src="' . $this->plugin_url.'images/littleheart.gif" alt="" /> ';
$menutitle .= 'CommentLuv';
add_options_page('CommentLuv Settings', $menutitle, 8, basename(__FILE__), array(&$this, 'handle_options'));
}
// add the settings link
function commentluv_action ($links, $file){
$this_plugin = plugin_basename(__FILE__);
if ($file == $this_plugin){
$links[] = "<a href='options-general.php?page=commentluv.php'>" . '<img src="' . $this->plugin_url.'images/littleheart.gif" alt="" /> ' . __('Settings', $this->plugin_domain) . "";
}
return $links;
}
basic skeleton is now done for no-frills version. the frills to be added..
Info link : in php and jquery
click track : in jquery
error check for returned post : in php
user choice of inserted text : in php
user choice of styling : in php
mu compatibility check : in php
code tidy: in php and jquery