Planet WP-Fr by Amaury
Language: PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | <?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' ); ?> |