コード例 #1
0
/**
 * Trigger an upgrade via AJAX.
 *
 * @see     Charitable_Upgrade::trigger_ajax_upgrade()
 */
// add_action( 'wp_ajax_trigger_ajax_upgrade', array( 'Charitable_Upgrade', 'trigger_ajax_upgrade' ) );
/**
 * Register the admin page.
 *
 * @see     Charitable_Upgrade_Page::register_page()
 */
add_action('admin_menu', array(Charitable_Upgrade_Page::get_instance(), 'register_page'));
/**
 * Hide the admin page from the menu.
 *
 * @see     Charitable_Upgrade_Page::remove_page_from_menu()
 */
add_action('admin_head', array(Charitable_Upgrade_Page::get_instance(), 'remove_page_from_menu'));
/**
 * Update the upgrade system. 
 *
 * @see     Charitable_Upgrade::update_upgrade_system()
 */
add_action('charitable_update_upgrade_system', array(Charitable_Upgrade::get_instance(), 'update_upgrade_system'));
/**
 * Run the upgrade for 1.3.0. 
 *
 * @see     Charitable_Upgrade::upgrade_1_3_0_fix_gmt_dates()
 */
add_action('charitable_fix_donation_dates', array(Charitable_Upgrade::get_instance(), 'fix_donation_dates'));
// add_action( 'admin_init', array( Charitable_Upgrade_Page::get_instance(), 'welcome'    ) );
コード例 #2
0
 /**
  * Set up the upgrade log. 
  *
  * @return  void
  * @access  protected
  * @since   1.3.0
  */
 protected function setup_upgrade_log()
 {
     require_once 'admin/upgrades/class-charitable-upgrade.php';
     Charitable_Upgrade::get_instance()->populate_upgrade_log_on_install();
 }