WordPress.org

Plugin Directory

Changeset 608433


Ignore:
Timestamp:
10/05/12 11:20:22 (19 months ago)
Author:
kovshenin
Message:

Add the save_attendee_post action to the upgrade scenario for the hook to actually run on wp_update_post.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • camptix/trunk/camptix.php

    r608432 r608433  
    10891089            update_option( 'camptix_options', $options ); 
    10901090 
     1091            /** 
     1092             * Since we're going to wp_update_post attendees, we need the save post handler, 
     1093             * which is loaded during init after the upgrade. Don't forget to remove the action 
     1094             * after updating is complete, to avoid multiple actions. 
     1095             */ 
     1096            add_action( 'save_post', array( $this, 'save_attendee_post' ) ); 
     1097 
    10911098            $paged = 1; $count = 0; 
    10921099            while ( $attendees = get_posts( array( 
     
    11301137 
    11311138            } 
     1139 
     1140            // Remove save_post action since we finished with wp_update_post. 
     1141            remove_action( 'save_post', array( $this, 'save_attendee_post' ) ); 
    11321142 
    11331143            $end_20120831 = microtime( true ); 
Note: See TracChangeset for help on using the changeset viewer.