Skip to content

Commit

Permalink
🚀 RELEASE: v1.1.4 Update
Browse files Browse the repository at this point in the history
Merge pull request #4 from warengonzaga/dev
  • Loading branch information
warengonzaga authored Apr 21, 2022
2 parents 020ec06 + e195cf1 commit ba6627f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.DS_Store
.dccache
19 changes: 11 additions & 8 deletions update-your-footer-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* Plugin Name: Update Your Footer WP
* Plugin URI: https://github.com/warengonzaga/update-your-footer-wp
* Description: A WordPress shortcode plugin to automagically update your copyright notice year. Simple and lightweight, no annoying ads and fancy settings.
* Version: 1.1.2
* Description: Simple and lightweight WordPress shortcode plugin to automagically update your footer year notice. No annoying ads!
* Version: 1.1.4
* Author: Waren Gonzaga
* Author URI: https://warengonzaga.com
*/
Expand All @@ -16,14 +16,17 @@
defined( 'ABSPATH' ) or die( "Restricted Access!" );

function update_your_footer($atts) {
$copyright = 'Copyright ©';

// wp data
$year = date('Y');
$sitename = '<a href="'. get_bloginfo('url') . '" target="_blank">' . get_bloginfo('name') . '</a>';
$all_rights_reserved = 'All Rights Reserved';
$notice = $copyright . ' ' . $year . ' ' . $sitename . ', ' . $all_rights_reserved . '.';
$site_url = get_bloginfo('url');
$site_name = get_bloginfo('name');

// set footer contents
$footer_content = 'Copyright &copy; ' . esc_html( $year ) . ' <a href="' . esc_url( $site_url ) . '">' . esc_html( $site_name ) . '</a>, All Rights Reserved.';

// final notice
return $notice;
// output footer contents
return $footer_content;
}

// wordpress hook
Expand Down

0 comments on commit ba6627f

Please sign in to comment.