mirror of
https://github.com/ulaulaman/eduinaf.git
synced 2024-12-15 23:18:34 +01:00
52 lines
1.7 KiB
PHP
52 lines
1.7 KiB
PHP
<?php
|
|
/*
|
|
Plugin Name: Edu INAF Tools
|
|
Description: Il plugin aggiunge varie funzionalità al sito Edu INAF senza modificare direttamente il codice php del tema.
|
|
Version: 2018.0214
|
|
Author: Gianluigi Filippelli
|
|
Author URI: http://dropseaofulaula.blogspot.it/
|
|
Plugin URI: https://ulaulaman.github.io/eduinaf/
|
|
GitHub Plugin URI: https://github.com/ulaulaman/eduinaf
|
|
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' );
|
|
|
|
# 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' );
|
|
/* ------------------------------------------------------ */
|
|
?>
|