Changeset 2126847
- Timestamp:
- 07/22/2019 07:26:26 PM (7 years ago)
- Location:
- automatic-copyright-year
- Files:
-
- 4 edited
- 1 copied
-
tags/1.1 (copied) (copied from automatic-copyright-year/trunk)
-
tags/1.1/automatic-copyright-year.php (modified) (1 diff)
-
tags/1.1/readme.txt (modified) (5 diffs)
-
trunk/automatic-copyright-year.php (modified) (1 diff)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
automatic-copyright-year/tags/1.1/automatic-copyright-year.php
r1344345 r2126847 1 1 <?php 2 /* 3 Plugin Name: Automatic Copyright Year4 Plugin URI: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/5 Description: Replaces '<span>[wpsos_year]</span>' with the current year in widget texts and in the html element 'footer'6 Author: WPSOS7 Version: 1.08 Author URI: http://www.wpsos.io/9 Licence: GPLv2 or later2 /** 3 * Plugin Name: Automatic Copyright Year 4 * Plugin URI: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/ 5 * Description: Replaces '<span>[wpsos_year]</span>' with the current year in widget texts and in the html element 'footer' 6 * Author: WPSOS 7 * Version: 1.0 8 * Author URI: http://www.wpsos.io/ 9 * Licence: GPLv2 or later 10 10 */ 11 12 // Exit if accessed directly. 13 if ( ! defined( 'ABSPATH' ) ) { 14 exit; 15 } 11 16 12 17 /** 13 18 * Modifies the content of the text, replacing [wpsos_year] with the current year number 14 * 15 * @param String $content 16 * @return String The modified text 19 * 20 * @param String $content Content. 21 * @return String The modified text. 17 22 */ 18 function wpsos_replace_copyright_year( $content ){ 19 $content = str_replace( '[wpsos_year]', date('Y'), $content ); 20 //Return the modified text 23 function wpsos_acy_replace_copyright_year( $content ) { 24 $content = str_replace( '[wpsos_year]', date( 'Y' ), $content ); 25 26 // Return the modified text. 21 27 return $content; 22 28 } 23 //Add filters to run the functions before displaying content on the screen24 add_filter( 'widget_text', 'wpsos_replace_copyright_year', 10, 1 );25 29 26 // Include the scripts required by the plugin 27 function wpsos_include_scripts(){ 28 wp_enqueue_script('jquery'); 29 wp_enqueue_script( 'wpsos-copyright', plugin_dir_url( __FILE__ ) . 'script.js', array('jquery'), '1.0', true); 30 } 31 add_action( 'wp_enqueue_scripts', 'wpsos_include_scripts' ); 30 // Add filters to run the functions before displaying content on the screen. 31 add_filter( 'widget_text', 'wpsos_acy_replace_copyright_year', 10, 1 ); 32 32 33 33 /** 34 * Add links to WPSOS34 * Include scripts needed for the plugin. 35 35 */ 36 function wpsos_acy_set_plugin_meta( $links, $file ) { 36 function wpsos_acy_include_scripts() { 37 wp_enqueue_script( 'jquery' ); 38 wp_enqueue_script( 'wpsos-copyright', plugin_dir_url( __FILE__ ) . 'script.js', array( 'jquery' ), '1.0', true ); 39 } 40 add_action( 'wp_enqueue_scripts', 'wpsos_acy_include_scripts' ); 37 41 38 if ( strpos( $file, 'automatic-copyright-year.php' ) !== false ) { 39 40 $links = array_merge( $links, array( '<a href="http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/">' . __( 'Plugin details' ) . '</a>' ) ); 41 $links = array_merge( $links, array( '<a href="http://www.wpsos.io/">WPSOS - WordPress Security & Hack Repair</a>' ) ); 42 } 43 return $links; 42 /** 43 * Return year number for the shortcode. 44 * 45 * @return string Date. 46 */ 47 function wpsos_acy_add_shortcode() { 48 return date( 'Y' ); 44 49 } 45 add_filter( 'plugin_row_meta', 'wpsos_acy_set_plugin_meta', 10, 2 ); 46 ?> 50 add_shortcode( 'wpsos_year', 'wpsos_acy_add_shortcode' ); -
automatic-copyright-year/tags/1.1/readme.txt
r1344345 r2126847 1 1 === Automatic Copyright Year === 2 Contributors: citywanderer, stubgo2 Contributors: miinasikk, citywanderer 3 3 Donate link: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/ 4 4 Tags: copyright,shortcode,copyright year,footer copyright,widget 5 5 Requires at least: 3.0.1 6 Tested up to: 4.4.27 Stable tag: 1. 06 Tested up to: 5.2.2 7 Stable tag: 1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 20 20 Instead of going through every site you have each year on the 1st of January and change the year manually, now it will all be done seamlessly for you. Just install the Automatic Copyright Year plugin and voila: your sites will always have an up-to-date copyright. 21 21 22 For more information and support, check out: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/23 24 22 == Installation == 25 23 … … 28 26 1. Upload the folder `automatic-copyright-year` to the `/wp-content/plugins/` directory 29 27 2. Activate the plugin through the 'Plugins' menu in WordPress 30 3. Add '<span>[wpsos_year]</span>' (<span>[wpsos_year]</span>, surrounded by span tags) to a widget or to anywhere inside the html footer element28 3. Add '<span>[wpsos_year]</span>' (<span>[wpsos_year]</span>, surrounded by span tags) as shortcode, to a widget or to anywhere inside the html footer element. 31 29 32 30 == Frequently Asked Questions == … … 38 36 = Where can I get some support? = 39 37 40 Check out our site, at: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/ 38 Let us know via the support forum. 41 39 42 40 = I have some suggestions for other options I want edited = 43 41 44 Let us know , via: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/42 Let us know via the support forum. 45 43 46 44 == Screenshots == … … 50 48 == Changelog == 51 49 50 = 1.1 = 51 * Allow using [wpsos_year] as shortcode. 52 52 53 = 1.0 = 53 54 * Initial version. -
automatic-copyright-year/trunk/automatic-copyright-year.php
r1344345 r2126847 1 1 <?php 2 /* 3 Plugin Name: Automatic Copyright Year4 Plugin URI: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/5 Description: Replaces '<span>[wpsos_year]</span>' with the current year in widget texts and in the html element 'footer'6 Author: WPSOS7 Version: 1.08 Author URI: http://www.wpsos.io/9 Licence: GPLv2 or later2 /** 3 * Plugin Name: Automatic Copyright Year 4 * Plugin URI: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/ 5 * Description: Replaces '<span>[wpsos_year]</span>' with the current year in widget texts and in the html element 'footer' 6 * Author: WPSOS 7 * Version: 1.0 8 * Author URI: http://www.wpsos.io/ 9 * Licence: GPLv2 or later 10 10 */ 11 12 // Exit if accessed directly. 13 if ( ! defined( 'ABSPATH' ) ) { 14 exit; 15 } 11 16 12 17 /** 13 18 * Modifies the content of the text, replacing [wpsos_year] with the current year number 14 * 15 * @param String $content 16 * @return String The modified text 19 * 20 * @param String $content Content. 21 * @return String The modified text. 17 22 */ 18 function wpsos_replace_copyright_year( $content ){ 19 $content = str_replace( '[wpsos_year]', date('Y'), $content ); 20 //Return the modified text 23 function wpsos_acy_replace_copyright_year( $content ) { 24 $content = str_replace( '[wpsos_year]', date( 'Y' ), $content ); 25 26 // Return the modified text. 21 27 return $content; 22 28 } 23 //Add filters to run the functions before displaying content on the screen24 add_filter( 'widget_text', 'wpsos_replace_copyright_year', 10, 1 );25 29 26 // Include the scripts required by the plugin 27 function wpsos_include_scripts(){ 28 wp_enqueue_script('jquery'); 29 wp_enqueue_script( 'wpsos-copyright', plugin_dir_url( __FILE__ ) . 'script.js', array('jquery'), '1.0', true); 30 } 31 add_action( 'wp_enqueue_scripts', 'wpsos_include_scripts' ); 30 // Add filters to run the functions before displaying content on the screen. 31 add_filter( 'widget_text', 'wpsos_acy_replace_copyright_year', 10, 1 ); 32 32 33 33 /** 34 * Add links to WPSOS34 * Include scripts needed for the plugin. 35 35 */ 36 function wpsos_acy_set_plugin_meta( $links, $file ) { 36 function wpsos_acy_include_scripts() { 37 wp_enqueue_script( 'jquery' ); 38 wp_enqueue_script( 'wpsos-copyright', plugin_dir_url( __FILE__ ) . 'script.js', array( 'jquery' ), '1.0', true ); 39 } 40 add_action( 'wp_enqueue_scripts', 'wpsos_acy_include_scripts' ); 37 41 38 if ( strpos( $file, 'automatic-copyright-year.php' ) !== false ) { 39 40 $links = array_merge( $links, array( '<a href="http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/">' . __( 'Plugin details' ) . '</a>' ) ); 41 $links = array_merge( $links, array( '<a href="http://www.wpsos.io/">WPSOS - WordPress Security & Hack Repair</a>' ) ); 42 } 43 return $links; 42 /** 43 * Return year number for the shortcode. 44 * 45 * @return string Date. 46 */ 47 function wpsos_acy_add_shortcode() { 48 return date( 'Y' ); 44 49 } 45 add_filter( 'plugin_row_meta', 'wpsos_acy_set_plugin_meta', 10, 2 ); 46 ?> 50 add_shortcode( 'wpsos_year', 'wpsos_acy_add_shortcode' ); -
automatic-copyright-year/trunk/readme.txt
r1344345 r2126847 1 1 === Automatic Copyright Year === 2 Contributors: citywanderer, stubgo2 Contributors: miinasikk, citywanderer 3 3 Donate link: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/ 4 4 Tags: copyright,shortcode,copyright year,footer copyright,widget 5 5 Requires at least: 3.0.1 6 Tested up to: 4.4.27 Stable tag: 1. 06 Tested up to: 5.2.2 7 Stable tag: 1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 20 20 Instead of going through every site you have each year on the 1st of January and change the year manually, now it will all be done seamlessly for you. Just install the Automatic Copyright Year plugin and voila: your sites will always have an up-to-date copyright. 21 21 22 For more information and support, check out: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/23 24 22 == Installation == 25 23 … … 28 26 1. Upload the folder `automatic-copyright-year` to the `/wp-content/plugins/` directory 29 27 2. Activate the plugin through the 'Plugins' menu in WordPress 30 3. Add '<span>[wpsos_year]</span>' (<span>[wpsos_year]</span>, surrounded by span tags) to a widget or to anywhere inside the html footer element28 3. Add '<span>[wpsos_year]</span>' (<span>[wpsos_year]</span>, surrounded by span tags) as shortcode, to a widget or to anywhere inside the html footer element. 31 29 32 30 == Frequently Asked Questions == … … 38 36 = Where can I get some support? = 39 37 40 Check out our site, at: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/ 38 Let us know via the support forum. 41 39 42 40 = I have some suggestions for other options I want edited = 43 41 44 Let us know , via: http://www.wpsos.io/wordpress-plugin-automatic-copyright-year/42 Let us know via the support forum. 45 43 46 44 == Screenshots == … … 50 48 == Changelog == 51 49 50 = 1.1 = 51 * Allow using [wpsos_year] as shortcode. 52 52 53 = 1.0 = 53 54 * Initial version.
Note: See TracChangeset
for help on using the changeset viewer.