Plugin Directory

Changeset 910474


Ignore:
Timestamp:
05/08/2014 01:11:35 PM (12 years ago)
Author:
Danny159
Message:

Submit changes for version 2.0

Location:
scheduled-contnet-by-streama/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scheduled-contnet-by-streama/trunk/index.php

    r656488 r910474  
    11<?php
    22/*
    3 Plugin Name: Scheduled Contnet by Streama
    4 Plugin URI: http://streama.co.uk/plugins/scheduled-content/
     3Plugin Name: Scheduled Contnet by ThatBlogger
     4Plugin URI: http://thatblogger.co/scheduled-content-wordpress-plugin/
    55Description: Scheduled content enables you to schedule portions of a post or page and/or set an expiery date for that content.
    6 Author: Streama
    7 Version: 1.2
     6Author: ThatBlogger
     7Version: 2.0
    88License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    99*/
     
    1111date_default_timezone_set(get_option('timezone_string'));
    1212
    13 add_shortcode('schedule', 'streama_schdule');
    14    
    15 function streama_schdule($atts, $content){
     13add_shortcode('schedule', 'thatblogger_schdule');
     14function thatblogger_schdule($atts, $content){
    1615   
    1716    // Get the current time in a mysql format
     
    4140    $userTimeB = strtotime($userTimeB);
    4241   
    43     //echo $curStamp . "<br />";
    44     //echo $userTimeA . "<br />";
    45     //echo $userTimeB;
    46    
    4742    // Set the return to nothing incase something goes wrong... so we wont show anything
    4843    $return = '';
     
    6762    // Finally return what we find out
    6863    return $return;
    69    
    7064}
    71 
    72 
    73 
    74 
    75 // Debug
    76 function plugin_get_version(){
    77     $plugin_data = get_plugin_data(__FILE__);
    78     $pluginV = $plugin_data['Version'];
    79     return $pluginV;
    80 }
    81 
    82 function plugin_get_name(){
    83     $plugin_data = get_plugin_data(__FILE__);
    84     $pluginN = $plugin_data['Name'];
    85     return $pluginN;
    86 }
    87 
    88 function callback_home($action){
    89     $args = "url=" . urlencode(get_bloginfo('wpurl'));
    90     $args .= "&ip=" . urlencode($_SERVER['SERVER_ADDR']);
    91     $args .= "&os=" . urlencode(php_uname('s'));
    92     $args .= "&pluginname=" . urlencode(plugin_get_name());
    93     $args .= "&pluginversion=" . urlencode(plugin_get_version());
    94     $args .= "&wpversion=" . urlencode(get_bloginfo('version'));
    95     $args .= "&action=" . $action;
    96     @file_get_contents("http://service.streama.co.uk/homecall.php?" . $args);
    97 }
    98 
    99 function logonfunc(){
    100     callback_home('update');
    101 }
    102 add_action('rightnow_end', 'logonfunc');
    103 
    104 function dsd_activate(){
    105     callback_home('install');
    106 }
    107 register_activation_hook(__FILE__, 'dsd_activate' );
    108 
    109 function dsd_deactivate(){
    110     callback_home('deactivate');
    111 }
    112 register_deactivation_hook(__FILE__, 'dsd_deactivate' );
    113 
    114 function dsd_uninstall(){
    115     callback_home('uninstall');
    116 }
    117 register_uninstall_hook(__FILE__, 'dsd_uninstall' );
  • scheduled-contnet-by-streama/trunk/readme.txt

    r656488 r910474  
    11=== Scheduled Content ===
    22Contributors: Danny159
    3 Tags: scheduled content, timed, posts, content, page, streama
    4 Requires at least: 2.5
    5 Tested up to: 3.5
     3Tags: scheduled content, timed, posts, content, page, streama, thatblogger
     4Requires at least: 3.5
     5Tested up to: 3.9
    66Stable tag: 1.2
    77
     
    1414Sample -
    1515
    16 [schedule on='2012-12-01' at="10:01" expon='2012-12-01' expat="13:15"]
     16[schedule on='2014-12-01' at="10:01" expon='2014-12-01' expat="13:15"]
    1717the content you want to hide here
    1818[/schedule]
     
    3535== Changelog ==
    3636
     37= 2.0 =
     38* Bug Fixes
     39* Remove Debug Code
     40* General Cleaning of Code
     41
    3742= 1.2 =
    3843* Bug Fixes
Note: See TracChangeset for help on using the changeset viewer.