2018-02-05 13:14:40 +01:00
|
|
|
<?php
|
|
|
|
/*
|
2018-02-11 17:51:23 +01:00
|
|
|
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.
|
2018-02-14 18:50:55 +01:00
|
|
|
Version: 2018.0214
|
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/
|
2018-02-05 14:03:55 +01:00
|
|
|
GitHub Plugin URI: https://github.com/ulaulaman/eduinaf
|
2018-02-05 13:14:40 +01:00
|
|
|
License: GPLv2 or later
|
|
|
|
*/
|
|
|
|
/* ------------------------------------------------------ */
|
2018-02-11 17:51:23 +01:00
|
|
|
# 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' );
|
|
|
|
/* ------------------------------------------------------ */
|
|
|
|
?>
|