Plugin Directory

Changeset 994532


Ignore:
Timestamp:
09/22/2014 07:44:46 AM (12 years ago)
Author:
matthias.s
Message:

Prevent Direct Access of PlugIn-File

Location:
date-calculator
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • date-calculator/trunk/date-calculator.php

    r986828 r994532  
    1 <?php   
    2     /** 
     1<?php
     2    /**
    33     * Plugin Name: Date Calculator
    44     * 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
    88     * Author URI: http://www.serdev.net
    99     * License: GPLv2
    1010     */
    11      
     11
    1212    /*
    1313       Copyright 2014 Matthias Siebler (email: matthias.siebler@gmail.com)
    1414       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
    1616       published by the Free Software Foundation.
    1717
     
    2525       Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2626     */
     27
     28
     29     // Prevent Direct Access of this file
     30     if ( ! defined( 'ABSPATH' ) ) exit; // Exit if this file is accessed directly
    2731
    2832     // Show an entry in the admin menu in settings-area
     
    4044    }
    4145        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>';
    4347        echo '<p>The Date Calculator plugin has two basic functions.</p>';
    4448        echo '<p><span style="text-decoration: underline;"><strong>1. It returns the current date.</strong></span><br />';
     
    8488
    8589    // Integrate Shortcodes to Contact Form 7
    86     add_filter( 'wpcf7_form_elements', 'do_shortcode' );   
     90    add_filter( 'wpcf7_form_elements', 'do_shortcode' );
    8791
    8892    // Date now - Callexample: [date_now]
     
    110114    $year = "{$year}";
    111115    $show = "{$show}";
    112    
     116
    113117    if ($show == "all") {
    114118    $datecalc = date("d.m.Y",mktime(0, 0, 0, date("m")+$month, date("d")+$day, date("Y")+$year));
    115119    return $datecalc;
    116     }   
    117    
     120    }
     121
    118122    if ($show == "monthonly") {
    119123    $datecalc = date("m",mktime(0, 0, 0, date("m")+$month, date("d")+$day, date("Y")+$year));
    120124    return $datecalc;
    121     }   
    122    
     125    }
     126
    123127    if ($show == "dayonly") {
    124128    $datecalc = date("d",mktime(0, 0, 0, date("m")+$month, date("d")+$day, date("Y")+$year));
    125129    return $datecalc;
    126     }   
    127    
     130    }
     131
    128132    if ($show == "yearonly") {
    129133    $datecalc = date("Y",mktime(0, 0, 0, date("m")+$month, date("d")+$day, date("Y")+$year));
    130134    return $datecalc;
    131     }   
     135    }
    132136    }
    133    
     137
    134138    add_shortcode( 'date_add', 'date_add_func' );
    135139
     
    149153    $year = "{$year}";
    150154    $show = "{$show}";
    151    
     155
    152156    if ($show == "all") {
    153157    $datecalc = date("d.m.Y",mktime(0, 0, 0, date("m")-$month, date("d")-$day, date("Y")-$year));
    154158    return $datecalc;
    155159    }
    156        
     160
    157161    if ($show == "monthonly") {
    158162    $datecalc = date("m",mktime(0, 0, 0, date("m")-$month, date("d")-$day, date("Y")-$year));
     
    170174    }
    171175    }
    172    
     176
    173177    add_shortcode( 'date_sub', 'date_sub_func' );
    174178
  • date-calculator/trunk/readme.txt

    r986828 r994532  
    66Requires at least: 3.6
    77Tested up to: 4.0
    8 Stable tag: 1.0
     8Stable tag: 1.0.1
    99License: GNU General Public License GPLv2
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7979== Changelog ==
    8080
    81 = 1.0 =
     81= 1.0.1 =Update: September 20, 2014
     82
     83* Prevent Direct Access of PlugIn-File.
     84
     85= 1.0.0 =
    8286Release Date: September 9, 2014
    8387
     
    8690== Upgrade Notice ==
    8791
    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 =
    8998Release Date: September 9, 2014
    9099
Note: See TracChangeset for help on using the changeset viewer.