eduinaf/eduinaf.php

52 lines
1.7 KiB
PHP
Raw Normal View History

2018-02-05 13:14:40 +01:00
<?php
/*
Plugin Name: Edu INAF Tools
2018-02-05 13:14:40 +01:00
Description: Il plugin aggiunge varie funzionalità al sito Edu INAF senza modificare direttamente il codice php del tema.
Version: 201802.1
2018-02-05 13:14:40 +01:00
Author: Gianluigi Filippelli
Author URI: http://dropseaofulaula.blogspot.it/
2018-02-10 00:23:46 +01:00
Plugin URI: https://ulaulaman.github.io/eduinaf/
GitHub Plugin URI: https://github.com/ulaulaman/eduinaf
2018-02-05 13:14:40 +01:00
License: GPLv2 or later
*/
/* ------------------------------------------------------ */
# inclusione file
define( 'EDUINAF__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
# pagina di descrizione
require_once( EDUINAF__PLUGIN_DIR . 'incl/menu.php' );
# manipolazione feed
require_once( EDUINAF__PLUGIN_DIR . 'incl/feed.php' );
# contacaratteri
require_once( EDUINAF__PLUGIN_DIR . 'incl/conta.php' );
# creazione link: astroedu, spacescoop
require_once( EDUINAF__PLUGIN_DIR . 'link/link.php' );
2018-02-05 13:14:40 +01:00
# messaggio nell'admin footer
function remove_footer_admin () {
echo 'Benvenuto su <a href="http://edu.inaf.it/" target="inaf">Edu INAF</a> | Sito realizzato con <a href="http://www.wordpress.org" target="word">WordPress</a></p>';
}
add_filter('admin_footer_text', 'remove_footer_admin');
# Aggiunta del logo e modifica del link nella pagina di login
function custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image: url('.plugin_dir_url( __FILE__ ).'images/avatar_eduinaf.png) !important; }
</style>';
}
add_action('login_head', 'custom_login_logo');
function eduinaf_login_logo_url() {
return home_url();
}
add_filter( 'login_headerurl', 'eduinaf_login_logo_url' );
function eduinaf_login_logo_url_title() {
return 'Edu INAF';
}
add_filter( 'login_headertitle', 'eduinaf_login_logo_url_title' );
/* ------------------------------------------------------ */
?>