Changeset 162
- Timestamp:
- 12/20/2013 04:39:03 PM (11 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-api
- Files:
-
- 2 added
- 1 deleted
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-api/classes/ics.php
r161 r162 1 1 <?php 2 /*3 * Plugin Name: WordCamp.org Calendar4 * PLugin Description: Returns an .ical calendar on the calendar.ical endpoint.5 */6 2 7 class WordCamp_ Calendar_Plugin{3 class WordCamp_API_ICS { 8 4 public $ttl = 1; // seconds to live 9 5 … … 98 94 } 99 95 } 100 101 // Go!102 new WordCamp_Calendar_Plugin;103 104 /**105 * Activation and deactivation routines.106 */107 function wcorg_calendar_plugin_activate() {108 global $wp_rewrite;109 add_rewrite_rule( '^calendar\.ics$', 'index.php?wcorg_wordcamps_ical=1', 'top' );110 flush_rewrite_rules();111 }112 register_activation_hook( __FILE__, 'wcorg_calendar_plugin_activate' );113 114 function wcorg_calendar_plugin_deactivate() {115 flush_rewrite_rules(); // Doesn't really remove the created rule.116 delete_option( 'wcorg_wordcamps_ical' );117 }118 register_deactivation_hook( __FILE__, 'wcorg_calendar_plugin_deactivate' );
Note: See TracChangeset
for help on using the changeset viewer.