diff --git a/ai-credits.php b/ai-credits.php new file mode 100644 index 0000000000000000000000000000000000000000..1c0993848f9ae46d93ccdb549fea18f1f3085f9b --- /dev/null +++ b/ai-credits.php @@ -0,0 +1,25 @@ +<?php +/* + * Plugin Name: A/I - Credits + * Description: Show Autistici/Inventati credits in some themes' footers + * Version: 0.0.1 + * Author: Autistici/Inventati + * Author URI: https://autistici.org + */ + +function ai_footer_credits(){ + echo '<strong><a href="https://noblogs.org">Noblogs</a> is a project of <a href="https://www.autistici.org">R*</a></strong> | '; +} + +# defines a custom action hook, to be used when patching themes +# use this by adding in the footer.php file of the theme, at the appropriate location (usually before/after "Powered by Wordpress") +# <?php do_action( 'ai_credits' ); ?> +add_action('ai_credits', 'ai_footer_credits'); + +# ten does have a _credits hook, but it not work nicely due to annoying image background to <a> elements set in the CSS of the theme +foreach (array('eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen') as $year){ + add_action('twenty' . $year . '_credits', 'ai_footer_credits'); +} + + +?>