jan_dembowski

mh-omega-footer.php

Nov 26th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. Plugin Name: Customize Footer on Omega theme and it's child themes
  5. Description: This plugin hard codes a new footer into the <a href="https://wordpress.org/themes/omega/">Omega theme</a> and any child themes for Omega.
  6. Version: 0.1
  7. */
  8.  
  9. add_action( 'after_setup_theme', 'mh_footer_setup', 21  );
  10.  
  11. function mh_footer_setup() {
  12.     // Add new footer a via a filter
  13.     add_filter( 'omega_footer_insert', 'new_default_footer_insert' );
  14.     // Remove old footer via the same filter
  15.     remove_filter( 'omega_footer_insert', 'omega_default_footer_insert' );
  16. }
  17.  
  18. function new_default_footer_insert( $settings ) {
  19.  
  20.     return '<p class="copyright">' . __( 'Copyright &#169; ', 'omega' ) . date_i18n( 'Y' ) . ' ' . get_bloginfo( 'name' ) . '.</p>' . "\n\n" . '<p class="credit"><a class="child-link" href="https://en.wikipedia.org/wiki/Mars_Attacks!" title="Tom Jones was in it!">Mars Attacks!</a> was a fun movie</p>';
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment