From 55954d208fb86e551f9c427e74e1af70a786dff8 Mon Sep 17 00:00:00 2001 From: "Baris @ 1815" Date: Wed, 26 Oct 2022 07:48:07 +0200 Subject: [PATCH 1/3] chore: apply WordPress Coding Standards --- update-your-footer-wp.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update-your-footer-wp.php b/update-your-footer-wp.php index de7627d..9d42af2 100644 --- a/update-your-footer-wp.php +++ b/update-your-footer-wp.php @@ -13,18 +13,18 @@ */ // prevent direct access -defined( 'ABSPATH' ) or die( "Restricted Access!" ); +defined( 'ABSPATH' ) or die( 'Restricted Access!' ); -function update_your_footer($atts) { +function update_your_footer( $atts ) { // wp data - $year = date('Y'); - $site_url = get_bloginfo('url'); - $site_name = get_bloginfo('name'); + $year = date( 'Y' ); + $site_url = get_bloginfo( 'url' ); + $site_name = get_bloginfo( 'name' ); // output data return 'Copyright © ' . esc_html( $year ) . ' ' . esc_html( $site_name ) . ', All Rights Reserved.'; } // wordpress hook -add_shortcode('uyf_wp', 'update_your_footer'); +add_shortcode( 'uyf_wp', 'update_your_footer' ); From b25822ad48eaf86539e557c119e728832b71ef2f Mon Sep 17 00:00:00 2001 From: "Baris @ 1815" Date: Wed, 26 Oct 2022 07:50:22 +0200 Subject: [PATCH 2/3] feat: make strings translatable + add pot file --- languages/update-your-footer-wp.pot | 43 +++++++++++++++++++++++++++++ update-your-footer-wp.php | 4 ++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 languages/update-your-footer-wp.pot diff --git a/languages/update-your-footer-wp.pot b/languages/update-your-footer-wp.pot new file mode 100644 index 0000000..d2b19b6 --- /dev/null +++ b/languages/update-your-footer-wp.pot @@ -0,0 +1,43 @@ +# Copyright (C) 2022 Waren Gonzaga +# This file is distributed under the same license as the Update Your Footer WP plugin. +msgid "" +msgstr "" +"Project-Id-Version: Update Your Footer WP 1.2.1\n" +"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/update-your-footer-wp\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"POT-Creation-Date: 2022-10-26T05:39:33+00:00\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"X-Generator: WP-CLI 2.7.1\n" +"X-Domain: uyf_wp\n" + +#. Plugin Name of the plugin +msgid "Update Your Footer WP" +msgstr "" + +#. Plugin URI of the plugin +msgid "https://github.com/warengonzaga/update-your-footer-wp" +msgstr "" + +#. Description of the plugin +msgid "Simple and lightweight WordPress shortcode plugin to automagically update your footer year notice. No annoying ads!" +msgstr "" + +#. Author of the plugin +msgid "Waren Gonzaga" +msgstr "" + +#. Author URI of the plugin +msgid "https://warengonzaga.com" +msgstr "" + +#: update-your-footer-wp.php:27 +msgid "Copyright" +msgstr "" + +#: update-your-footer-wp.php:27 +msgid "All Rights Reserved" +msgstr "" diff --git a/update-your-footer-wp.php b/update-your-footer-wp.php index 9d42af2..7a0abaa 100644 --- a/update-your-footer-wp.php +++ b/update-your-footer-wp.php @@ -6,6 +6,8 @@ * Version: 1.2.1 * Author: Waren Gonzaga * Author URI: https://warengonzaga.com +* Text Domain: update-your-footer-wp +* Domain Path: /languages */ /** @@ -23,7 +25,7 @@ function update_your_footer( $atts ) { $site_name = get_bloginfo( 'name' ); // output data - return 'Copyright © ' . esc_html( $year ) . ' ' . esc_html( $site_name ) . ', All Rights Reserved.'; + return __( 'Copyright', 'update-your-footer-wp' ) . ' © ' . esc_html( $year ) . ' ' . esc_html( $site_name ) . ', ' . __( 'All Rights Reserved', 'update-your-footer-wp' ) . '.'; } // wordpress hook From 337d80a7b2180ca480bf5714367730ab18a19433 Mon Sep 17 00:00:00 2001 From: Waren Gonzaga Date: Sun, 27 Nov 2022 08:45:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E2=98=95CHORE:=20update=20version=20and=20?= =?UTF-8?q?info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++----- update-your-footer-wp.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4adc661..19e359c 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ [![created by](https://img.shields.io/badge/created%20by-Waren%20Gonzaga-blue.svg?longCache=true&style=flat-square)](https://github.com/warengonzaga) [![release](https://img.shields.io/github/release/warengonzaga/update-your-footer-wp.svg?style=flat-square)](https://github.com/warengonzaga/update-your-footer-wp/releases) [![star](https://img.shields.io/github/stars/warengonzaga/update-your-footer-wp.svg?style=flat-square)](https://github.com/warengonzaga/update-your-footer-wp/stargazers) [![installs](https://img.shields.io/wordpress/plugin/installs/update-your-footer-wp?style=flat-square)](https://wordpress.org/plugins/update-your-footer-wp) [![license](https://img.shields.io/github/license/warengonzaga/update-your-footer-wp.svg?style=flat-square)](https://github.com/warengonzaga/update-your-footer-wp/blob/main/license) -> 📢 Nominate ([@warengonzaga](https://warengonzaga.com)) as **[GitHub Star](https://stars.github.com/nominate)**. If you appreciate his hardwork and dedication to open source. - ![banner](.github/assets/banner-1544x500.jpg) Simple and lightweight WordPress shortcode plugin to automagically update your footer year notice. No annoying ads! 📅💻🧩 @@ -46,10 +44,10 @@ Please report any issues and bugs by [creating a new issue here](https://github. ## 🍀 Sponsors and Supporters -> Love what I do? **[Send me some coffees](https://warengonzaga.com/donate)**! ☕☕☕ +> Love what I do? Send me some [love](https://github.com/sponsors/warengonzaga) or [coffee](https://buymeacoff.ee/warengonzaga)!? 💖☕ > -> Can't send coffees? 😥 Nominate me for a **[GitHub Star](https://stars.github.com/nominate)** instead! -> Your coffee donation and support will help me to continue working on open-source projects like this. 🙏😇 +> Can't send love or coffees? 😥 Nominate me for a **[GitHub Star](https://stars.github.com/nominate)** instead! +> Your support will help me to continue working on open-source projects like this. 🙏😇 ## 📋 Code of Conduct diff --git a/update-your-footer-wp.php b/update-your-footer-wp.php index 7a0abaa..f5cc2cb 100644 --- a/update-your-footer-wp.php +++ b/update-your-footer-wp.php @@ -3,7 +3,7 @@ * Plugin Name: Update Your Footer WP * Plugin URI: https://github.com/warengonzaga/update-your-footer-wp * Description: Simple and lightweight WordPress shortcode plugin to automagically update your footer year notice. No annoying ads! -* Version: 1.2.1 +* Version: 1.2.2 * Author: Waren Gonzaga * Author URI: https://warengonzaga.com * Text Domain: update-your-footer-wp