Changeset 715221
- Timestamp:
- 05/19/2013 12:30:42 PM (13 years ago)
- Location:
- live-stream-badger/trunk
- Files:
-
- 1 edited
- 1 moved
-
live-stream-badger-plugin.php (modified) (2 diffs)
-
scheduler/class-api-sync.php (moved) (moved from live-stream-badger/trunk/scheduler/class-menu-item-updater.php) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
live-stream-badger/trunk/live-stream-badger-plugin.php
r713017 r715221 18 18 include_once LSB_PLUGIN_BASE . 'stream-status-widget.php'; 19 19 include_once LSB_PLUGIN_BASE . 'shortcode/class-embedded-stream.php'; 20 include_once LSB_PLUGIN_BASE . 'scheduler/class- menu-item-updater.php';20 include_once LSB_PLUGIN_BASE . 'scheduler/class-api-sync.php'; 21 21 22 22 // Register widget … … 35 35 36 36 // 37 // Register updater to start on activation/ stop on deactivation37 // Hook synchronization with APIs to certain actions 38 38 // 39 $lsb_menu_item_updater = new LSB_Menu_Item_Updater(); 40 add_action( 'lsb_update_all_stream_status', array( $lsb_menu_item_updater, 'updateAll' ) ); 39 $lsb_api_sync = new LSB_API_Sync(); 40 add_action( 'lsb_update_all_stream_status', array( $lsb_api_sync, 'updateAll' ) ); // Scheduled action (5 minutes) 41 add_action( 'wp_update_nav_menu', array( $lsb_api_sync, 'updateAll' ) ); // When an administrator updates any menu 41 42 42 43 register_activation_hook( __FILE__, 'lsb_activation' ); -
live-stream-badger/trunk/scheduler/class-api-sync.php
r714835 r715221 14 14 * 'Watching now' count is stored in $nav_menu_item->description. 15 15 */ 16 class LSB_ Menu_Item_Updater{16 class LSB_API_Sync { 17 17 18 18 function updateAll() {
Note: See TracChangeset
for help on using the changeset viewer.