<?php
/*
Plugin Name: Planet Fr
Plugin URI: http://www.wordpress-fr.net/planet/
Description: Cette extension permet de remplacer le bloc "Autres actualités de WordPress" du tableau de bord par l'actualité francophone du Planet.
Version: 1.0
Author: Amaury Balmer
Author URI: http://wp-box.fr
---
Copyright 2008 Amaury BALMER (balmer.amaury@gmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
if (is_admin ()) {
function planet_fr_link($link = '') {
return 'http://www.wordpress-fr.net/planet/';
}
add_filter ( 'dashboard_secondary_link', 'planet_fr_link' );
function planet_fr_feed($feed = '') {
return 'http://www.wordpress-fr.net/planet/?type=rss10';
}
add_filter ( 'dashboard_secondary_feed', 'planet_fr_feed' );
function planet_fr_title($name = '') {
return 'Autres actualités francophones de WordPress';
}
add_filter ( 'dashboard_secondary_title', 'planet_fr_title' );
}
function delete_planet_us() {
$widget_options = get_option ( 'dashboard_widget_options' );
if (isset ( $widget_options ['dashboard_secondary'] )) {
unset ( $widget_options ['dashboard_secondary'] );
update_option ( 'dashboard_widget_options', $widget_options );
}
}
register_activation_hook ( __FILE__, 'delete_planet_us' );
?>