Changeset 994532
- Timestamp:
- 09/22/2014 07:44:46 AM (12 years ago)
- Location:
- date-calculator
- Files:
-
- 4 added
- 2 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/date-calculator.php (added)
-
tags/1.0.1/license.txt (added)
-
tags/1.0.1/readme.txt (added)
-
trunk/date-calculator.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
date-calculator/trunk/date-calculator.php
r986828 r994532 1 <?php 2 /** 1 <?php 2 /** 3 3 * Plugin Name: Date Calculator 4 4 * Plugin URI: http://wordpress.org/plugins/date-calculator/ 5 * Description: Date Calculator returns the current date via shortcode and it can calculate it into an other and returns it in posts, pages and also in CF7-forms. 6 * Version: 1.0 7 * Author: Matthias Siebler 5 * Description: Date Calculator returns the current date via shortcode and it can calculate it into an other and returns it in posts, pages and also in CF7-forms. 6 * Version: 1.0.1 7 * Author: Matthias Siebler 8 8 * Author URI: http://www.serdev.net 9 9 * License: GPLv2 10 10 */ 11 11 12 12 /* 13 13 Copyright 2014 Matthias Siebler (email: matthias.siebler@gmail.com) 14 14 This program is free software; you can redistribute it and/or modify 15 it under the terms of the GNU General Public License, version 2, as 15 it under the terms of the GNU General Public License, version 2, as 16 16 published by the Free Software Foundation. 17 17 … … 25 25 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 26 26 */ 27 28 29 // Prevent Direct Access of this file 30 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if this file is accessed directly 27 31 28 32 // Show an entry in the admin menu in settings-area … … 40 44 } 41 45 echo '<div class="wrap">'; 42 echo '<h2>Date Calculator › Here are the shortcode definition</h2>'; 46 echo '<h2>Date Calculator › Here are the shortcode definition</h2>'; 43 47 echo '<p>The Date Calculator plugin has two basic functions.</p>'; 44 48 echo '<p><span style="text-decoration: underline;"><strong>1. It returns the current date.</strong></span><br />'; … … 84 88 85 89 // Integrate Shortcodes to Contact Form 7 86 add_filter( 'wpcf7_form_elements', 'do_shortcode' ); 90 add_filter( 'wpcf7_form_elements', 'do_shortcode' ); 87 91 88 92 // Date now - Callexample: [date_now] … … 110 114 $year = "{$year}"; 111 115 $show = "{$show}"; 112 116 113 117 if ($show == "all") { 114 118 $datecalc = date("d.m.Y",mktime(0, 0, 0, date("m")+$month, date("d")+$day, date("Y")+$year)); 115 119 return $datecalc; 116 } 117 120 } 121 118 122 if ($show == "monthonly") { 119 123 $datecalc = date("m",mktime(0, 0, 0, date("m")+$month, date("d")+$day, date("Y")+$year)); 120 124 return $datecalc; 121 } 122 125 } 126 123 127 if ($show == "dayonly") { 124 128 $datecalc = date("d",mktime(0, 0, 0, date("m")+$month, date("d")+$day, date("Y")+$year)); 125 129 return $datecalc; 126 } 127 130 } 131 128 132 if ($show == "yearonly") { 129 133 $datecalc = date("Y",mktime(0, 0, 0, date("m")+$month, date("d")+$day, date("Y")+$year)); 130 134 return $datecalc; 131 } 135 } 132 136 } 133 137 134 138 add_shortcode( 'date_add', 'date_add_func' ); 135 139 … … 149 153 $year = "{$year}"; 150 154 $show = "{$show}"; 151 155 152 156 if ($show == "all") { 153 157 $datecalc = date("d.m.Y",mktime(0, 0, 0, date("m")-$month, date("d")-$day, date("Y")-$year)); 154 158 return $datecalc; 155 159 } 156 160 157 161 if ($show == "monthonly") { 158 162 $datecalc = date("m",mktime(0, 0, 0, date("m")-$month, date("d")-$day, date("Y")-$year)); … … 170 174 } 171 175 } 172 176 173 177 add_shortcode( 'date_sub', 'date_sub_func' ); 174 178 -
date-calculator/trunk/readme.txt
r986828 r994532 6 6 Requires at least: 3.6 7 7 Tested up to: 4.0 8 Stable tag: 1.0 8 Stable tag: 1.0.1 9 9 License: GNU General Public License GPLv2 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 79 79 == Changelog == 80 80 81 = 1.0 = 81 = 1.0.1 =Update: September 20, 2014 82 83 * Prevent Direct Access of PlugIn-File. 84 85 = 1.0.0 = 82 86 Release Date: September 9, 2014 83 87 … … 86 90 == Upgrade Notice == 87 91 88 = 1.0 = 92 93 = 1.0.1 =Update: September 20, 2014 94 95 * Prevent Direct Access of PlugIn-File. 96 97 = 1.0.0 = 89 98 Release Date: September 9, 2014 90 99
Note: See TracChangeset
for help on using the changeset viewer.